I want to know that after enabling the HSRP , whether both the routers(active & standby) are using virtual IP for routing the packets or can it use one of the its assigned IP.
I agree with Smitesh. Your Linux should be using only one default gateway - the vIP address 10.32.23.49.
Please note that there are two incorrect aspects of your current configuration:
- There is no such thing as a separate default gateway for a particular interface. The Linux has a common routing table, and defining a "default gateway" results in a normal default route 0.0.0.0/0 being added to the routing table with the IP address of the next hop set to the address of the "default gateway". If you define four different default gateways, you will either end up with the routing table having a single default route 0.0.0.0/0 through four different next hops, or the routing table will contain the default route through only a single next hop (either the first or the last one - that depends on many factors). Once more, regardlessly of how many network cards you have, you should use only one default gateway - in this case, the vIP address of the entire HSRP standby group.
- Your current configuration of "per-interface default gateways" is furthermore incorrect because the address of the default gateway lies outside your directly connected networks. Your four NICs belong to the IP network 10.32.23.48/28 while the defined default gateways are somewhere in the 10.31.X.X range, clearly outside your directly connected network 10.32.23.48/28. A default gateway must always be located on a directly connected network, otherwise it is invalid and not accepted. I suppose that is also the reason why the route output you have posted does not contain any default route at all.
Configure your Eth 1, 2, 3 ,4 & 5 to have Gateway IP of 10.32.23.49 and I guess then everything should work as a charm...
PS: Please rate helpful posts...
I am agree with Peter.
Using HSRP, a set of routers work in concert to present the illusion of a single virtual router to the hosts on the LAN. This set is known as an HSRP group or a standby group.A single router elected from the group is responsible for forwarding the packets that hosts send to the virtual router.This router is known as the active router.Another router is elected as the standby router. In the event that the active router fails, the standby assumes the packet forwarding duties of the active router. Although an arbitrary number of routers may run HSRP, only the active router forwards the packets sent to the virtual router.
To minimize network traffic, only the active and the standby routers send periodic HSRP messages once the protocol has completed the election process. If the active router fails, the standby router takes over as the active router. If the standby router fails or becomes the active router, another router is elected as the standby router.
They usually use the real ip address of the router to communicate via default gateway( HSRP hello packets).
Plz rate if it helps.
Welcome back my friend. So glad to see u again
Any router in a standby group is fully reachable under its real IP address and this IP address remains functional regardless of the HSRP. In other words, you can always use these real IP address to contact the routers or to perform routing via these IP addresses as default gateways.
In addition, the Active router also uses the virtual IP address and can be contacted using that IP address.
Does this answer your question?