cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
883
Views
0
Helpful
2
Replies

What happen if destination IP address change

samarjit.das
Level 1
Level 1

Hi

I have a question about ARP. If there are two PCs connected to a L2 VLAN of a switch and they are sending data. What will happen if the destination PC ip address is changed without informing source PC where the source PC continue transfering data thinking all are in place. So my question in this senario is where the data will be lost. Is the data lost happen in the OS of destination PC ? My assumption is, if the ip address of destination host gets changed and source PC has not been informed, it will continue tranfering data to old destination ip address. Data will be sucessfully delivered from source host to connected switch as arp entry still valid with source host. Once switch receives the data from source PC it checked L2 forwarding table for destination host mac address and as it is found because no change had been made to mac address and the data gets delivered to the destination host, When the data hits the destination host OS kernel it experences that ther header destination IP address in the packet is not intended for me and hence the data discarded. And this flow keeps happen until source has not been informed about change of destination host address(Unnecessary processing of data by switch where it is supposed to be discarded by destination host).So is there any way to inform switch to discard the packet immediately after it gets into the box.

My second question is if the destination host IP address is assgned to a new PC, how source host update its arp entry about destination host mac address because it won't generate any further arp broadcast unless existing arp entry aganist same IP address is timed out.

2 Replies 2

Richard Burts
Hall of Fame
Hall of Fame

Your logic in the first scenario is correct. The source PC will continue to send to the destination address and will use the MAC from its ARP entry as the destination MAC address. The frame will get to the switch and the switch will forward because the MAC of the PC has not changed and there still is a valid entry in the switch layer 2 forwarding table pointing at the PC. So the invalid address is only detected when the packet gets to the destination PC. There is not a way for the destination PC to tell the switch to drop the invalid packets. The good news in this is that PCs generally have pretty short timers on their ARP table. So the situation should get corrected fairly quickly.

There are two answer to your second question. First thing is that most hosts will send an ARP response when they first come up and when their IP address is changed. This is called gratuitous arp and the source PC may process that arp response and learn the new MAC for the IP immediately. And the second thing is that most PCs have pretty short timers on their ARP table. So the PC will learn that the destination IP is associated with a different MAC in a few minutes when its ARP entry ages out.

HTH

Rick

HTH

Rick

In the 1st case, if the source PC continues sending data to destination PC, how the arp enry of the PC can be timed out.

In the second case, if the sample destination PC is considered as any NW device which doesn't update mac change info to connected switch.

Review Cisco Networking products for a $25 gift card