1

I have a situation where I need to maintain the same IP address and/or hostname between two network interfaces on several macOS laptops: the ethernet and wifi.

The topology is such that there is a pfSense router serving DHCP and DNS resolving services for the network. Currently the ethernet interface has one IP while the wifi has another IP, but during development and various tasks, this is becoming a problem when people try to resolve "workstation1.lan" which is for the ethernet and they are actually working off the wifi. Unfortunately this has become a big headache with some management and is not at all acceptable.

What options exist to unify the IP scheme in such scenarios so that both the ethernet and wifi interfaces use the same IP address and subsequently the same hostname?

2 Answers 2

2

While it is possible to create two reservations in DHCP, one with the MAC address of the WiFi, one with the MAC address of the ethernet, and point them at the same IP address, this will create massive headaches for you when the laptop is plugged into the Ethernet because the WiFi will not automatically disable, and so the resulting IP address collision may well result in the laptop not being connected at all. However, if the laptop is named (e.g.) wk1 with the default domain workplace.lan, and the firewall is set to know that its default domain is also workplace.lan, then in theory wk1.workplace.lan should always resolve to whatever IP the laptop is actually talking on. That is, at least, how DHCP and DNS is meant to work on an in-house network. But it will only work if you don't have static DNS definitions for your workstations; they have to be allowed to change as the workstation's IP address changes.

3
  • Thanks, yeah, that (letting DHCP handle IP mapping entirely), in theory might be best. We've had some problems over time where it seems that macOS is not respecting interface order such that the wifi is prioritized even though ethernet should be and so when you connect to the hostname without the direct static mapping it seems to always, for some weird reason, go to wifi... I'm really not sure why or how this can be happening, unless it's a macOS bug.
    – ylluminate
    Commented Sep 25, 2023 at 20:36
  • @ylluminate: Windows can be configured to disable WiFi when connected to a LAN. You may want to try setting the preference/priority of the LAN adapter as a trailer park workaround to see if that would help. discussions.apple.com/thread/253684126
    – Greg Askew
    Commented Sep 26, 2023 at 10:16
  • Have done that, unfortunately it doesn't help. It seems I'm hitting some kind of a bug perhaps, but I've just simply gone to using Network Locations as a seemingly reasonable work around with a static non-DNS mapped IP for non-priority interfaces presently. This has the desired effect, but requires the users to either use manual location changes or use an "auto-sensing" script that detects locations based on some parameters, which I've gotten to work, but feels "fragile."
    – ylluminate
    Commented Sep 26, 2023 at 19:13
0

Your best bet is either set a static IP and exclude these from the DHCP pool, or simply (and probably easiest), set up DHCP reservations/static leases.

1
  • Not quite what the OP was asking.
    – tsc_chazz
    Commented Oct 6, 2023 at 21:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .