MacBook Pro gets different (wrong) IP

Networkrouter

I'm a developer (but not a network guy) and I often need my MacBook Pro and PC working together to do mobile apps coding/debugging.

As of late, on my home network, my Mac has started to get an IP address on the wrong net (192.168.0.X). The Mac and PC is connected to the same switch but the PC gets IP 192.168.2.X, which is correct. I've tried specifying the router on the Mac as 192.168.2.1 but it still gets a 192.168.0.X address.

I'm out of ideas and would love any hints at what might be going on (and how to correct it).

Best Answer

The switch is not responsible for handing out IP-adresses, so the fact that they're connected to the same switch does not matter.

It is the DHCP server that hands out IP-adresses. The DHCP server on home networks is usually inside a cabled or WiFi router, but you can also find DHCP servers in other network devices and as a software feature on PCs.

In your case it sounds like you could have two DHCP servers connected to the same network. That is not a good idea if they're not configured to interact, as this will cause configuration issues such as the ones, you're experiencing.

Hunt down the extraneous DHCP server and turn if off to make sure your devices get the right IP-adresses.