on 04-20-2011 10:17 AM
BFD provides a low-overhead, short-duration method of detecting failures in the forwarding path between two adjacent routers, including the interfaces, data links, and forwarding planes. BFD is a detection protocol that you enable at the interface OR routing protocol levels. Cisco IOS-XR supports both asynchronous and ECHO mode, which depends on the sending of BFD control packets between two systems to activate and maintain BFD neighbor sessions between routers. Therefore, in order for a BFD session to be created, you must configure BFD on both systems (and BFD peers). Once BFD has been enabled on the interfaces OR at the router level for the appropriate routing protocols, a BFD session is created, BFD timers are negotiated, and the BFD peers will begin to send BFD control packets to each other at the negotiated interval if echo mode can be used, then after the session has transitioned to UP state, echo mode will begin.
BFD payload control packets are encapsulated in UDP packets, using destination port 3784 and source port 49152. On shared media, like Ethernet, BFD control packets are always sent as unicast packets to the BFD peer.
Echo packets are encapsulated in UDP packets, as well, using destination port 3785 and source port 3785.
In a nutshell, BFD provides fast BFD peer failure detection times independently of all media types, encapsulations, topologies, and routing protocols BGP, IS-IS, MPLS-TE and OSPF. By sending rapid failure detection notices to the routing protocols in the local router to initiate the routing table recalculation process, BFD reduces overall network convergence time. IOS-XR ASR9000 BFD implementation supports both Asynchronous and ECHO mode.
Note: IOS-XR does not support BFD Demand mode and also does not support BFD authentication as of this writing.)
Asynchronous mode is the primary mode of operation and is mandatory. Asynchronous mode without echo will engage various pieces of packet switching paths on local and remote systems. However, asynchronous mode with echo is usually known to provide slightly wider test coverage as echo packets are self-destined packets which traverse same packet switching paths as normal traffic on the remote system.
The control packets contain 2 interval values which we can tune in asynchronous mode
Hence the actual tx interval for a control packets in a particular session is set to the maximum of:
Local Desired Minimum Transmit Interval and Remote Required Minimum Receive Interval.
This means that even if a node can transmit control packets at very small interval, it must transmit at an interval which the other end can tolerate.
When BFD is running asynchronously without echo packets, here is the underlying process:
The echo mode, which is optional, is designed to test only the forwarding path (and not e.g. the host stack) on the remote system. It is used only when the session is up. IOS-XR Release 3.3.2 had added CLI to disable echo mode (to enable users to disable echo mode on routers or interfaces where BFS is used in conjunction with uRPF).
A node indicates whether it is willing or not to participate in echo mode via the “Required Min Echo RX Interval” field of control packets. A zero value indicates that the node is not willing to participate in echo mode and adjacent systems must not send echo packets to that node. The value of “Required Min Echo Receive Interval” is hard-coded to 1 milli-second. If echo mode is supported at each end, the actual echo tx interval for a session is the maximum of:
The echo failure detection interval for a session is set to the product of:
Actual echo tx interval for the session and Session detection multiplier
BFD echo packets are sent with the destination address set to the local interface address. This causes the other end to just loop back the echo packets through its forwarding path (just like any other “normal” data packet). Echo packets do not require any BFD or host-stack processing at the remote end, therefore the echo mode is truly testing only the forwarding path on the remote system. Since the sender of echo packets has (nearly) complete control of the response time, the echo mode can be used for more aggressive detection times. The payload of the echo packet is not specified since only the sender of the packet has to interpret the contents. Echo packets will contain the local discriminator and a sequence number (for stats).
To configure BFD on a router interface on Router 1 that is running Cisco IOS software, and use the bfd neighbor command to designate the IP address 192.0.2.1 of an interface as its BFD peer on Router 2. Router 2 is running Cisco IOS XR software and uses the router static command and address-family ipv4 unicast command to designate the path back to Router 1's interface with IP address 192.0.2.2.
Router# configure
Router(config)# interface GigabitEthernet8/1/0
Router(config-if)# description to-TestBed1 G0/0/0/0
Router(config-if)# ip address 192.0.1.1 255.255.255.0
Router(config-if)# bfd interval 100 min_rx 100 multiplier 3
Router(config-if)# bfd neighbor 192.0.1.1
RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# router static
RP/0/RSP0/CPU0:router(config-static)# address-family ipv4 unicast
RP/0/RSP0/CPU0:router(config-static-afi)# 10.10.10.10/32 192.0.2.2 bfd fast-detect
RP/0/RSP0/CPU0:router(config-static-afi)# exit
RP/0/RSP0/CPU0:router(config-static)# exit
RP/0/RSP0/CPU0:router(config)# interface GigabitEthernet0/0/0/0
RP/0/RSP0/CPU0:router(config-if)# ipv4 address 192.0.1.1 255.255.255.0
The following restrictions apply to BFD:
BFD is supported on bundled VLANS using static routing, IS-IS, and OSPF. When running a BFD session on a bundled VLAN interface, the BFD session is active as long as the VLAN bundle is up.
As long as the VLAN bundle is active, the following events do not cause the BFD session to fail:
For information on how to configure VLAN bundle visit the below url:
From Cisco IOS XR Release 4.0.1 onwards, the BFD feature supports BFD sessions on individual physical bundle member links to monitor Layer 3 connectivity on those links, rather than just at a single bundle member as in prior releases
When you run BFD on link bundles, you can run an independent BFD session on each underlying physical interface that is part of that bundle.
When BFD is running on a link bundle member, the following layers of connectivity are effectively tested as part of the interface state monitoring for BFD:
The BFD agent on each bundle member link monitors state changes on the link. BFD agents for sessions running on bundle member links communicate with a bundle manager. The bundle manager determines the state of member links and the overall availability of the bundle. The state of the member links contributes to the overall state of the bundle based on the threshold of minimum active links or minimum active bandwidth that is configured for that bundle.
BFD on Bundle Member Links: Example :
bfd
interface Bundle-Ether4
echo disable
!
interface GigabitEthernet0/0/0/2.3
echo disable
!
!
interface GigabitEthernet0/0/0/3 bundle id 1 mode active
interface GigabitEthernet0/0/0/4 bundle id 2 mode active
interface GigabitEthernet0/1/0/2 bundle id 3 mode active
interface GigabitEthernet0/1/0/3 bundle id 4 mode active
interface Bundle-Ether1
ipv4 address 192.168.1.1/30
bundle minimum-active links 1
!
interface Bundle-Ether1.1
ipv4 address 192.168.100.1/30
dot1q vlan 1001
!
interface Bundle-Ether2
bfd address-family ipv4 destination 192.168.2.2
bfd address-family ipv4 fast-detect
bfd address-family ipv4 min 83
bfd address-family ipv4 mul 3
ipv4 address 192.168.2.1/30
bundle minimum-active links 1
!
interface Bundle-Ether3
bfd address-family ipv4 destination 192.168.3.2
bfd address-family ipv4 fast-detect
bfd address-family ipv4 min 83
bfd address-family ipv4 mul 3
ipv4 address 192.168.3.1/30
bundle minimum-active links 1
!
interface Bundle-Ether4
bfd address-family ipv4 destination 192.168.4.2
bfd address-family ipv4 fast-detect
bfd address-family ipv4 min 83
bfd address-family ipv4 mul 3
ipv4 address 192.168.4.1/30
bundle minimum-active links 1
!
interface GigabitEthernet 0/0/0/2
ipv4 address 192.168.10.1/30
!
interface GigabitEthernet 0/0/0/2.1
ipv4 address 192.168.11.1/30
dot1q vlan 2001
!
interface GigabitEthernet 0/0/0/2.2
ipv4 address 192.168.12.1/30
dot1q vlan 2002
!
interface GigabitEthernet 0/0/0/2.3
ipv4 address 192.168.13.1/30
dot1q vlan 2003
!
router static
address-family ipv4 unicast
10.10.11.2/32 192.168.11.2 bfd fast-detect minimum-interval 250 multiplier 3
10.10.12.2/32 192.168.12.2 bfd fast-detect minimum-interval 250 multiplier 3
10.10.13.2/32 192.168.13.2 bfd fast-detect minimum-interval 250 multiplier 3
10.10.100.2/32 192.168.100.2 bfd fast-detect minimum-interval 250 multiplier 3
!
This section describes when bundle member link states are characterized as active or down, and their effect on the overall bundle status:
Note:
The configurable timers apply to the following situations:
The BFD system notifies the peer on the neighbor router that the configuration is removed. The BFD session is removed from the bundle manager without affecting other bundle member interfaces or the overall bundle state.
The BFD system notifies the bundle manager that the BFD configuration has been removed on the neighboring router and, if bfd timers nbr-unconfig is configured on the link, the timer is started. If the BFD configuration is removed on the local router before the timer expires, then the timer is stopped and the behavior is as expected for BFD configuration removal on the local router.
If the timer expires, then the behavior is the same as for a BFD session DOWN notification.
Removing a member link from a bundle causes the bundle member to be removed ungracefully. The BFD session is deleted and BFD on the neighboring router marks the session DOWN rather than NBR_CONFIG_DOWN.
Whenever a member's state changes, the bundle manager determines if the number of active members is less than the minimum number of active links threshold. If so, then the bundle is placed, or remains, in DOWN state. Once the number of active links reaches the minimum threshold then the bundle returns to UP state.
Note:
Description: PROT_IF_DOWN messages are generated before PROT_BFD_SESSION_DOWN fast-protect messages. Therefore, on bundle interfaces with applications that have registered both PROT_IF_DOWN and PROT_BFD_SESSION_DOWN fast-protect events, you should plan to trigger necessary actions based on receipt of PROT_IF_DOWN fast-protect events.
http://www.cisco.com/en/US/products/ps5845/prod_command_reference_list.html
---------------------------------------------------------------------------------------------------------------------------------
Written By-
Network Consulting Engineer
Advanced Services
Cisco Systems
What are commands when convert this command to XR?
interface GigabitEthernet8/1/0
bfd interval 500 min_rx 100 multiplier 3
Thank you very much.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: