could you explain how the BFD Echo packet is forwarded between the neighbors?

RouterA -------------- RouterB

The echo packet's source IP is RouterA and destination IP is also RouterA. So when RouterB receives the packet it will forward it back to RouterA (using only CEF).

What if there is a switch between RouterA and RouterB?


As I know the echo packet uses RouterA as source MAC and RouterA as destination MAC. In this case the switch would send the packet back to RouterA.

Where am I wrong?


The destination IP address is the same as the source IP address with BFD Echo mode, check out this packet capture https://www.cloudshark.org/captures/ada0ef51d5f5


BFD operates on top of layer-3 and layer-2, so it is not concerned with IP or MAC addressing. In fact, a layer-2 protocol, e.g. PPP, between the routers may not use MAC addresses.

When a router sends BFD, including BFD Echo, to another router, it will use the layer-2 and layer-3 addresses of the other router as the destination layer-2 and layer-3 destination addresses of the frame and packet, respectively, but that really has nothing to do with BFD itself, which, in theory, is independent of the layer-2 and layer-3 protocols used to carry it.

When Router A sends BFD to Router B, it will use Router B's layer-2 address (possibly a MAC address) as the destination layer-2 address, and it will use Router B's IP address as the destination IP address. When Router B sends BFD to Router A, it will use Router A's layer-2 address (possibly a MAC address) as the destination layer-2 address, and it will use Router A's IP address as the destination IP address. It doesn't matter if the BFD sent is a Control or Echo packet. The underlying layer-2 and layer-3 protocols need to use the layer-2 and layer-3 destination addresses of the target router.

For instance, when a host with a web browser sends a request to a web server, the web server replies with the destination address of the requesting host, not its own address. BFD is the same way; it is the payload of the layer-3 protocol, which is the payload of the layer-2 protocol.

  • Hi Ron, thanks for the answer. I found multiple documentations that state BFD Echo packet uses the same source and destination IP so when the neighbor receives the echo packet it can forward the packet using the data plane. This way it need less processing power than a classic hello message.
    – human374
    Dec 2 '16 at 7:40
  • However this video confused me: youtube.com/watch?v=iv-vubxkhTI The trainer says that layer 2 uses the same source and destination MAC addresses, which doesn't seem to be right. This documentation however state different: ahmedmuhi.wordpress.com/2015/10/19/… Now I don't know which one is right... :)
    – human374
    Dec 2 '16 at 7:40
  • The layer-2 frames and layer-3 packets operate the same way they always do, and they will contain the destination addresses of the actual destination host. "BFD Echo packets are sent in an encapsulation appropriate to the environment. See the appropriate application documents for the specifics of particular environments." The actual contents of the BFD Echo itself are really undefined, and that is in RFC 5880, Bidirectional Forwarding Detection (BFD), 5. BFD Echo Packet Format:
    – Ron Maupin
    Dec 2 '16 at 14:28
  • "The payload of a BFD Echo packet is a local matter, since only the sending system ever processes the content. The only requirement is that sufficient information is included to demultiplex the received packet to the correct BFD session after it is looped back to the sender. The contents are otherwise outside the scope of this specification. Some form of authentication SHOULD be included, since Echo packets may be spoofed."
    – Ron Maupin
    Dec 2 '16 at 14:29
  • If there is a direct link between 2 routers, IP SRC and DST might be the same, and seems to be better when BFD is running on the Line Card, so forwarding the packet back is part of the packet normal processing. If, however and for example, a switched Ethernet is in use, IP SRC and DST cannot be the same, otherwise intermediate switche(s) will return it to source before the packet reach its desired destination. Reasonably, MAC SRC and DST are different in either case.
    – Jefferson
    Jul 4 '17 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.