Say you have determined that you need resiliency for a L3 default gateway. VRRP comes to the rescue. But, typical VRRP implemtations means that only one of thoes routers will forward packets. That seems like a waste having a box sit there and doesnt accept traffic until failure of the other box.
No problem...there are advancements to VRRP that allow that second router...or 3rd or 4th to also accept traffic. And...there is no funny business with having to setup multiple VRRP groups and multiple default gateway ip addresses and do manual load balancing.
In load balancing mode, VRRP provides load balancing in addition to virtual gateway redundancy by
mapping a virtual IP address to multiple virtual MAC addresses to assign each router in a VRRP group
one virtual MAC address. In this way, each router in this VRRP group can respond to ARP requests in an
IPv4 network or ND requests in an IPv6 network from corresponding hosts, so that different hosts can
send packets to different routers, and each router in the VRRP group can forward packets. In load
balancing mode, you need to create only one VRRP group to balance load among multiple routers,
instead of allowing one router to bear the load and other routers stay idle.
When VRRP works in load balancing mode, the master assigns virtual MAC addresses to the routers in
the VRRP group and answers the ARP requests or ND requests from different hosts. The backup routers,
however, do not answer the ARP requests or ND requests from the hosts.
Assume that a VRRP group works in an IPv4 network. The following describes how the load balancing
mode works:
1. The master assigns virtual MAC addresses to the routers—including the master itself and the
backups—in the VRRP group. For example, as shown in Figure 35, the virtual IP address of the
VRRP group is 10.1.1.1/24; Router A is the master; Router B and Router C are the backups. Router
A assigns 000f-e2ff-0011 to itself, and 000f-e2ff-0012 to Router B.
2. Upon receiving an ARP request destined for the virtual IP address of the VRRP group from a host,
the master, based on the load balancing algorithm, uses a corresponding virtual MAC address to
answer the ARP request. For example, as shown Figure 36, when Host A sends an ARP request to
retrieve the MAC address of gateway 10.1.1.1, the master—Router A, after receiving the request,
returns the virtual MAC address of Router A to Host A; when Host B sends an ARP request to
retrieve the MAC address of gateway 10.1.1.1, the master, after receiving the request, returns the
virtual MAC address of Router B to Host B.
3. Different hosts send packets to different routers according to the requested virtual MAC addresses.
For example, as shown in Figure 37, Host A regards the virtual MAC address of Router A as the
gateway MAC address, so it sends packets to Router A for forwarding; Host B regards the virtual
MAC address of Router B as the gateway MAC address, so it sends packets to Router B for
forwarding.
quick example:
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port gigabitethernet 1/0/5
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
[SwitchA-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-Vlan2] port gigabitethernet 1/0/5
[SwitchB-vlan2] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
[SwitchB-Vlan-interface2] vrrp vrid 1 preempt-mode timer delay 5
and to check its state:
[SwitchA-Vlan-interface2] display vrrp verbose
IPv4 Standby Information:
Run Mode : Standard
Run Method : Virtual MAC
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 5
Auth Type : None
141
Virtual IP : 202.38.160.111
Virtual MAC : 0000-5e00-0101
Master IP : 202.38.160.1
and on the other switch:
[SwitchB-Vlan-interface2] display vrrp verbose
IPv4 Standby Information:
Run Mode : Standard
Run Method : Virtual MAC
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 1
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 5
Auth Type : None
Virtual IP : 202.38.160.111
Master IP : 202.38.160.1
No comments:
Post a Comment