浮动路由

浮动路由

undo t m
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[SW3]user-in con0
[SW3-ui-console0]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment…done.
[SW3]int g0/0/1
[SW3-GigabitEthernet0/0/1]p l t
[SW3-GigabitEthernet0/0/1]p t a v 10 20
[SW3-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW3-GigabitEthernet0/0/1]int g0/0/2
[SW3-GigabitEthernet0/0/2]p l t
[SW3-GigabitEthernet0/0/2]p t a v 10 20
[SW3-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW3-GigabitEthernet0/0/2]int e0/0/1
[SW3-Ethernet0/0/1]p l a
[SW3-Ethernet0/0/1]p d v 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]p l a
[SW3-Ethernet0/0/2]p d v 20
[SW3-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.

un t m
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW1
SW1]v b 10 20 100
Info: This operation may take a few seconds. Please wait for a moment…done.
[SW1]int g0/0/2
[SW1-GigabitEthernet0/0/2]p l t
[SW1-GigabitEthernet0/0/2]p t a v 10
[SW1-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[SW1-GigabitEthernet0/0/2]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l a
[SW1-GigabitEthernet0/0/1]p d v 100
[SW1-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[SW1-GigabitEthernet0/0/1]int vlanif 10
[SW1-Vlanif10]vrrp vrid ?
INTEGER<1-255> Virtual router identifier
[SW1-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.1
[SW1-Vlanif10]vrrp vrid 1 priority 120
[SW1-Vlanif10]vrrp vrid 1 ?
authentication-mode Specify password and authentication mode
preempt-mode Specify preempt mode
priority Specify priority
timer Specify timer
track Specify the track configuration
version-3 Specify the device to support V3 for VRRP
virtual-ip Specify virtual IP address

[SW1-Vlanif10]vrrp vrid 1 tr
[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
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

return
[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
[SW1-Vlanif20]q
[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
SW2同理
R1
un t m
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]user-in con 0
[R1-ui-console0]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 11.0.0.1 30
[R1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]display this

interface GigabitEthernet0/0/0
ip address 11.0.0.1 255.255.255.252

return
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 12.0.0.1 30
[R1-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R1-GigabitEthernet0/0/1]int loo 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]display ip rou