实验目的:
1、 了解浮动路由的配置方法
2、 掌握BFD的配置方法
网络拓扑如下:
实验配置如下:
交换机SW1的配置如下:
sysname SW1
#
vlan batch 10 20 40
#
stp disable //因为由环路需关闭生成树功能,不然SW2的GE0/0/1将阻塞掉,无法学习到192.168.30.0地址
#
bfd //全局模式下开启bfd
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
#
interface Vlanif40
ip address 192.168.40.1 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
#
bfd sw20 bind peer-ip 192.168.20.2 //进入bfd,取名为sw20并绑定对端交换机地址
discriminator local 1 //辨别本地标识为1
discriminator remote 2 //辨别远端标识为2
commit //提交配置
#
ip route-static 192.168.30.0 255.255.255.0 192.168.20.2 track bfd-session sw20
ip route-static 192.168.30.0 255.255.255.0 192.168.40.2 preference 80
交换机SW2的配置如下:
sysname SW2
#
vlan batch 20 30 40
#
stp disable //因为由环路需关闭生成树功能,不然SW2的GE0/0/1将阻塞掉,无法学习到192.168.10.0地址
#
Bfd //全局模式下开启bfd
#
interface Vlanif20
ip address 192.168.20.2 255.255.255.0
#
interface Vlanif30
ip address 192.168.30.254 255.255.255.0
#
interface Vlanif40
ip address 192.168.40.2 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 30
#
bfd sw20 bind peer-ip 192.168.20.1 //进入bfd,取名为sw20并绑定对端交换机地址
discriminator local 2 //辨别本地标识为2
discriminator remote 1 //辨别远端标识为1
commit //提交配置
#
ip route-static 192.168.10.0 255.255.255.0 192.168.20.1 track bfd-session sw20
ip route-static 192.168.10.0 255.255.255.0 192.168.40.1 preference 80
#
交换机SW2的配置如下:
sysname SW3
#
vlan batch 40
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 40
关键词:第三十三课 浮动路由+BFD双向链路检测设置案例