标签:com bit lin stat 访问 vlan 通过 priority inter
组网需求
? ? Host A 需要访问 Internet 上的 Host B,Host A 的缺省网关为 10.1.1.111/24;
? ? 当 Switch A 正常工作时,Host A 发送给 Host B 的报文通过 Switch A 转发;当 Switch A 出现
故障时,Host A 发送给 Host B 的报文通过 Switch B 转发。
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port gigabitethernet 1/0/11
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 10.1.1.1 255.255.255.0
[SwitchA-Vlan-interface2]quit
[SwitchA] vlan 3
[SwitchA-vlan3] port gigabitethernet 1/0/13
[SwitchA-vlan3] quit
[SwitchA] interface vlan-interface 3
[SwitchA-Vlan-interface3] ip address 10.1.3.1 255.255.255.0
[SwitchA-Vlan-interface3]quit
[SwitchA]ip route-static 0.0.0.0 0 10.1.3.2
[SwitchA]inter vlan 2
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.111
为 Master 负责转发流量。
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
Switch A 正常工作,就由 Switch A 负责转发流量。为了避免频繁地进行状态切换,配置抢占延迟时
间为 5 秒。
[SwitchA-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500
(2) 配置 Switch B
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-Vlan2] port gigabitethernet 1/0/12
[SwitchB-vlan2] quit
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 10.1.1.2 255.255.255.0
[SwitchB-Vlan-interface2]quit
[SwitchB] vlan 3
[SwitchB-vlan3] port gigabitethernet 1/0/14
[SwitchB-vlan3] quit
[SwitchB] interface vlan-interface 3
[SwitchB-Vlan-interface3] ip address 10.1.4.1 255.255.255.0
[SwitchB-Vlan-interface3]quit
[SwitchB]ip route-static 0.0.0.0 0 10.1.4.2
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.111
[SwitchB-Vlan-interface2] vrrp vrid 1 priority 100
[SwitchB-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500
(3) 配置 Switch C
<SwitchC> system-view
[SwitchC] inter g 1/0/13
[SwitchC-GigabitEthernet1/0/13]port link-mode route
[SwitchC-GigabitEthernet1/0/13]ip add 10.1.3.2 24
[SwitchC-GigabitEthernet1/0/13]undo shut
[SwitchC-GigabitEthernet1/0/13]quit
[SwitchC] inter g 1/0/14
[SwitchC-GigabitEthernet1/0/14]port link-mode route
[SwitchC-GigabitEthernet1/0/14]ip add 10.1.4.2 24
[SwitchC-GigabitEthernet1/0/14]undo shut
[SwitchC-GigabitEthernet1/0/14]quit
[SwitchC] vlan 2
[SwitchC-Vlan2] port gigabitethernet 1/0/1
[SwitchC-vlan2] quit
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ip address 10.1.2.2 255.255.255.0
[SwitchC-Vlan-interface2]quit
[SwitchC]ip route 10.1.1.0 24 10.1.3.1
[SwitchC]ip route 10.1.1.0 24 10.1.4.1
标签:com bit lin stat 访问 vlan 通过 priority inter
原文地址:https://blog.51cto.com/14221438/2405650