静态路由与BFD联动配置

1.拓扑图
链接:https://pan.baidu.com/s/1MQNDuHQMDoKzgRR09ttA0Q
提取码:8888
eNSP
链接:https://pan.baidu.com/s/1wP0vHim4yqVV0bc0wmzhFw
提取码:8888
在这里插入图片描述
SW1及SW2通过VLAN12实现三层对接。SW2的GE0/0/1接口连接着终端PC,该PC被规划在VLAN10中。
2.需求
a .在SW1/SW2上完成静态路由的配置,使得SW1能够访问PC。
b. 确保在SW1与SW2之间的链路发生故障、或者SW2发生故障的情况下,SW1能够感知并且将关于PC所在网段的静态路由从路由
表中撤销。
3.SW1的配置
display current-configuration

sysname SW1

vlan batch 12

bfd

interface Vlanif12
ip address 10.1.12.1 255.255.255.0

interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 12

interface NULL0

bfd bfd12 bind peer-ip 10.1.12.2
discriminator local 11
discriminator remote 22
commit

ip route-static 192.168.10.0 255.255.255.0 10.1.12.2 track bfd-session bfd12

return
4.SW2的配置
display current-configuration

sysname SW2

vlan batch 10 12

bfd

interface Vlanif1

interface Vlanif10
ip address 192.168.10.254 255.255.255.0

interface Vlanif12
ip address 10.1.12.2 255.255.255.0

interface MEth0/0/1

interface GigabitEthernet0/0/1
port link-type access
port default vlan 10

interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 12

interface NULL0

bfd bfd12 bind peer-ip 10.1.12.1
discriminator local 22
discriminator remote 11
commit

return
5.以查看BFD会话:
在这里插入图片描述
6.SW1和PC1互通
在这里插入图片描述
在这里插入图片描述
7.当链路故障时bfd失效(sw1的vlanif接口shutdown)
在这里插入图片描述
8.bfd从失效转生效(sw1的vlanif接口undo shutdown)
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_41235506/article/details/109546125