I have 5 PCs with public IPs connected to internet, through a switch and a router. One of them is used only by me, but today I needed to connect to the internet another PC, so I disconnected my Ethernet cable, put my IP in the new PC, connected the new PC on the switch (in other port), but this PC did not connected to internet. I had to restart it, and it worked, but I don't know if there is another solution which doesn't imply restarting. (I wonder if there is any association between IP and MAC at the switch...)

  • It's much more likely your changes didn't take effect until you rebooted.
    – Ricky
    Commented Jul 27, 2016 at 5:09
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Aug 11, 2017 at 14:49

2 Answers 2


Clear ARP cache

Switch expected the IP you used to be mapped to MAC of other machine you originally had IP tied to.

Clear arp and/or routing table.

Rebooting PC after changing IP basically did that.

PC reboots and the arp binding process kicked off when connected back to switch and the learned the new IP to Mac binding (arp cache)

  • Thank you for your help, but how can I clear the ARP cache without affect the other 4 PCs connected to the switch? Is there any way to clear only the entry that associates the former MAC to the IP?
    – Jorge_S7
    Commented Jul 27, 2016 at 5:07
  • 1
    The ARP cache is just that: a cache. If you clear it, it will immediately start being rebuilt. It just means that for the first packets through from each host, the router will have to perfom an ARP request rather than just getting the MAC from cache. So you should not see any ill effects from clearing the ARP cache. Commented Jul 27, 2016 at 5:17

It's a normal behaviour, The switches has something named MAC tables which indicates where the traffic has to be forwarded. When you move the PC to another port the table keeps forwarding the traffic to the previous port, that is the reason your PC is unreachable a few seconds some times minutes. A easy way to solve the problem is flushing the MAC Table or refresh it. Try to run a ping from the PC with the problem to another PC o Device in your network to force MAC table to be refresh it.


port 1    ->   PC1 (0:92:1c:5b:9d:eb)
port 2    ->   Nothing connected here

if you move the PC1 to port 2 of the switch. The switch keeps forwarding the traffic to port 1 because it hasn't refresh the MAC table

port 1    ->   Nothing connected here, but the switch believe than PC1 is here
port 2    ->   PC1 (0:92:1c:5b:9d:eb)
  • Thanks for comment, but the problem was not that PC changed port. It was that PC1 (port 1, IP, MAC 0:92:1c:5b:9d:eb) was replaced for PC5, with the same IP (I disconnected PC1). In this situation, PC5 (port 2, IP, MAC 0:92:1c:5b:1a:fc) doesn't connect to the internet until it is rebooted.
    – Jorge_S7
    Commented Jul 27, 2016 at 5:42
  • This is not normal behaviour. When you disconnect port 1, the switch sees the port go down and automatically clears the MAC entry for port 1. If you connect the same device to port 2, as soon as the PC sends a single frame the switch will learn the MAC address on port 2. Spanning Tree can cause a device to not work for 30 seconds if you don't have the ports configured as edge/portfast.
    – user27899
    Commented Jul 27, 2016 at 5:48
  • Thank you @Qualeboy, but, what about connecting a different PC on a different switch port with the same IP of the PC I disconnected.Switch doesn't get "confused"? What is the reason why reboooting the new PC worked to obtain internet connection?
    – Jorge_S7
    Commented Jul 27, 2016 at 6:57
  • i can't see it being a problem with MAC learning on the switch. Could be ARP as mentioned by @ddevalco. Was the IP address configured before you connected to the switch? If so, there may be no gratuitous ARP being sent when you connect with the new PC. Either clear the ARP cache or if it's a Windows machine do a repair on the network connection, or remove the IP address and re-apply. This should send a gratuitous ARP to update the ARP cache.
    – user27899
    Commented Jul 27, 2016 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.