OAM

Manage OAM groups and endpoints

OAM

Manage Ethernet OAM (IEEE 802.1ag / Y.1731 connectivity fault management): maintenance-association groups and maintenance endpoints (MEPs). The command can also register for OAM events and send loss- or delay-measurement frames. Type sub-command words in full; abbreviations are not accepted. Arguments are Key=<value> pairs whose keys may be abbreviated. Flags such as CCM, DM or RemoteDefect may be given without =. An unknown word prints Invalid OAM subcommand: <word>.

On a SONiC Trident 3 switch the OAM module is not set up: group show and endpoint show print their table header and then fail with only Failed to execute the diagnostic command. Error: Operation failed., without a reason. SONiC does not use this command.

group show and endpoint show are read-only. init, group and endpoint add/replace/delete, and events on|off change OAM state in the switch. tx sends a frame through the CPU packet path that SONiC also uses.

OAM init

Initialise the OAM module. Prints OAM module initialized..

Unvalidated

drivshell> oam init
OAM group show

List all groups under the header ID  Name … TX_RD CPU_COPY AlarmPri. oam group with nothing after it does the same.

Hardware-validated

drivshell> oam group show
ID  Name                                             TX_RD CPU_COPY AlarmPri
--- ------------------------------------------------ ----- -------- ---------

Failed to execute the diagnostic command. Error: Operation failed.
OAM group add [ID=<id>] Name=<name> [RemoteDefect] [CopyToCpu=<bool>] [LowestAlarmPri=<0-6>]

Create a maintenance-association group. Name is required (A group name is required.). On success the shell prints OAM group <id> created.. OAM group replace takes the same keys, with ID required, and changes an existing group. CopyToCpu can be shortened to CT.

Unvalidated

drivshell> oam group add Name=MA1 LowestAlarmPri=0
OAM group delete <id>

Delete a group. Without the ID the shell prints MISSING GROUP ID.

Unvalidated

drivshell> oam group delete 1
OAM endpoint show

List all endpoints, group by group, under the header ID   Grp Name L Period CLDLO VLAN Mod Port Tr MAC address       PktPri IntPri TLV.

Hardware-validated

drivshell> oam endpoint show
ID   Grp Name L Period CLDLO VLAN Mod Port Tr MAC address       PktPri IntPri TLV
---- --- ---- - ------ ------ ---- --- ---- -- ----------------- ------ ------ ---

Failed to execute the diagnostic command. Error: Operation failed.
OAM endpoint add Group=<group_id> [ID=<id>] Name=<n> Level=<level> PERiod=<period> Vlan=<vid> <Port=<port> | ModPort=<mod.port> | TrunkGroupId=<tid> TrunkIndex=<i>> [Remote] [CCM] [LB] [DM] [LM] [LT] [PBBTE] [UpMEP] [SrcMACaddress=<mac>] [DstMACaddress=<mac>] [PktPri=<n>] [IntPri=<n>] [TLV] [PortTlv=<1|2>] [IntfTlv=<1-7>] [P0=<n> … P15=<n>] [OpcodeFlags=<flags>] [CPUPri=<n>]

Create a maintenance endpoint. On success the shell prints OAM endpoint <id> created.. A missing required value is named in a message such as A group is required., An endpoint name is required., A level is required., A CCM period is required., A VLAN is required., An port or trunk group ID is required. or A TrunkIndex value is required.. An UpMEP also needs a destination port. OAM endpoint replace takes the same keys. The built-in help shows only P0 and P1, but P0 to P15 are accepted.

Unvalidated

drivshell> oam endpoint add Group=1 Name=1 Level=3 PERiod=1000 Vlan=100 Port=xe0 CCM
OAM endpoint delete <id>

Delete a maintenance endpoint. Without the ID the shell prints MISSING ENDPOINT ID.

Unvalidated

drivshell> oam endpoint delete 1
OAM events [on | off]

Turn printing of OAM events (port, interface and CCM state changes) to the console on or off. The shell confirms with OAM events <on|off>.

Unvalidated

drivshell> oam events on
OAM tx ID=<endpoint_id> [DM] [LM] [DstPort=<port>] [DstMACaddress=<mac>] [SrcMACaddress=<mac>]

Send one delay-measurement (DM) or loss-measurement (LM) frame for an endpoint. One of the two is required (DM or LM is required.).

Unvalidated

drivshell> oam tx ID=1 DM

Built-in help

init
group add [ID=<id>] Name=<name> [RemoteDefect]
    [CopyToCpu=true|false] [LowestAlarmPri=<0-6>]
     - Create a Maintenance Association Group.
group replace ID=<id> Name=<name> [RemoteDefect]
    [CopyToCpu=true|false] [LowestAlarmPri=<0-6>]
     - Re-configure an existing Maintenance Association Group.
group delete <id>
     - Destory a Maintenance Association Group.
group show
     - Display all Maintenance Association Groups.
endpoint add Group=<group_id> [ID=<id>]
    [Remote] [CCM] [LB] [DM] [LM] [LT] [PBBTE] [UpMEP]
    Name=name Level=<level> PERiod=<period> Vlan=<vlan>
    Port=<port>|ModPort=<modid.port>|TrunkGroupId=<tid>
    TrunkIndex=<port_index>*
    [SrcMACaddress=<mac>] [DstMACaddress=<mac>]
    [PktPri=<pri>] [IntPri=<int_pri>]
    [TLV] [PortTlv=<1|2>] [IntfTlv=<1-7>]
    [P0=#] [P1=#]
    [OpcodeFlags=<flags>] [CPUPri=<cpu_pri>]
    (*must be specified if TrunkGroupId is set)
     - Create a Maintenance Endpoint.
endpoint replace Group=<group_id> [ID=<id>]
    [Remote] [CCM] [LB] [DM] [LM] [LT] [PBBTE] [UpMEP]
    Name=name Level=<level> PERiod=<period> Vlan=<vlan>
    Port=<port>|ModPort=<modid.port>|TrunkGroupId=<tid>
    TrunkIndex=<port_index>*
    [SrcMACaddress=<mac>] [DstMACaddress=<mac>]
    [PktPri=<pri>] [IntPri=<int_pri>]
    [TLV] [PortTlv=<1|2>] [IntfTlv=<1-7>]
    [P0=#] [P1=#]
    [OpcodeFlags=<flags>] [CPUPri=<cpu_pri>]
    (*must be specified if TrunkGroupId is set)
     - Re-configure an existing Maintenance Endpoint.
endpoint delete <id>
     - Destroy a Maintenance Endpoint.
endpoint show
     - Display all Maintenance Endpoints.
events [on|off]
     - Register for events notification.
tx ID=<endpointid> [DM] [LM] [DstPort=<port>]
    [DstMACaddress=<mac>] [SrcMACaddress=<mac>
     - Transmit LM or DM packets.