0

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).

  • 1
    A screenshot with your network settings would help, I think... – Denis Rasulev Aug 25 '17 at 6:42
  • Please issue the command ipconfig getpacket enX | grep server_identifier where X is the identifier of your interface (0 for wired, 1 for wireless; usually). Once you get that address, try pinging it. If it responds, issue the command arp <IP Address> using the IP address you just pinged. Post the output to your question. – Allan Aug 25 '17 at 12:07
2

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.

|improve this answer|||||
  • Hm, good tip. I did try specifying the router (Gateway?) IP but I still got the wrong network back in the resulting IP address. – Jonas Rembratt Aug 25 '17 at 6:57
  • Specifying the gateway IP does nothing - it will not help you. It is not sent on to the network, and thus DHCP servers cannot see that information to help guide which IP-adresses they hand out. – jksoegaard Aug 25 '17 at 6:58
  • What if you manually put IP address? – Denis Rasulev Aug 25 '17 at 11:01
  • You can do that, but it would be treating the symptom instead of the disease. You would have to spend the rest of your days making sure that no other device has the same IP-address... instead you could just correctly configure the DHCP-server(s) on the network. – jksoegaard Aug 25 '17 at 12:08
0

I had this happen at work after upgrading a iMac to Mojave. I found that removing the Ethernet interface then re-adding it, fixed the issue. After re-adding it, it found the correct DHCP address.

|improve this answer|||||

You must log in to answer this question.

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