Configuring Link OAM

  1. Execute the link-oam command to enter the link OAM global configuration mode.
    device# configure terminal
    device(config)# protocol link-oam
    device(config-link-oam)#
  2. (Optional) Execute the shutdown command to disable the link OAM protocol. The no form of the command enables the protocol.
    device(config-link-oam)# shutdown

    By default, link OAM protocol is enabled when protocol link-oam is configured .

  3. Configure the timeout value using the timeout command. This value corresponds to the hold time before restarting the discovery process. By default, the timeout value is 5 seconds.
    device(config-link-oam)# timeout 4
  4. Configure the PDU rate using the pdu-rate command. This value corresponds to the number of OAMPDUs per second. By default, the PDU rate is 1 per second.
    device(config-link-oam)# pdu-rate 10
    Note

    Note

    It is recommended to configure timeout interval at least three times the PDU interval, to avoid link OAM protocol flaps against loss of one or two PDUs for any latency issues in general and during HA Failover.
  5. From the Ethernet interface configuration mode, enable the link OAM on the interface using the link-oam enable command. By default, link OAM is disabled on the interface.
    device(config)# interface ethernet 1/1
    device(config-int-eth1/1)# link-oam enable passive
    Note

    Note

    The mode can be active or passive. The no form of the command allows you to remove the current configuration, after which you can reconfigure.
  6. Enable the remote loopback functionality in the interface using the link-oam allow-loopback command. By default, loopback is disabled on the interface. The no form of the command disables the functionality on the interface.
    device(config-int-eth1/1)#link-oam allow-loopback
  7. (Optional) Block the interface on receiving the remote failure message using the link-oam remote-failure command. By default, on receiving a remote failure message, the device only logs the event through syslog.
    device(config-int-eth1/1)# link-oam remote-failure link-fault action block-interface
    device(config-int-eth1/1)# link-oam remote-failure dying-gasp action block-interface
    device(config-int-eth1/1)# link-oam remote-failure critical-event action block-interface
    
    Note

    Note

    The command configures the block-interface action for each of the three events that the protocol supports.
  8. (Optional) Verify the link OAM configuration using the show link-oam info command.
    device# show link-oam info
    
    	Ethernet Link Status OAM Status   Mode     Local Stable    Remote Stable
    	1/1      up            up         active     satisfied       satisfied
    	1/2      up            up         passive    satisfied       satisfied
    	1/3      up            up         active     satisfied       satisfied
    	1/4      up            init       passive    unsatisfied     unsatisfied
    	1/5      down          down       passive    unsatisfied     unsatisfied
    	1/6      down          down       passive    unsatisfied     unsatisfied
    	1/7      down          down       passive    unsatisfied     unsatisfied
  9. (Optional) View the link OAM statistics using the show link-oam statistics command.
    device# show link-oam statistics
    
    Ethernet Tx PDUs	  Rx PDUs
    2/1		93	     92
    2/2		45	     46
  10. (Optional) From the Exec mode, enable the remote loopback on peer that is connected to local ethernet interface specified, using the link-oam remote-loop-back command.
    device# link-oam remote-loop-back ethernet 1/1 start
    device# link-oam remote-loop-back ethernet 1/1 stop
  11. (Optional) Clear the OAM statistics using the clear link-oam statistics command.
    device# clear link-oam statistics