Huawei Network - Floating Routing and VRRP Principle

Keywords: network

Content Essentials

1. Floating Routing
2,VRRP

Matters needing attention

1. Floating routes default to a priority of 60, the smaller the priority, if the second route
Priority is larger than default, generally more than 60 configurations

2. VRRP: (Public Agreement)
Running between multiple routers,
One or more gateway IP addresses (virtual routers) can be virtualized;
In order to achieve the interconnection between different segments of the intranet;

3. The working process of VRRP:
Separate "multiple" routers running VRRP through VRRP message interaction
Out of the best router to use as a Master router, and then use this device to forward packets;
Master routers, only one; other routers are called backup routers;
The Master and Backup routers, at the same time, produce a virtual router, that is, a router

Master: with virtual IP address, priority (default 100, link down minus 10) general 120, listening upper and lower ports
Ready: with virtual IP address, priority (default 100, link down minus 10) general 115, no need to listen on upper and lower ports

topological structure

Configuration steps

Step 1: Configure a three-layer switch named LSW1

<SW1>sys
[Huawei]sysname SW1
[SW1]vlan batch 10 20 100
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk 
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all 
[SW1-GigabitEthernet0/0/2]un sh
[SW1-GigabitEthernet0/0/2]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 100
[SW1-GigabitEthernet0/0/1]un sh
[SW1-GigabitEthernet0/0/1]dis this
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 100
#

[SW1]int vlanif10
[SW1-Vlanif10]ip add 192.168.10.10 24   
[SW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
##Create virtual IP
[SW1-Vlanif10]vrrp vrid 1 priority 120
##Set priority to 120
[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/1
[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/2
##Listen for two interface states of itself
[SW1-Vlanif10]dis this
#
interface Vlanif10
 ip address 192.168.10.10 255.255.255.0
 vrrp vrid 1 virtual-ip 192.168.10.1
 vrrp vrid 1 priority 120
 vrrp vrid 1 track interface GigabitEthernet0/0/1
 vrrp vrid 1 track interface GigabitEthernet0/0/2
#

[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 192.168.20.10 24
[SW1-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[SW1-Vlanif20]vrrp vrid 2 priority 115
##Configuration priority 115
[SW1]int vlanif 100
[SW1-Vlanif100]ip add 11.0.0.2 30
[SW1-Vlanif100]q
[SW1]ip route-static 0.0.0.0 0.0.0.0 11.0.0.1
##Configure default routes

Step 2: Configure a three-layer switch named LSW2

<Huawei>sys
[Huawei]sysname SW2 
[SW2]vlan batch 10 20 100
[SW2]int g0/0/2
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW2-GigabitEthernet0/0/2]un sh
[SW2-GigabitEthernet0/0/2]int g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type access
[SW2-GigabitEthernet0/0/1]port default vlan 100
[SW2-GigabitEthernet0/0/1]un sh
[SW2-GigabitEthernet0/0/1]int vlanif 10
[SW2-Vlanif10]ip add 192.168.10.20 24
[SW2-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[SW2-Vlanif10]vrrp vrid 1 priority 115
[SW2-Vlanif10]int vlanif 20
[SW2-Vlanif20]ip add 192.168.20.20 24
[SW2-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.1
[SW2-Vlanif20]vrrp vrid 2 priority 120
[SW2-Vlanif20]vrrp vrid 2 track interface g0/0/1
[SW2-Vlanif20]vrrp vrid 2 track interface g0/0/2
[SW2]int vlanif 100
[SW2-Vlanif100]ip add 12.0.0.2 30
[SW2-Vlanif100]q    
[SW2]ip route-static 0.0.0.0 0.0.0.0 12.0.0.1

Step 3: Configure the router for device name R1

<Huawei>sys
[Huawei]sysname R1
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 11.0.0.1 30
[R1-GigabitEthernet0/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.0.0.1 30
[R1-GigabitEthernet0/0/1]un sh 
[R1-GigabitEthernet0/0/0]int loop 0
[R1-LoopBack0]ip add 1.1.1.1 24
[R1-LoopBack0]q
[R1]ip route-static 192.168.10.0 24 11.0.0.2
[R1]ip route-static 192.168.10.0 24 12.0.0.2 preference 70
[R1]ip route-static 192.168.20.0 24 12.0.0.2 
[R1]ip route-static 192.168.20.0 24 11.0.0.2 preference 70

Step 4: Configure the Layer 2 switch for the device name LSW3

<Huawei>sys
[Huawei]sysname sw3
[SW3]vlan batch 10 20 
[SW3]int e0/0/1
[SW3-Ethernet0/0/1]port link-type access 
[SW3-Ethernet0/0/1]port default vlan 10
[SW3-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW3-Ethernet0/0/1]int e0/0/2
[SW3-Ethernet0/0/2]port link-type access    
[SW3-Ethernet0/0/2]port default vlan 20
[SW3-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[SW3-Ethernet0/0/2]int g0/0/1
[SW3-GigabitEthernet0/0/1]port link-type trunk  
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[SW3-GigabitEthernet0/0/1]un sh
[SW3-GigabitEthernet0/0/1]int g0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk 
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan all 
[SW3-GigabitEthernet0/0/2]un sh 

Step 5: Testing network interoperability

PC1>ping 1.1.1.1 

Ping 1.1.1.1: 32 data bytes, Press Ctrl_C to break
From 1.1.1.1: bytes=32 seq=1 ttl=254 time=93 ms
From 1.1.1.1: bytes=32 seq=2 ttl=254 time=47 ms
From 1.1.1.1: bytes=32 seq=3 ttl=254 time=47 ms
From 1.1.1.1: bytes=32 seq=4 ttl=254 time=62 ms
From 1.1.1.1: bytes=32 seq=5 ttl=254 time=63 ms

--- 1.1.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 47/62/93 ms

PC2>ping 1.1.1.1

Ping 1.1.1.1: 32 data bytes, Press Ctrl_C to break
From 1.1.1.1: bytes=32 seq=1 ttl=254 time=109 ms
From 1.1.1.1: bytes=32 seq=2 ttl=254 time=63 ms
From 1.1.1.1: bytes=32 seq=3 ttl=254 time=62 ms
From 1.1.1.1: bytes=32 seq=4 ttl=254 time=63 ms
From 1.1.1.1: bytes=32 seq=5 ttl=254 time=47 ms

--- 1.1.1.1 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 47/68/109 ms

Step 6: Analog the main link failure of a line network and replace it with another link

[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]shutdown

Posted by bladecatcher on Mon, 11 Nov 2019 20:11:57 -0800