网络拓扑
配置步骤
登录设备B,进行接口配置
[editinterfaces] user@B#setge-1/2/0unit0descriptionB->D user@B#setge-1/2/0unit0familyinetaddress172.16.1.1/24 user@B#setlo0unit57familyinetaddress10.0.0.1/32 user@B#setlo0unit57familyinetaddress10.0.0.2/32
在设备B上创建静态路由指定下一跳
[editrouting-options] user@B#setstaticroute192.168.47.0/24next-hop172.16.1.2
在设备B,上为静态路由创建bfd
[editrouting-options] user@B#setstaticroute192.168.47.0/24bfd-liveness-detectionminimum-interval1000 setrouting-optionsstaticroute192.168.47.0/24bfd-liveness-detectiondescriptionSite-xxx
在设备B上,配置跟踪bfd
[editprotocols] user@B#setbfdtraceoptionsfilebfd-trace user@B#setbfdtraceoptionsflagall
最后在设备B上,记得提交配置。
[edit] user@B#commit
现在,我们来设备D上,配置接口相关信息
[editinterfaces] user@D#setge-1/2/0unit1descriptionD->B user@D#setge-1/2/0unit1familyinetaddress172.16.1.2/24 user@D#setlo0unit2familyinetaddress192.168.47.5/32 user@D#setlo0unit2familyinetaddress192.168.47.6/32
在设备D上,创建静态路由和下一跳地址
[editrouting-options] user@D#setstaticroute0.0.0.0/0next-hop172.16.1.1
在设备D上,为静态路由配置BFD
[editrouting-options] user@D#setstaticroute0.0.0.0/0bfd-liveness-detectionminimum-interval1000
在设备D上,配置跟踪BFD
[editprotocols] user@D#setbfdtraceoptionsfilebfd-trace user@D#setbfdtraceoptionsflagall
最后,记得在设备D上提交配置
[edit] user@D#commit
检查状态
使用show bfd session extensive来查看bfd会话状态等信息。
user@B>showbfdsessionextensive DetectTransmit AddressStateInterfaceTimeIntervalMultiplier 172.16.1.2Uplt-1/2/0.03.0001.0003 ClientStatic,descriptionSite-xxx,TXinterval1.000,RXinterval1.000 Sessionuptime00:14:30 LocaldiagnosticNone,remotediagnosticNone RemotestateUp,version1 Replicated,routingtableindex172 Minasyncinterval1.000,minslowinterval1.000 AdaptiveasyncTXinterval1.000,RXinterval1.000 LocalminTXinterval1.000,minimumRXinterval1.000,multiplier3 RemoteminTXinterval1.000,minRXinterval1.000,multiplier3 Localdiscriminator2,remotediscriminator1 Echomodedisabled/inactive 1sessions,1clients Cumulativetransmitrate1.0pps,cumulativereceiverate1.0ppsuser@D>showbfdsessionextensive DetectTransmit AddressStateInterfaceTimeIntervalMultiplier 172.16.1.1Uplt-1/2/0.13.0001.0003 ClientStatic,TXinterval1.000,RXinterval1.000 Sessionuptime00:14:35 LocaldiagnosticNone,remotediagnosticNone RemotestateUp,version1 Replicated,routingtableindex170 Minasyncinterval1.000,minslowinterval1.000 AdaptiveasyncTXinterval1.000,RXinterval1.000 LocalminTXinterval1.000,minimumRXinterval1.000,multiplier3 RemoteminTXinterval1.000,minRXinterval1.000,multiplier3 Localdiscriminator1,remotediscriminator2 Echomodedisabled/inactive 1sessions,1clients Cumulativetransmitrate1.0pps,cumulativereceiverate1.0pps