Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Example: Configuring BFD for VCCV for Layer 2 Circuits

This example shows how to configure BFD for VCCV for Layer 2 circuits which enables faster detection of failure in the data path.


This example uses the following hardware and software components:

  • Two MX Series 5G Universal Routing Platforms

  • Junos OS Release 12.1 or later running on all devices


Starting with Junos OS Release 12.1, Bidirectional Forwarding Detection (BFD) support for virtual circuit connection verification (VCCV) allows you to configure a control channel for a pseudowire, in addition to the corresponding operations and management functions to be used over that control channel. BFD provides a low resource mechanism for the continuous monitoring of the pseudowire data path and for detecting data plane failures. This feature provides support for asynchronous mode BFD for VCCV as described in RFC 5885, Bidirectional Forwarding Detection (BFD) for the Pseudowire Virtual Circuit Connectivity Verification (VCCV). You can also use a ping to detect pseudowire failures. However, the processing resources required for a ping are greater than what is needed for BFD. In addition, BFD is capable of detecting data plane failure faster than VCCV ping. BFD for pseudowires is supported for Layer 2 circuits (LDP-based).

To configure BFD for VCCV for Layer 2 circuits, configure the oam configuration statement at the [edit protocols l2circuit neighbor address interface interface-name] hierarchy level. The control-channel configuration statement at the [edit routing-instances routing-instance-name protocols l2vpn oam] hierarchy level does not apply to Layer 2 circuit configurations.


In the topology, BFD for VCCV for Layer 2 circuits is configured on Device R0.


CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.



Configuring Device R0

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device R0:


Repeat this procedure for Device R1 after modifying the appropriate interface names, addresses, and any other parameters for the device.

  1. Configure graceful switchover redundancy.

  2. Configure the interfaces.

  3. Configure the nonstop routing option, the static route, and the router ID routing options.

  4. Configure the RSVP protocol.

  5. Configure the MPLS protocol.

  6. Configure the OSPF protocol.

  7. Configure the LDP protocol.

  8. Configure the virtual circuit ID for the neighbor of Layer 2 circuit protocols.

  9. Configure the oam attributes of the Layer 2 circuit protocol.


From configuration mode, confirm your configuration by entering the show chassis, show interfaces, show protocols, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

If you are done configuring the device, enter commit from configuration mode.


Verify that the configuration is working properly.

Verifying the Layer 2 Circuit Connections


Verify the connections in a Layer 2 Circuit.


From operational mode, run the show l2circuit connections command for Device R0.


The output shows the Layer 2 virtual circuit information from Device R0 to its neighbor.

Verifying the BFD Session


Verify the BFD session.


From operational mode, run the show bfd session command for Device R0.


The output shows the address, and the interface on which the BFD session is active. The state Up indicates that the BFD session is up. The BFD session has a time interval of 30 milliseconds to detect BFD control packets , the transmitting system has a time interval of 10 milliseconds to send BFD control packets, and the transmitting system determines the detection time by multiplying 3 with the time interval. Total number of active BFD sessions and total number of clients that are hosting active BFD sessions. Cumulative transmit rate indicates the total number of BFD control packets transmitted, per second, on all active sessions and cumulative receive rate indicates the total number of BFD control packets received, per second, on all active sessions.

Verifying Detailed BFD Session Information


Verify detailed BFD session information.


From operational mode, run the show bfd session extensive command for Device R0.


The output shows detailed information for the BFD session.