I have host which is connected to a switch. I need to establish a communication with a server which is not in my network. So I am using two routers(gateways) ,configured with HSRP, between my host and the server.
When I send a ARP request for the MAC address of the server, I receive HSRP virtual MAC as an ARP response. Hence HSRP virtual MAC is resolved for an IP of the server in the ARP table and also this HSRP virtual MAC gets added to the switch CAM table.
I start sending packets to the server (HSRP MAC as the destination MAC) and I am receiving the response from the server. But on analyzing the response from the server, I found out that the packet has source MAC as that of one of the physical router's (gateway's) MAC address but not the HSRP virtual MAC. I was expecting that the packet I received will have the source MAC as HSRP MAC, since I was sending all the packet to HSRP MAC.
Since packets are received with physical router's MAC and no packet is received with HSRP virtual MAC as source MAC after the initial ARP response, hence once the switch's CAM aging interval is expired, switch's CAM table entry corresponding to HSRP MAC is removed. Therefore all the packets designed to HSRP MAC are now getting broadcasted by the switch. Which is causing a huge increase in my network traffic.
So are the routers configured correctly with HSRP? Is it the right behavior that in case of HSRP, host will send packet to HSRP MAC but will receive the packet from physical router MAC? Is there any way to configure routers so that packets are received with HSRP virtual MAC