Switch – Mismatch between IP address and MAC Address

ethernetnetworkingswitch

Suppose you have two interfaces in the host belonging to the same subnet connected to a normal L2/L3 switch port which has a single vlan with interface IP 10.0.0.1.

nxge0  (10.0.0.201) (00:14:4f:fb:d7:af)    --> ex0/1   
nxge1  (10.0.0.202) (00:14:4f:fb:dbe:91)   --> ex0/2   

The routing table in the host says that for all packets whose destination is 10.0.0.0/24, use nxge0 interface first and then nxge1. So all packets to 10.0.0.0/24 will go out from nxge0 interface. Say someone pings from the switch to 10.0.0.202. First the switch will learn the mac address of 10.0.0.202 from ARP reply. Then it will construct a packet using destination mac as 00:14:4f:fb:dbe:91 and ICMP Echo Request. Packet arrives on the host and the host sends ICMP Echo Reply. Now the funny part is the packet will be having the source mac address (00:14:4f:fb:d7:af) since it is sent out from nxge0 interface.

On the switch side, we see that the ping was successful. Can the above scenario be a problem for any protocol? Is my understanding correct. Thanks for your help.

Best Answer

One nasty case is when the links to both interfaces are of different speed, or meant as a means to shape traffic (management vs workload interface, usually a good idea!)... for such cases there are eg sysctl parameters in Linux to modify the arp behaviour (in case of different subnets - you are still in for a surprise otherwise since default behaviour is often to answer arp for any address the host has on any interface!).. same subnet is even more difficult since the routing decision is, as you found out, ambigous; you would need to source route.

Related Topic