为OSPFv2配置BFD
Prerequisites
OSPFv2 must be enabled.
ICMP must be disabled.
Procedure
Examples
这个例子显示了如何to enable BFD on all OSPFv2 interfaces.
switch#configswitch(config)#bfdswitch(config)#router ospf 1switch(config-ospf-1)#area 1switch(config-ospf-1)#bfd all-interfacesswitch(config-ospf-1)#exitswitch(config)router ospf 2switch(config-ospf-2)#area 2switch(config-ospf-2)#bfd all-interfacesswitch(config-ospf-2)#exitswitch(config)#interface 1/1/1switch(config-if)#no shutdownswitch(config-if)#ip address 192.168.1.1/24switch(config-if)#ip ospf 1 area 1switch(config-if)#exitswitch(config)#interface 1/1/2switch(config-if)#no shutdownswitch(config-if)#ip address 192.168.1.2/24switch(config-if)#ip ospf 2 area 2switch(config-if)#exitswitch(config)#exitswitch#show bfdAdmin status : Enabled Echo source IP : 2.2.2.2 Statistics: Total Number of Control Packets Transmitted : 42 Total Number of Control Packets Received : 42 Total Number of Control Packets Dropped : 0 Session Interface Source IP Destination IP Echo State Application ------- --------- --------------- --------------- -------- ---------- ----------- 1 1/1/1 192.168.1.1 100.100.100.101 Enabled Up OSPF 2 1/2/2 192.168.1.2 10.1.5.6 Enabled Up OSPF
这个例子显示了如何to enable BFD on a specific OSPFv2 interface.
switch#configswitch(config)#bfdswitch(config)#router ospf 1switch(config-ospf-1)#area 1switch(config-ospf-1)#exitswitch(config)#interface 1/1/1switch(config-if)#no shutdownswitch(config-if)#ip address 192.168.1.1/24switch(config-if)#ip ospf 1 area 1switch(config-if)#ip ospf bfdswitch(config-if)#exitswitch(config)#exitswitch#show bfd session 1BFD Session Information – Session 1 Min Tx Interval (sec) : 10 Min Rx Interval (sec) : 10 Min Echo Rx Interval (msec) : 700 Detect Multiplier : 3 Application : OSPF Local Discriminator : 1 Remote Discriminator : 1 Echo : Enabled Local Diagnostic : N/A Remote Diagnostic: N/A Flap count: 0 Internal state: Up Interface Source IP Destination IP State Pkt In Pkt Out Pkt Drop --------- --------------- --------------- ---------- -------- -------- -------- 1/1/1 192.168.1.1 100.100.100.101 Up 100 101 0