CFM Configuration

Configuring Connectivity Fault Management

To enable the connectivity fault management feature, you need to configure a CFM session.

Creating a CFM Session

OAM CFM supports both point-to-point and point-to-multipoint sessions.

Syntax:

set oam cfm session <session-name> <attribute> <value>

Attribute Description

continuity-check-interval

Specify continuity check interval time (in seconds). Supported intervals are: 1s, 10s and 100ms. Default value is 1 second.

interface

Logical interface name.

level

Specify the CFM level. Allowed range: 0 - 7.

local-mep

Specify the local end-point identifier. Range: 1-8191.

maintenance-association

Maintenance association name.

maintenance-domain

Maintenance domain name.

remote-mep

Remote end-point identifier. Range: 1-8191.

api  To access the RESTCONF API that corresponds to this CLI, click here.

Example: Point-to-point CFM session configuration

This following configuration defines two CFM sessions on two different interfaces. The sessions, named CFM_DEFAULT_LINK1 and CFM_DEFAULT_LINK2, use the same maintenance domains and different maintenance associations where the domain level is set to 2. The continuity-check interval is configured at 1 second. The continuity check messages (CCMs) are sent every second to verify the link connectivity.

The local MEP is specified as '1000' for CFM_DEFAULT_LINK1 and '1001' for CFM_DEFAULT_LINK2. The remote MEP values are set to '2000' for CFM_DEFAULT_LINK1 and '2001' for CFM_DEFAULT_LINK2 that indicates the remote endpoint for the link validation.

The local MEPs sends CCM messages every second to the remote MEPs. If no CCMs are received from the remote MEPs until CCM threshold (3.5 * CCM interval), it indicates a link fault and CFM session state is marked down.

set oam cfm session CFM_DEFAULT_LINK1
set oam cfm session CFM_DEFAULT_LINK1 level 2
set oam cfm session CFM_DEFAULT_LINK1 maintenance-domain MD_BNG
set oam cfm session CFM_DEFAULT_LINK1 maintenance-association MA_DEFAULT_100
set oam cfm session CFM_DEFAULT_LINK1 continuity-check-interval 1s
set oam cfm session CFM_DEFAULT_LINK1 local-mep 1000
set oam cfm session CFM_DEFAULT_LINK1 remote-mep 2000
set oam cfm session CFM_DEFAULT_LINK1 interface ifl-0/0/0/100
set oam cfm session CFM_DEFAULT_LINK2
set oam cfm session CFM_DEFAULT_LINK2 level 2
set oam cfm session CFM_DEFAULT_LINK2 maintenance-domain MD_BNG
set oam cfm session CFM_DEFAULT_LINK2 maintenance-association MA_DEFAULT_200
set oam cfm session CFM_DEFAULT_LINK2 continuity-check-interval 1s
set oam cfm session CFM_DEFAULT_LINK2 local-mep 1001
set oam cfm session CFM_DEFAULT_LINK2 remote-mep 2001
set oam cfm session CFM_DEFAULT_LINK2 interface ifl-0/0/1/200
supervisor@rtbrick.net: cfg> show config oam cfm session
{
  "rtbrick-config:session": [
    {
      "name": "CFM_DEFAULT_LINK1",
      "level": 2,
      "maintenance-domain": "MD_BNG",
      "maintenance-association": "MA_DEFAULT_100",
      "continuity-check-interval": "1s",
      "local-mep": 1000,
      "remote-mep": 2000,
      "interface": "ifl-0/0/0/100"
    },
    {
      "name": "CFM_DEFAULT_LINK2",
      "level": 2,
      "maintenance-domain": "MD_BNG",
      "maintenance-association": "MA_DEFAULT_200",
      "continuity-check-interval": "1s",
      "local-mep": 1001,
      "remote-mep": 2001,
      "interface": "ifl-0/0/1/200"
    }
  ]
}

To see related show commands and output, see Show OAM CFM.

Example 2: Point-to-Multipoint CFM Session configuration

The following is an example configuration that shows Point-to-Multipoint CFM sessions on a single interface, that is ifl-0/0/5/0. With this configuration, the interface ifl-0/0/5/0 can run multiple CFM sessions. Each session is configured with a common local MEP (2000) and different remote MEPs (3000 and 4000). It allows the local endpoint to monitor connectivity with multiple remote endpoints on a single interface.

