本文主要是介绍VRRP+MSTP+BFD,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、组网
二、要求
PC6(vlan 10内PC)访问1.1.1.1走JR-1——CORE1——MSR到1.1.1.1
PC7(vlan 20内PC)访问1.1.1.1走JR-2——CORE2——MSR到1.1.1.1
链路故障时切换路线,来回路径一致
三、配置步骤
SR
bfd echo-source-ip 10.10.10.10
#
track 1 bfd echo interface GigabitEthernet0/0 remote ip 172.16.1.2 local ip 172.16.1.1
#
track 2 bfd echo interface GigabitEthernet0/1 remote ip 172.16.1.6 local ip 172.16.1.5ip unreachables enableip ttl-expires enable
#
interface LoopBack0ip address 1.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0port link-mode routecombo enable copperip address 172.16.1.1 255.255.255.252
#
interface GigabitEthernet0/1port link-mode routecombo enable copperip address 172.16.1.5 255.255.255.252ip route-static 10.133.10.0 24 172.16.1.2 track 1ip route-static 10.133.10.0 24 172.16.1.6 preference 65ip route-static 10.133.20.0 24 172.16.1.6 track 2ip route-static 10.133.20.0 24 172.16.1.2 preference 65
CORE1
bfd echo-source-ip 10.10.10.10
#
track 1 bfd echo interface GigabitEthernet1/0/5 remote ip 172.16.1.1 local ip 172.16.1.2ip unreachables enableip ttl-expires enable#dhcp enablevlan 10
#
vlan 20
#
stp region-configurationregion-name h3crevision-level 10instance 10 vlan 10instance 20 vlan 20active region-configuration
#stp instance 10 root primarystp instance 20 root secondarystp global enable
#
dhcp server ip-pool 13310gateway-list 10.133.10.254network 10.133.10.0 mask 255.255.255.0address range 10.133.10.1 10.133.10.125dns-list 223.5.5.5expired day 0 hour 6
#
dhcp server ip-pool 13320gateway-list 10.133.20.254network 10.133.20.0 mask 255.255.255.0address range 10.133.20.1 10.133.20.125dns-list 223.5.5.5expired day 0 hour 6
#
interface Bridge-Aggregation1port link-type trunkport trunk permit vlan allinterface Vlan-interface10ip address 10.133.10.252 255.255.255.0vrrp vrid 1 virtual-ip 10.133.10.254vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode delay 5vrrp vrid 1 track 1 priority reduced 40dhcp server apply ip-pool 13310
#
interface Vlan-interface20ip address 10.133.20.252 255.255.255.0vrrp vrid 1 virtual-ip 10.133.20.254vrrp vrid 1 preempt-mode delay 5dhcp server apply ip-pool 13320interface GigabitEthernet1/0/5port link-mode routecombo enable fiberip address 172.16.1.2 255.255.255.252
#
interface GigabitEthernet1/0/1port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiberport link-aggregation group 1
#
interface GigabitEthernet1/0/2port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiberport link-aggregation group 1interface GigabitEthernet1/0/3port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
#
interface GigabitEthernet1/0/4port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
CORE2
bfd echo-source-ip 11.11.11.11
#
track 1 bfd echo interface GigabitEthernet1/0/5 remote ip 172.16.1.5 local ip 172.16.1.6
#ip unreachables enableip ttl-expires enable
#dhcp enablevlan 10
#
vlan 20
#
stp region-configurationregion-name h3crevision-level 10instance 10 vlan 10instance 20 vlan 20active region-configuration
#stp instance 10 root secondarystp instance 20 root primarystp global enable
#
dhcp server ip-pool 13310gateway-list 10.133.10.254network 10.133.10.0 mask 255.255.255.0address range 10.133.10.126 10.133.10.250dns-list 223.5.5.5expired day 0 hour 6
#
dhcp server ip-pool 13320gateway-list 10.133.20.254network 10.133.20.0 mask 255.255.255.0address range 10.133.20.126 10.133.20.250dns-list 223.5.5.5expired day 0 hour 6
#
interface Bridge-Aggregation1port link-type trunkport trunk permit vlan all
#
interface Vlan-interface10ip address 10.133.10.253 255.255.255.0vrrp vrid 1 virtual-ip 10.133.10.254vrrp vrid 1 preempt-mode delay 5dhcp server apply ip-pool 13310
#
interface Vlan-interface20ip address 10.133.20.253 255.255.255.0vrrp vrid 1 virtual-ip 10.133.20.254vrrp vrid 1 priority 120vrrp vrid 1 preempt-mode delay 5vrrp vrid 1 track 1 priority reduced 40dhcp server apply ip-pool 13320
#
interface GigabitEthernet1/0/5port link-mode routecombo enable fiberip address 172.16.1.6 255.255.255.252
#
interface GigabitEthernet1/0/1port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiberport link-aggregation group 1
#
interface GigabitEthernet1/0/2port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiberport link-aggregation group 1
#
interface GigabitEthernet1/0/3port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
#
interface GigabitEthernet1/0/4port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
JR-1
#ip unreachables enableip ttl-expires enablevlan 10
#
vlan 20
#
stp region-configurationregion-name h3crevision-level 10instance 10 vlan 10instance 20 vlan 20active region-configurationinterface GigabitEthernet1/0/1port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
#
interface GigabitEthernet1/0/2port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
#
interface GigabitEthernet1/0/3port link-mode bridgeport access vlan 10combo enable fiberstp edged-port
JR-2
#ip unreachables enableip ttl-expires enablevlan 10
#
vlan 20
#
stp region-configurationregion-name h3crevision-level 10instance 10 vlan 10instance 20 vlan 20active region-configuration
#stp global enable
#
interface GigabitEthernet1/0/1port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
#
interface GigabitEthernet1/0/2port link-mode bridgeport link-type trunkport trunk permit vlan allcombo enable fiber
#
interface GigabitEthernet1/0/3port link-mode bridgeport access vlan 20combo enable fiberstp edged-port
四、查看
PC6 IP地址
PC6访问1.1.1.1
关闭核心交换机的1/0/5
线路已切换
五、注意点
# 配置 BFD echo 报文方式的 Source IP,IP 地址可以任意指定,不要与实际接口地址相同。
bfd echo-source-ip 10.10.10.10
这篇关于VRRP+MSTP+BFD的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!