Huawei Network - Floating routing and VRRP principle

Content Highlights:

  • Floating routing

  • VRRP

A floating route:

1, when the number of link bandwidth difference is particularly large, we make high-bandwidth link becomes the primary link, low bandwidth becomes the backup link,

By adjusting the static routing priority to achieve link redundancy. The default priority is the priority value 60, the higher the priority.


2, how to make high-bandwidth link becomes the primary link

According to the election rules to adjust the routing of the routing of the pros and cons, so that high-bandwidth links better, generally adjust the priority.


3, routing the election rules

① Compared mask length, preferably longer

② routing priority, more preferably less

③ cost of the route, the smaller the more excellent



4, the route of the electoral process parameters in comparison  

① mask length: the longer the more precise mask segment, the mask preferably longer.

② routing priority pre: Different routing protocols have different priorities, the priority indicates the reliability of the router is learned in this way, the smaller the more excellent, 0 pre direct route.

③ route cost cost: the distance to the local router from the description of how far the target network, direct route cost is bit 0.


5, routing information matches top-down

Two, VRRP:

1, between a plurality of routers running,

Or more can be a virtual gateway IP address (virtual router);

Thereby realizing interworking between different network segments;

2, VRRP working process:

  • Running VRRP "plurality" VRRP packets between routers interaction, thereby selecting the most cattle a router, the router serves as the Master, the device after it is used to forward packets;

  • Master router has only one; other routers called backup routers;

  • Meanwhile, Master and Backup routers, will produce - a virtual router, which is a

Main: the virtual IP address with a priority (default 100, link is down by 10) is generally 120, an upper port and a lower port monitor 
apparatus: the virtual IP address with a priority (default 100, link is down by 10) is generally 115, You do not need to monitor the upper and lower mouth opening

Experimental topology

blob.png


Third, the experimental procedures

1, three switches sw1 configuration

<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##创建虚拟IP
[SW1-Vlanif10]vrrp vrid 1 priority 120##设定优先级为120
[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/1
[SW1-Vlanif10]vrrp vrid 1 track interface g0/0/2##监听自身的两个接口状态
[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
##配置优先级为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#
#配置默认路由

2、配置sw2三层交换机

<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

3、额配置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

4、配置sw3二层交换机

<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

5、测试网络连通性

PC1>ping 1.1.1.1 

Ping 1.1.1.1: 32 data bytes, Press Ctrl_C to breakFrom 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 breakFrom 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



Completion of the experiment

More Huawei Network, linux system-related, into my home page view.

Guess you like

Origin blog.51cto.com/14475876/2450840