set oam cfm session CFM_R3
set oam cfm session CFM_R3 level 2
set oam cfm session CFM_R3 maintenance-domain BNG
set oam cfm session CFM_R3 maintenance-association MA_BNG
set oam cfm session CFM_R3 continuity-check-interval 1s
set oam cfm session CFM_R3 local-mep 2000
set oam cfm session CFM_R3 remote-mep 3000
set oam cfm session CFM_R3 interface ifl-0/0/5/0
set oam cfm session CFM_R4
set oam cfm session CFM_R4 level 2
set oam cfm session CFM_R4 maintenance-domain BNG
set oam cfm session CFM_R4 maintenance-association MA_BNG
set oam cfm session CFM_R4 continuity-check-interval 1s
set oam cfm session CFM_R4 local-mep 2000
set oam cfm session CFM_R4 remote-mep 4000
set oam cfm session CFM_R4 interface ifl-0/0/5/0

Example:

{
  "rtbrick-config:cfm": {
    "session": [
      {
        "name": "CFM_P2MP_R3",
        "level": 2,
        "maintenance-domain": "BNG",
        "maintenance-association": "MA_BNG",
        "continuity-check-interval": "1s",
        "local-mep": 2000,
        "remote-mep": 3000,
        "interface": "ifl-0/0/5/0"
      },
      {
        "name": "CFM_P2MP_R4",
        "level": 2,
        "maintenance-domain": "BNG",
        "maintenance-association": "MA_BNG",
        "continuity-check-interval": "1s",
        "local-mep": 2000,
        "remote-mep": 4000,
        "interface": "ifl-0/0/5/0"
      }
    ]
  }
}

To see related show commands and output, see Show OAM CFM.

Enabling Nexthop Tracking

You can enable Nexthop tracking using the following commands and options.

Syntax:

set instance <instance-name> oam cfm track <session-name> [nexthop4 | nexthop6] <ip-address>

Attribute Description

<instance-name>

Name of the instance.

<session>

Specify the session name.

[nexthop4 | nexthop6]

Specify nexthop4 to trace ipv4 nexthop and specify nexthop6 to track ipv6 nexthop.

api  To access the RESTCONF API that corresponds to this CLI, click here.

Example:

The following configuration defines nexthop tracking using CFM sessions. The sessions, CFM_DEFAULT_LINK1 and CFM_DEFAULT_LINK2 are linked to a specific set of next-hop addresses, including both IPv4 and IPv6 addresses. If a CFM session goes down, all the associated next-hops will be considered as unreachable and the routes that uses these next-hops are made unavailable in the forwarding information base.

set instance default oam cfm track CFM_DEFAULT_LINK1
set instance default oam cfm track CFM_DEFAULT_LINK1 nexthop4 12.0.1.2
set instance default oam cfm track CFM_DEFAULT_LINK1 nexthop4 182.168.0.20
set instance default oam cfm track CFM_DEFAULT_LINK1 nexthop6 182:168::20
set instance default oam cfm track CFM_DEFAULT_LINK1 nexthop6 fe80::7810:2
set instance default oam cfm track CFM_DEFAULT_LINK2
set instance default oam cfm track CFM_DEFAULT_LINK2 nexthop4 12.1.1.2
set instance default oam cfm track CFM_DEFAULT_LINK2 nexthop4 182.168.0.20
set instance default oam cfm track CFM_DEFAULT_LINK2 nexthop6 182:168::20
set instance default oam cfm track CFM_DEFAULT_LINK2 nexthop6 fe80::7810:2
supervisor@rtbrick.net: cfg> show config instance default oam cfm
{
  "rtbrick-config:cfm": {
    "track": [
      {
        "session": "CFM_DEFAULT_LINK1",
        "nexthop4": [
          "12.0.1.2",
          "182.168.0.20"
          ],
        "nexthop6": [
          "182:168::20",
          "fe80::7810:2"
          ]
      },
      {
        "session": "CFM_DEFAULT_LINK2",
        "nexthop4": [
          "12.1.1.2",
          "182.168.0.20"
          ],
        "nexthop6": [
          "182:168::20",
          "fe80::7810:2"
          ]
      }
    ]
  }
}

CFM Ping Commands

