Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Huawei Network-- floating routing and VRRP principle

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Main points of content

1. Floating routing

2 、 VRRP

Matters needing attention

1. The default priority of floating route is 60, and the smaller the route is, the more priority it is. If it is the second route,

The priority is higher than the default, and the general configuration is above 60.

2. VRRP: (public agreement)

Running between multiple routers

You can virtualize one or more gateway IP addresses (virtual routers)

So as to realize the interworking between different network segments of the intranet.

3. The working process of VRRP:

● "multiple" routers running VRRP interact with each other through VRRP messages, thus selecting

The best router, as a Master router, will be used to forward packets in the future.

There is only one ● Master router; other routers are called backup routers.

● at the same time, Master and Backup routers, will produce a virtual router, that is, a

Master: equipped with virtual IP address, priority (default 100, link down minus 10) generally 120, listening upper and lower ports

Backup: equipped with virtual IP address, priority (default 100, link down minus 10) generally 115, no need to monitor upper and lower ports

Topological structure

Configuration step 1: configure a layer 3 switch named LSW1, sys [Huawei] sysname SW1 [SW1] vlan batch 10 20 100 [SW1] int g0max 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 g0max 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 10 [SW1] int vlanif10 [SW1-Vlanif10] ip add 192.168.10.10 24 [SW1-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.1 creating a virtual IP [SW1-Vlanif10] vrrp vrid 1 priority 120 # set the priority to 120 [SW1-Vlanif10] vrrp vrid 1 track Interface g0 vrrp vrid 1 [SW1-Vlanif10] vrrp vrid 1 track interface g0 monitoring its two interface states [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 115routes # configuration priority is 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 routes # configure default routing step 2: configure a layer 3 switch named LSW2 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 [SW2] int vlanif 0 / 2 [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 third step: configure the router sys [Huawei] sysname R1 [R1] int g0 ip add 0 / 0 [R1-GigabitEthernet0/0/0] ip add 11.0.0.1 [R1] -GigabitEthernet0/0/0] int g 0Accord 0 Accord 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.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 layer 2 switch Sys [Huawei] sysname SW3 [SW3] vlan batch 10 20 [SW3] int e0UniPot 1 [SW3-Ethernet0/0/1] port link-type access [SW3-Ethernet0/0/1] port default vlan 10 [SW3-Ethernet0/0 / 1] un shInfo: 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 shInfo: 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 un sh 0 [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: test network interoperability 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 msFrom 1.1.1.1: bytes=32 seq=2 ttl=254 time=47 msFrom 1.1.1.1: bytes=32 seq=3 ttl=254 time=47 msFrom 1.1.1.1: bytes=32 seq=4 ttl=254 time=62 msFrom 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 msPC2 > ping 1.1.1.1Ping 1.1.1.1: 32 data bytes Press Ctrl_C to breakFrom 1.1.1.1: bytes=32 seq=1 ttl=254 time=109 msFrom 1.1.1.1: bytes=32 seq=2 ttl=254 time=63 msFrom 1.1.1.1: bytes=32 seq=3 ttl=254 time=62 msFrom 1.1.1.1: bytes=32 seq=4 ttl=254 time=63 msFrom 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 = 4768 packet 109 ms Step 6: simulate the failure of the main link of the network Another link replaces the operation of [SW1] int g0 UniUniverse 0 [SW1-GigabitEthernet0/0/1] shutdown.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report