BFD+静态路由
AR1:
[AR1]interface GigabitEthernet0/0/0
ip address 10.0.11.1 255.255.255.0
[AR1]interface GigabitEthernet0/0/1
ip address 10.0.14.1 255.255.255.0
[AR1]bfd # 全局启用
[AR1]bfd 1 bind peer-ip 10.0.11.2 source-ip 10.0.11.1 auto # 编辑bfd条目1,使用ip地址作为检测手段,指定对端和本端ip,行为auto
commit
[AR1]ip route-static 0.0.0.0 0.0.0.0 10.0.11.2 track bfd-session 1 # 在静态路由上引用bfd条目
[AR1]ip route-static 0.0.0.0 0.0.0.0 10.0.14.2 preference 100 # 写另外
SW1:
[SW1]vlan batch 10 20
[SW1]interface Vlanif10
ip address 10.0.11.2 255.255.255.0
[SW1]interface Vlanif20
ip address 10.0.12.1 255.255.255.0
[SW1]interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
[SW1]interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 20
port trunk allow-pass vlan 2 to 4094
[SW1]bfd
[SW1]bfd 1 bind peer-ip 10.0.11.1 source-ip 10.0.11.2 auto
commit
[SW1]ip route-static 0.0.0.0 0.0.0.0 10.0.12.2
SW2:
[SW2]vlan batch 10 20
[SW2]interface Vlanif10
ip address 10.0.14.2 255.255.255.0
[SW2]interface Vlanif20
ip address 10.0.13.1 255.255.255.0
[SW2]interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
[SW2]interface GigabitEthernet0/0/2
port link-type trunk
port trunk pvid vlan 20
port trunk allow-pass vlan 2 to 4094
[SW2]ip route-static 0.0.0.0 0.0.0.0 10.0.13.2
AR2:
[AR2]interface GigabitEthernet0/0/0
ip address 10.0.13.2 255.255.255.0
[AR2]interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
[AR2]interface LoopBack0
ip address 114.114.114.114 255.255.255.255
ip route-static 10.0.11.0 255.255.255.0 10.0.12.1
ip route-static 10.0.14.0 255.255.255.0 10.0.13.1
BFD+OSPF
AR1:
[AR1]bfd # 全局启用bfd
[AR1]ospf 1 router-id 1.1.1.1
bfd all-interfaces enable # ospf启用bfd
area 0.0.0.0
[AR1]interface GigabitEthernet0/0/0
ip address 13.0.0.1 255.255.255.0
ospf enable 1 area 0.0.0.0
[AR1]interface GigabitEthernet0/0/1
ip address 11.0.0.1 255.255.255.0
ospf bfd enable # 接口下ospf调用bfd
ospf bfd min-tx-interval 300 min-rx-interval 300 # 修改bfd的检测间隔
ospf enable 1 area 0.0.0.0
AR2:
[AR2]bfd
[AR2]ospf 1 router-id 2.2.2.2
bfd all-interfaces enable
silent-interface GigabitEthernet0/0/2
area 0.0.0.0
[AR2]interface GigabitEthernet0/0/0
ip address 12.0.0.2 255.255.255.0
ospf enable 1 area 0.0.0.0
[AR2]interface GigabitEthernet0/0/1
ip address 11.0.0.2 255.255.255.0
ospf bfd enable
ospf bfd min-tx-interval 300 min-rx-interval 300
ospf enable 1 area 0.0.0.0
[AR2]interface GigabitEthernet0/0/2
ip address 172.16.0.2 255.255.255.0
ospf enable 1 area 0.0.0.0
AR3:
[AR3]bfd
[AR3]ospf 1 router-id 3.3.3.3
bfd all-interfaces enable
area 0.0.0.0
[AR3]interface GigabitEthernet0/0/0
ip address 13.0.0.3 255.255.255.0
ospf enable 1 area 0.0.0.0
[AR3]interface GigabitEthernet0/0/1
ip address 12.0.0.3 255.255.255.0
ospf enable 1 area 0.0.0.0
AR4:
[AR4]interface GigabitEthernet0/0/0
ip address 172.16.0.4 255.255.255.0
作者:Zleoco,如若转载,请注明出处:https://www.zleoco.com/?p=1647