Load-shared interface backup configuration example
Network requirements
As shown in Figure 5:
Configure GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 on Router A to back up the primary interface GigabitEthernet 1/0/1.
Assign GigabitEthernet 1/0/2 higher priority than GigabitEthernet 1/0/3.
On the primary interface:
Specify the interface bandwidth used for traffic load calculation.
Set the upper and lower thresholds to 80 and 20, respectively.
Figure 5: Network diagram
Configuration procedure
Assign IP addresses to interfaces, as shown in Figure 5. (Details not shown.)
Configure routes:
# On Router A, configure routes to 192.168.2.0/24 through the primary and backup interfaces.
<RouterA> system-view [RouterA] ip route-static 192.168.2.0 24 gigabitethernet 1/0/1 1.1.1.2 [RouterA] ip route-static 192.168.2.0 24 gigabitethernet 1/0/2 2.2.2.2 [RouterA] ip route-static 192.168.2.0 24 gigabitethernet 1/0/3 3.3.3.2
# On Router B, configure routes to 192.168.1.0/24.
<RouterB> system-view [RouterB] ip route-static 192.168.1.0 24 gigabitethernet 1/0/1 1.1.1.1 [RouterB] ip route-static 192.168.1.0 24 gigabitethernet 1/0/2 2.2.2.1 [RouterB] ip route-static 192.168.1.0 24 gigabitethernet 1/0/3 3.3.3.1
On Router A, configure backup interfaces and traffic thresholds:
# Specify GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 to back up GigabitEthernet 1/0/1, and assign them with a priority of 30 and 20, respectively.
[RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] backup interface gigabitethernet 1/0/2 30 [RouterA-GigabitEthernet1/0/1] backup interface gigabitethernet 1/0/3 20
# Set the expected bandwidth to 10000 kbps on the primary interface.
[RouterA-GigabitEthernet1/0/1] bandwidth 10000
# Set the upper and lower thresholds to 80 and 20, respectively.
[RouterA-GigabitEthernet1/0/1] backup threshold 80 20
Verifying the configuration
# Display traffic statistics for load-shared interfaces.
[RouterA-GigabitEthernet1/0/1] display interface-backup statistics Interface: GigabitEthernet1/0/1 Statistics interval: 30 s Bandwidth: 10000000 bps PrimaryTotalIn: 102 bytes PrimaryTotalOut: 108 bytes PrimaryIntervalIn: 102 bytes PrimaryIntervalOut: 108 bytes Primary used bandwidth: 28 bps TotalIn: 102 bytes TotalOut: 108 bytes TotalIntervalIn: 102 bytes TotalIntervalOut: 108 bytes Total used bandwidth: 28 bps
The output shows that the upper traffic threshold has not been exceeded. All traffic is transmitted through the primary interface GigabitEthernet 1/0/1.
# Verify that both backup interfaces are in STANDBY state because the upper threshold has not been exceeded.
[RouterA-GigabitEthernet1/0/1] display interface-backup state Interface: GE1/0/1 UpDelay: 5 s DownDelay: 5 s Upper threshold: 80 Lower threshold: 20 State: UP Backup interfaces: GE1/0/2 Priority: 30 State: STANDBY GE1/0/3 Priority: 20 State: STANDBY
# Increase the incoming or outgoing traffic rate to be higher than 8000 kbps (80% of the specified bandwidth) on the primary interface. (Details not shown.)
# Verify that the backup interface GigabitEthernet 1/0/2 comes up to participate in traffic forwarding, because it has higher priority than GigabitEthernet 1/0/3.
[RouterA-GigabitEthernet1/0/1] display interface-backup state Interface: GE1/0/1 UpDelay: 5 s DownDelay: 5 s Upper threshold: 80 Lower threshold: 20 State: UP Backup interfaces: GE1/0/2 Priority: 30 State: UP GE1/0/3 Priority: 20 State: STANDBY