RBFS supports CFM ping commands to test layer 2 connectivity to remote Maintenance End Points (MEPs) or remote MAC addresses. This command allows you to configure the maintenance domain, MA name, level, interface, packet count, and interval to troubleshoot and validate connectivity in CFM-enabled Ethernet networks.

Syntax:

ping cfm remote-mac <mac> interface <interface> <option>
ping cfm remote-mep [1 - 8191] domain <domain> ma-name <ma-name> <option>

  • When using the remote-mep option, the domain and ma-name parameters are mandatory. All other parameters are optional.

  • When using the remote-mac option, the interface parameter is mandatory. All other parameters are optional.

The following table provides command options and descriptions.

Option Description

remote-mac <mac>

Specifies the destination remote MAC address for the CFM ping operation. For remote-mac, the interface parameter is mandatory. All other parameters are optional.

count [1 - 65535]

Specifies the number of CFM ping packets to transmit. The default value is implementation-defined. Range 1 - 65535.

interface <interface>

Specifies the outgoing interface on which to send the CFM ping packets.

interval [0.001 - 60.000]

Specifies the interval, in seconds, between consecutive CFM ping packets. Range 0.001 - 60.000 seconds.

level [0 - 7]

Specifies the Maintenance Domain (MD) level to use for the CFM ping operation. Range 0 - 7. Default: 2.

remote-mep

Specifies the destination remote Maintenance End Point (MEP) ID for the CFM ping operation. For remote-mep, the domain and ma-name parameters are mandatory. All other parameters are optional. Range 1 - 8191.

domain <domain>

Specifies the Maintenance Domain (MD) associated with the remote MEP.

ma-name <ma-name>

Specifies the Maintenance Association (MA) name associated with the remote MEP.

Example commands:

ping cfm remote-mac 7a:69:25:c0:00:02 interface ifl-0/0/0/0
ping cfm remote-mac 7a:69:25:c0:00:02 interface ifl-0/0/0/0 count 10 interval 0.1
ping cfm remote-mep 2000 domain MD_RBFS ma-name MA_OSPF count 20
ping cfm remote-mep 2000 domain MD_RBFS ma-name MA_OSPF interface ifl-0/0/0/0 count 10 interval 0.1

The following is an example for CFM ping using a remote MEP ID. It shows how to verify CFM connectivity to a remote Maintenance End Point by specifying the remote MEP ID, maintenance domain, and maintenance association.

supervisor@rtbrick.net: cfg> ping cfm remote-mep 2000 domain MD_RBFS ma-name MA_OSPF
cfm ping to 7a:69:25:c0:00:02
68 bytes from 7a:69:25:c0:00:02: seq=1 time=2.122 ms
68 bytes from 7a:69:25:c0:00:02: seq=2 time=1.083 ms
68 bytes from 7a:69:25:c0:00:02: seq=3 time=1.074 ms
68 bytes from 7a:69:25:c0:00:02: seq=4 time=1.097 ms
68 bytes from 7a:69:25:c0:00:02: seq=5 time=1.074 ms
--- cfm ping statistics ---
5 sent, 5 received, 0 errors, 0.00% loss, time 5000 ms
rtt min/avg/max/mdev = 1.074/1.289/2.122/0.432 ms

The following is an example for CFM ping using a remote MAC address. It shows how to verify CFM connectivity to a remote endpoint by specifying its MAC address and the outgoing interface.

supervisor@rtbrick.net: cfg> ping cfm remote-mac 7a:69:25:c0:00:02 interface ifl-0/0/0/0
cfm ping to 7a:69:25:c0:00:02
68 bytes from 7a:69:25:c0:00:02: seq=1 time=2.135 ms
68 bytes from 7a:69:25:c0:00:02: seq=2 time=1.085 ms
68 bytes from 7a:69:25:c0:00:02: seq=3 time=2.151 ms
68 bytes from 7a:69:25:c0:00:02: seq=4 time=1.119 ms
68 bytes from 7a:69:25:c0:00:02: seq=5 time=1.075 ms
--- cfm ping statistics ---
5 sent, 5 received, 0 errors, 0.00% loss, time 5000 ms
rtt min/avg/max/mdev = 1.075/1.512/2.151/0.561 ms

api  To access the RESTCONF API that corresponds to this CLI, click include::common:partial$restconf_api_links.adoc[tag=cfm_ping].