Is HSRP Cisco proprietary

15.3.1 Purpose of the experiment

(1) Understanding the GLBP working principle

(2) Handle GLBP configuration and test

15.3.2 Experimental principle

1.GLBP introduction

GLBP (Gateway Load Balancing Protocol) is a proprietary protocol from Cisco that compensates for the limitations of the existing redundant router protocol. Design The purpose of GLBP is to automatically select and use multiple available gateways at the same time. In contrast to HSRP and VRRP, GLBP can use resources completely without having to configure multiple groups and manage multiple standard gateway configurations.

There can be up to 4 routers in the GLBP group as an IP standard gateway. These gateways are called AVF (Active Virtual Forwarder, Active Virtual Forwarder). GLBP automatically manages virtual MAC address assignment and decides who is responsible for forwarding (this is the key to distinguishing HSRP from VRRP). There is one virtual IP in GLBP, but it corresponds to multiple virtual MACs.

GLBP load balancing can be achieved in three ways:

l Weighted load balancing algorithm: LosAVF The flow rate depends on the AVF The weight value announced by the gateway.

l Host-based load balancing: To ensure that the host always uses the same virtual version of the MAC address.

l Circular load balancing algorithm: when analyzing virtual IP address response contains the information of each virtual repeater MAC address so that the host can send data to different routers, thus achieving gateway load balancing.

by default, GLBP balances the load in round robin fashion according to the source host.

2.GLBP configuration command

HSSPwithVRRPGateway redundancy can be achieved. However, if you want to achieve load balancing, you need to create multiple groups and have clients point to different gateways (GLBP (Gateway Load Balance Protocol) Also Cisco's proprietary protocol provides not only redundant gateway functionality but also load balancing between gateways. GLBPEs also consists of multiple routers forming a group and a virtual gateway is created. GLBPChoose an AVG (Avtive Virtual Gateway) , AVGEs is not responsible for forwarding data. AVGMost allocated4EINMACAddress a virtual gateway and run it on the computerARPUse at Reply to the request with a different MAC so that the computer actually sends the data to different routers for load balancing. imGLBPIn is the one who is really responsible for forwarding the dataAVF (Avtive Virtual Forawarder) , GLBPWill controlGLBPWhich router in the group is which? MAC address of the active router.

AVGChoice andHRSP, the choice of active routers is very similar, the router with the highest priority becomes AVG, Followed byAbckup AVG, and the rest are in the monitoring state. A GLBPE can only give a group AVG and a backup AVG, the gentlemanAVGFailed, backup AVGO on top of it. A router can beAVGwithAVF。AVFIs somethingMACActive router, that is, when the computer sends data to thisMACEs is received. If one particularMACIf the active router is faulty, the otherAVF will become theMACNew Active Router for RedundancyGLBPThe load balancing strategy can be based on different hosts, simply polling or balancing on the weight of the router. The default setting is the query method.

command

 

Router (config-if) # glbpgroup_number ip ip_address

Set the GLBP group number and the virtual IP address

Router (config-if)# glbp group_number  priority priority_value

Configure the priority of GLBP. If you don't set this item, the default priority is 100, the larger the value, the more priority it has as an active router

Router (config-if)glbp group_number preempt

With this setting, the router becomes the active router when the priority is highest.

Router (config-if)glbp group_number timer hello_time hold_Time

Set up the router hello_timemithold_time

Router (config-if)# glbpgroup_number

Authentication md5 key-string   password

Configure authentication passwords to prevent unauthorized devices from joining the GLBP group. The passwords of the same group must be consistent

3.GLBP configuration example


Number15-6 GLBP structure

IP address table

equipment

interface

IP address

Subnet mask

R1

Fa 0/0

192.168.12.1

255.255.255.0

Fa 0/1

192.168.123.1

255.255.255.0

R2

Fa 0/0

192.168.12.2

255.255.255.0

Fa 0/1

192.168.123.2

255.255.255.0

R3

Fa 0/1

192.168.123.3

255.255.255.0

Fa 0/0

172.16.1.1

255.255.255.0

PC1

NIC

192.168.12.100

255.255.255.0

PC2

NIC

172.16.1.100

255.255.255.0

Table 15-5 IP address table

(1) Step 1: Configure the IP address and routing protocol, etc.
R1 (config) # interface fa 0/0
R1 (config-if) # ip add 192.168.12.1 255.255.255.0
R1 (config-if) #no shut
R1 (config-if) #exit
R1 (config) # inter fa 0/1
R1 (config-if) # ip add 192.168.123.1 255.255.255.0
R1 (config-if) #no shut
R1 (config-if) #exit
R1 (config) # router rip
R1 (config-router) # network 192.168.12.0
R1 (config-router) # network 192.168.123.0
R1 (config-router) # passive-interface fa 0/0
R2 (config) # int fa 0/0
R2 (config-if) # ip add 192.168.12.2 255.255.255.0
R2 (config-if) #no shut
R2 (config-if) #exit
R2 (config) # int fa 0/1
R2 (config-if) # ip add 192.168.123.2 255.255.255.0
R2 (config-if) #no shut
R2 (config-if) #exit
R2 (config) # router rip
R2 (config-router) # network 192.168.12.0
R2 (config-router) # network 192.168.123.0
R2 (config-router) # passive-interface fa 0/0
R3 (config) # int fa 0/1
R3 (config-if) # ip add 172.16.1.1 255.255.255.0
R3 (config-if) #no shut
R3 (config-if) #exit
R3 (config) # int fa 0/0
R3 (config-if) # ip add 192.168.123.3 255.255.255.0
R3 (config-if) #no shut
R3 (config-if) #exit
R3 (config) # router rip
R3 (config-router) # network 192.168.123.0
R3 (config-router) # network 172.16.0.0
(2) Step 2: Configure glbp
R1 (config) # interface fa 0/0
R1 (config-if) # glbp 1 ip 192.168.12.254
// Create a glbp group similar to hsrp. The IP address of the virtual gateway is 192.168.12.254
R1 (config-if) # glbp 1 priority 200
// configure priority, the router with higher priority will be average, the default is 100.
R1 (config-if) # glbp 1 preempt
// Configure the average preference, otherwise it won't become average even if the priority is higher.
R1 (config-if) # glbp 1 authentication md5 key-string cisco
// Above the authentication is configured to prevent unauthorized device access
R2 (config) # int fa 0/0
R2 (config-if) # glbp 1 ip 192.168.12.254
// Similar to hsrp, create a glbp group and the IP address of the virtual gateway is 192.168.12.254
R2 (config-if) # glbp 1 priority 180
// configure priority, the router with higher priority will be average, the default is 100.
R2 (config-if) # glbp 1 preempt
// Configure the average preference, otherwise it won't become average even if the priority is higher.
R2 (config-if) # glbp 1 authentication md5 key-string cisco
// Above the authentication is configured to prevent unauthorized device access
(3) Step 3: View glbp information.
R1 # show glbp
FastEthernet0 / 0 - Group 1
State is active
1 state change, last state change 00:00:47
The virtual IP address is 192.168.12.254 // IP address of the virtual gateway
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.736 secs
Redirect time 600 sec, forwarder timeout 14400 sec
Authentication MD5, key-string
Preemption enabled, min delay 0 sec
Active is local // Explain that R1 is active on average
Standby is 192.168.12.2, Priority 180 (expires in 8.352 seconds) // Indicates R2 is a backup average


Priority 200 (configured)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
Group members: // The following shows the members in the glbp group
04c5.a43f.e4e0 (192.168.12.2) authenticated
04c5.a4b3.bba0 (192.168.12.1) local
There are 2 forwarders (1 active)
Forwarder 1
State is active
1 state change, last state change 00:00:36
The MAC address is 0007.b400.0101 (default) // One of the Macs of the virtual gateway means that R1 is the active router of 0007.b400.0101, i.e. when the computer is sending data to 0007.b400.0101. It is sent from R1. Receive and then forward data
Owner ID is 04c5.a4b3.bba0
Redirection enabled
Preemption enabled, min delay 30 sec
Active is local, weighting 100
Forwarder 2
State is lists
The MAC address is 0007.b400.0102 (learned) // Another Mac of the virtual gateway,
Owner ID is 04c5.a43f.e4e0
Redirection enabled, 599.744 sec remaining (maximum 600 sec)
Time to live: 14399.744 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.12.2 (primary), weighting 100 (expires in 10.656 sec)


R2 # show glbp
FastEthernet0 / 0 - Group 1
State is standby
1 state change, last state change 00:26:41
The virtual IP address is 192.168.12.254 // IP address of the virtual gateway
Hello time 3 sec, hold time 10 sec
Next hello sent in 1,056 secs
Redirect time 600 sec, forwarder timeout 14400 sec
Authentication MD5, key-string
Preemption enabled, min delay 0 sec
192.168.12.1 is active, priority 200 (expires in 8.896 seconds) // Indicates that R1 is active on average
Standby is local // Indicates R2 is a backup average
Priority 180 (configured)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
Group members: // The following shows the members in the glbp group
04c5.a43f.e4e0 (192.168.12.2) local
04c5.a4b3.bba0 (192.168.12.1) authenticated
There are 2 forwarders (1 active)
Forwarder 1
State is lists
The MAC address is 0007.b400.0101 (learned) // Another Mac of the virtual gateway,
Owner ID is 04c5.a4b3.bba0
Time to live: 14397.664 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.12.1 (primary), weighting 100 (expires in 10.368 sec)
Forwarder 2
State is active
1 state change, last state change 00:26:46
The MAC address is 0007.b400.0102 (default) // One of the Macs on the virtual gateway means that R2 is the active router of 0007.b400.0102, i.e. when the computer is sending data to 0007.b400.0102. It is sent from R2. Receive and then forward data
Owner ID is 04c5.a43f.e4e0
Preemption enabled, min delay 30 sec
Active is local, weighting 100


(4) Step 4: Check glbp's load balancing function
Configure the IP address on PC1 with the gateway pointing to 192.168.12.254 and do the following:
①Ping 172.16.1.100 on PC1, then use the arp -a command to display the gateway's mac address 192.168.12.254
C: \> arp -a
Interface: 192.168.12.100 --- 0x03
Internet Address Physical Address Type
192.168.12.254 00-07-b4-00-01-01 dynamic
// The above shows that the ARP request from PC1 gets the MAC of the gateway (192.168.1.254) as 00-07-b4-00-01-01
② Then use the arp -d command on PC1 to delete the Arp buffer table
③ Then ping 172.16.1.100 on PC1 and then use the arp -a command to see the gateway's mac address 192.168.12.254
C: \> arp -a
Interface; 192.168.1.100 --- 0x03
Internet Address Physical Address Type
192.168.12.254 00-07-b4-00-01-02 dynamic
// The above shows that the MAC of the gateway (192.168.1.254) obtained again by the ARP request from PC1 is 00-07-b4-00-01-02, i.e. when GLBP on the ARP request replies, it will reply with a different MAC each time to load balance.
【Description】
By default, GLBP's load balancing strategy is the query, which can be modified using the glbp 1 load balancing command under the interface with the following options:
Host dependent: balance based on the source MAC addresses of different hosts;
Round robin: query mode, ie every time an ARP query is responded to, an address is rotated.
weighted: The higher the router's weight distribution, the more likely it will be assigned.
(5) Step 5: Check the redundant function of GLBP
①First, use the "arp -a" command on PC1 to confirm the MAC address of 192.168.1.254 and to determine which router is actually forwarding the data in the current storage location. Here, the MAC address of 192.168.1.254 is 00-07-b4-00-01-01, which is R1 forwarding data.
Then ping PC2 continuously to PC1, connect the fa 0/0 interface to R1 and observe the communication situation from PC1:
C: \> ping –t 172.16.1.100
Reply from 172.16.1.100; bytes = 32 time <1ms TTL = 254
Reply from 172.16.1.100; bytes = 32 time <1ms TTL = 254
Reply from 172.16.1.100; bytes = 32 time <1ms TTL = 254
Request timed out.
Request timed out.
Reply from 172.16.1.100; bytes = 32 time <1ms TTL = 254
Reply from 172.16.1.100; bytes = 32 time <1ms TTL = 254
Reply from 172.16.1.100; bytes = 32 time <1ms TTL = 254

// It can be seen that after the failure of R1, other routers quickly take over and computer communication is only temporarily impaired. Therefore, GLBP not only has the load balancing capability, but also the redundancy capability.

In order to ensure the stability of the network and reduce the network downtime caused by the failure of network devices, OSI / RM, the second layer of the switch manufacturer, has evolved to STP as well as PVST, and other technologies to achieve redundant backup and load balancing of the switch. This is OSI / RM The third layer is daHSRP (Cisco Proprietary Agreement) and VRRP (IEEE standard). butHSRPwithVRRPUnder normal circumstances there is only the redundant backup function, but in order to achieve the load balancing function, only to have multiple backup groups, two or more virtual gateways so that the local area is created, the machine is configured with different gateways to the function of the Realize load balancing, which is more problematic in operation.

Developed by Cisco Gateway Load Balance Protocol (GLBP) technology, multiple routers form a backup group and each router MAC add addresses (up to four) to the backup group and become the virtual gateway MAC address group. On the local network PC machine request gateway ARP In response to this, the virtual gateway MAC address group MAC addresses reply in sequence, to achieve traffic according to the second level gateway MAC addresses go to different real routers to achieve load balancing.