Sample Header Ad - 728x90

Using WiFi and Ethernet for same LAN at the same time, resolver issue

4 votes
1 answer
815 views
MacBook Pro M3 max, macOS Sonoma 14.4.1 Connected to a LAN with Wifi using DHCP. I have also a dock with 10G ethernet card connected to 10G switch on the same LAN using DHCP. There are also some other computers connected with 10G to the same switch. Ethernet adapter is before WiFi in network service order in System Preferences. Everything works fine when I connecting to other computers from it. Problem: When MBP m3 is connected to WiFi and to ethernet at the same time, it registers its name with DHCP on the router for both addresses.
% host mbp-m3
mbp-m3 has address 192.168.1.196
mbp-m3 has address 192.168.1.113
.196 is wifi address and .113 is the ethernet. When I am connecting from other computers to this mbp-m3 (say, with ssh or any other app), their resolver choose either one address or another in a non-predictable way. So sometimes it chooses slower WiFi address instead of 10G. But I'd like it always choose ethernet address when MPB is connected to ethernet. And choose WiFi address otherwise. What would be the best way to do this? [UPDATE] The easiest and simplest thing to do is just turn off WiFi just as @SteveChambers suggested. Unfortunately, it will also disable airdrop, unlocking with watch, etc. The best solution may be to temporarily change DHCP hostname on wifi interface. Or change mDNS hostname on wifi interface. I could use mbp-m3.local also. But I don't see a way to do this.
Asked by Nikki Chumakov (153 rep)
May 11, 2024, 09:12 PM
Last activity: May 12, 2024, 12:06 AM