OAM配置命令
目 录
目 录
第1章 OAM配置命令......................................................................................................................1
1.1 OAM配置命令.....................................................................................................................1
1.1.1 ethernet oam.............................................................................................................1 1.1.2 ethernet oam {max-rate | min-rate | mode | timeout }...............................................2 1.1.3 ethernet oam remote-failure {critical-event | dying-gasp | link-fault } action.............3 1.1.4 ethernet oam remote-loopback {supported | timeout}...............................................4 1.1.5 ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} threshold high.................................................................................................5 1.1.6 ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} threshold low..................................................................................................6 1.1.7 ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} window............................................................................................................7 1.1.8 ethernet oam link-monitor high-threshold action.......................................................8 1.1.9 ethernet oam link-monitor negotiation-supported.....................................................9 1.1.10 ethernet oam remote-loopback {start | stop}...........................................................9 1.1.11 clear ethernet oam statistics..................................................................................10 1.1.12 show ethernet oam discovery................................................................................11 1.1.13 show ethernet oam statistics {pdu | link-monitor | remote-failure}........................12 1.1.14 show ethernet oam configuration..........................................................................13 1.1.15 show ethernet oam runtime...................................................................................15
- I -
OAM配置命令
第1章 OAM配置命令
1.1 OAM配置命令
OAM配置命令有: z ethernet oam z z z z z z z
ethernet oam {max-rate | min-rate | mode | timeout }
ethernet oam remote-failure {critical-event | dying-gasp | link-fault } action ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds
| receive-crc} threshold high
ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} threshold low
ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} window
ethernet oam link-monitor high-threshold action ethernet oam link-monitor negotiation-supported
1.1.1 ethernet oam
命令描述
[no] ethernet oam 开启或关闭OAM功能。
参数
无
缺省
ethernet oam关闭
命令模式
端口配置模式
- 1 -
OAM配置命令
使用说明
无
示例
下面的命令将在端口GigaEthernet 0/2上开启OAM功能。
Switch# Switch#config
Switch_config#interface g0/2 Switch_config_g0/2#ethernet oam
1.1.2 ethernet oam {max-rate | min-rate | mode | timeout }
命令描述
[no] ethernet oam {max-rate value1 | min-rate value2 | mode {active | passive} |
timeout value3}
ethernet oam max-rate value1用来设定OAM报文的最快发送速率。 ethernet oam min-rate value2用来设定OAM报文的最慢发送速率。 ethernet oam mode {active | passive}用来设定OAM的模式。 ethernet oam timeout value3用来设定OAM连接的超时时间。
参数
参数
value1 value2 value3
参数说明
最快发送速率,取值范围:1-10,单位:包/秒 最慢发送速率,取值范围:1-10,单位:秒数 OAM连接的超时时间,取值范围:2-30,单位:秒数
缺省
max-rate的值为10; min-rate的值为1; timeout的值为5; mode为active。
- 2 -
OAM配置命令
命令模式
端口配置模式
使用说明
本命令可以配置建立OAM连接的一些可选参数。
示例
下面的命令配置GigaEthernet 0/2上的OAM的最快连接速率为5包/秒,最慢连接速率为5秒发一个包,连接超时时间为10秒,并且设置OAM的模式为passive。
Switch #config Switch_config#
Switch_config#interface g0/2
Switch_config_g0/2# ethernet oam max-rate 5 Switch_config_g0/2#ethernet oam min-rate 5 Switch_config_g0/2#ethernet oam timeout 10 Switch_config_g0/2#ethernet oam mode passive
1.1.3 ethernet oam remote-failure {critical-event | dying-gasp | link-fault } action
命令描述
ethernet oam remote-failure {critical-event | dying-gasp | link-fault } action
error-disable-interface
no ethernet oam remote-failure {critical-event | dying-gasp | link-fault } action 配置收到远端故障指示后的触发动作。
参数
无
缺省
收到远端故障指示后的没有任何触发动作。
命令模式
端口配置模式
- 3 -
OAM配置命令
使用说明
BDCOM的交换机不能生成Link Fault和Critical Event报文,但是从远端收到这些报文会被处理。BDCOM的交换机支持发送和接收Dying Gasp报文。当本地端口进入了errdisabled状态,或者本地端口被管理员手动关闭,或者本地端口上的OAM功能被管理员手动关闭,将会向与本地端口相连的远端端口发送Dying Gasp报文。
示例
在GigaEthernet 0/1上配置收到远端链路故障指示后触发动作error-disable-interface:
Switch_config#interface g0/1
Switch_config_g0/1#ethernet oam remote-failure link-fault action error-disable-interface
1.1.4 ethernet oam remote-loopback {supported | timeout}
命令描述
ethernet oam remote-loopback supported用来配置是否支持远端环回功能 ethernet oam remote-loopback timeout value用来配置远端环回超时时间
参数
参数
value3
参数说明
OAM连接的超时时间,取值范围:1-10,单位:秒数
缺省
2秒
命令模式
端口配置模式
使用说明
此定时器只对Loopback中的Master端有效,如果Master端在发出start或者stop请求
之后,在规定的超时时间内没有收到Slave端的响应,则自动退出Loopback模式。
示例
配置GigaEthernet 0/2上的Loopback的超时时间为5秒。
Switch_config_g0/2#ethernet oam remote-loopback timeout 5
- 4 -
OAM配置命令
1.1.5 ethernet oam link-monitor {symbol-period | frame | frame-period |
frame-seconds | receive-crc} threshold high
命令描述
[no] ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} threshold high {none | value}
配置链路监视(错误信号周期事件,错误帧事件,错误帧周期事件,错误帧秒数事件,错误CRC事件)的高阈值。
参数
参数
Value
参数说明
对于错误信号周期事件,取值范围:1-65535,单位:信号数; 对于错误帧事件,取值范围:1-65535,单位:帧数; 对于错误帧周期事件,取值范围:1-65535,单位:帧数; 对于错误帧秒数事件,取值范围:1-900,单位:秒数; 对于错误CRC事件,取值范围:1-65535,单位:帧数。
缺省
对于各种一般链路事件,缺省值均为none;
命令模式
端口配置模式
使用说明
当配置了某种事件高阈值以后,并且配置了ethernet oam link-monitor high-threshold action error-disable-interface,则本地收到的此种事件超过高阈值后,将使端口进入errdisabled状态。
示例
在端口GigaEthernet 0/2上配置错误帧周期事件的高阈值为10。
Switch_config_g0/2#ethernet oam link-monitor symbol-period threshold high 10
- 5 -
OAM配置命令
1.1.6 ethernet oam link-monitor {symbol-period | frame | frame-period |
frame-seconds | receive-crc} threshold low
命令描述
[no] ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} threshold low {none | value}
配置链路监视(错误信号周期事件,错误帧事件,错误帧周期事件,错误帧秒数事件,错误CRC事件)的低阈值。
参数
参数
Value
参数说明
对于错误信号周期事件,取值范围:0-65535,单位:信号数; 对于错误帧事件,取值范围:0-65535,单位:帧数; 对于错误帧周期事件,取值范围:0-65535,单位:帧数; 对于错误帧秒数事件,取值范围:0-900,单位:秒数; 对于错误CRC事件,取值范围:0-65535,单位:帧数。
缺省
对于错误信号周期事件,缺省值均为1; 对于错误帧事件,缺省值均为1; 对于错误帧周期事件,缺省值均为1; 对于错误帧秒数事件,缺省值均为1; 对于错误CRC事件,缺省值均为10。
命令模式
端口配置模式
使用说明
当配置了某种事件低阈值以后,则本地收到的此种事件超过低阈值后,将利用Event Notification OAM报文向对端通报。
示例
在端口GigaEthernet 0/2上配置错误信号周期事件的低阈值为10。
- 6 -
OAM配置命令 Switch_config_g0/2#ethernet oam link-monitor symbol-period threshold low 10
1.1.7 ethernet oam link-monitor {symbol-period | frame | frame-period |
frame-seconds | receive-crc} window
命令描述
ethernet oam link-monitor {symbol-period | frame | frame-period | frame-seconds | receive-crc} window value
配置链路监视(错误信号周期事件,错误帧事件,错误帧周期事件,错误帧秒数事件,错误CRC事件)的轮询窗口大小。
参数
参数
Value
参数说明
对于错误信号周期事件,在GigaEthernet 上取值范围:10-600,在FastEthernet 上取值范围:1-60,单位:100M个信号; 对于错误帧事件,取值范围:1-60,单位:秒数;
对于错误帧周期事件,在GigaEthernet 上取值范围:100-6000,在FastEthernet 上取值范围:10-600,单位:14881帧; 对于错误帧秒数事件,取值范围:10-900,单位:秒数; 对于错误CRC事件,取值范围:1-180,单位:秒数。
缺省
对于错误信号周期事件,在GigaEthernet 上缺省值均为10,在FastEthernet缺省值均为1;
对于错误帧事件,缺省值均为1;
对于错误帧周期事件,在GigaEthernet 上缺省值均为100,在FastEthernet缺省值均为10;
对于错误帧秒数事件,缺省值均为60; 对于错误CRC事件,缺省值均为1。
命令模式
端口配置模式
- 7 -
OAM配置命令
使用说明
无
示例
在端口GigaEthernet 0/2上配置错误信号周期事件的窗口为50。
Switch_config_g0/2#ethernet oam link-monitor symbol-period window 50
1.1.8 ethernet oam link-monitor high-threshold action
命令描述
ethernet oam link-monitor high-threshold action error-disable-interface [no] ethernet oam link-monitor high-threshold action 配置链路监视高阈值的触发事件。
参数
无
缺省
没有高阈值触发事件。
命令模式
端口配置模式
说明
当配置了某种事件高阈值以后,并且配置了ethernet oam link-monitor high-threshold
action error-disable-interface,则本地收到的此种事件超过高阈值后,将使端口进入errdisabled状态。
示例
在端口GigaEthernet 0/2上配置高阈值触发事件为error-disable-interface。
Switch_config_g0/2#ethernet oam link-monitor high-threshold action error-disable-interface
- 8 -
OAM配置命令
1.1.9 ethernet oam link-monitor negotiation-supported
命令描述
[no] ethernet oam link-monitor negotiation-supported 配置是否支持链路监视协商。
参数
无
缺省
支持协商。
命令模式
端口配置模式
说明
协商默认是支持的,我方设备支持链路监视功能,但是如果第三方设备不支持链路监视
功能,则在OAM Discovery时我方设备会自动不支持链路监视,这样就可以通过第三方设备建立OAM连接;否则,当配置不知协商的时候,我方设备强制支持链路监视功能,如果第三方设备不支持,则有可能无法建立OAM连接。
示例
在端口GigaEthernet 0/2上配置不支持链路监视功能。
Switch_config_g0/2#no ethernet oam link-monitor negotiation-supported
1.1.10 ethernet oam remote-loopback {start | stop}
命令描述
ethernet oam remote-loopback {start | stop} interface intf-type intf-id 主动发起或者停止OAM远端环回。
参数
参数
intf-id
指定端口。
参数说明
- 9 -
OAM配置命令
缺省
无
命令模式
特权模式
说明
不能在属于聚合端口的物理端口上开启OAM远端环回。
示例
在端口GigaEthernet 0/2上主动发起OAM远端环回。
Switch#ethernet oam remote-loopback start interface g0/2
1.1.11 clear ethernet oam statistics
命令描述
clear ethernet oam statistics [interface intf-type intf-id] 清除OAM统计信息。
参数
参数
intf-id
参数说明
指定端口。如果不指定端口,则清除所有端口上的OAM统计信息。
缺省
无
命令模式
特权模式
说明
使用此命令时,将同时清除按报文类型分类的报文计数信息,一般链路事件统计信息,
远端故障统计信息。
- 10 -
OAM配置命令
示例
清除端口GigaEthernet 0/2上的OAM统计信息。
Switch#clear ethernet oam statistics interface g0/2
1.1.12 show ethernet oam discovery
命令描述
show ethernet oam discovery interface [intf-type intf-id]
显示所有端口上或者某个指定端口上的OAM发现信息,包括本地DTE端口的环回状态,
以及OAM Information报文中Local information TLV和Remote information TLV的信息。
参数
参数
intf-id
参数说明
显示指定端口的discovery信息,否则显示所有protocol up,并且开启OAM的端口的discovery信息。
缺省
无
说明
无
示例
在端口GigaEthernet 0/2上显示OAM发现信息。
Switch_config_g0/2#show ethernet oam discovery interface g0/2 GigaEthernet0/2 Local Info TLV --------------
PDU revision: 1
Loopback status: LB_DISABLED
OAM configurations field: Mode : active Unidirection : not supported Remote loopback : supported
- 11 -
OAM配置命令 Link Events : supported Variable retrieval: not supported
Mtu size: 1500
OUI: 00e00f
Remote Info TLV ---------------
MAC address: 001b.0d9c.e703
PDU revision: 0
OAM configurations field: Mode : active Unidirection : not supported Remote loopback : not supported Link Events : supported Variable retrieval: not supported
Mtu size: 1500
OUI: 00000c
1.1.13 show ethernet oam statistics {pdu | link-monitor | remote-failure}
命令描述
show ethernet oam statistics {pdu | link-monitor | remote-failure} interface [intf-type intf-id]
显示所有端口上或者某个指定端口上的OAM统计信息,分为报文类型计数信息,一般链路事件统计信息,远端故障统计信息。
参数
参数
intf-id
参数说明
显示指定端口的统计信息,否则显示所有protocol up,并且开启OAM的端口的统计信息。
缺省
无
- 12 -
OAM配置命令
说明
无
示例
在端口GigaEthernet 0/2上显示OAM按报文类型分类的报文计数信息。
Switch#show ethernet oam statistics pdu interface g0/2 GigaEthernet0/2 Counters: ---------
Information OAMPDU Tx : 59 Information OAMPDU Rx : 56 Unique Event Notification OAMPDU Tx : 0 Unique Event Notification OAMPDU Rx : 0 Duplicate Event Notification OAMPDU TX: 0 Duplicate Event Notification OAMPDU RX: 0 Loopback Control OAMPDU Tx : 0 Loopback Control OAMPDU Rx : 0 Variable Request OAMPDU Tx : 0 Variable Request OAMPDU Rx : 0 Variable Response OAMPDU Tx : 0 Variable Response OAMPDU Rx : 0 Organization Specific OAMPDU Tx : 0 Organization Specific OAMPDU Rx : 0 Unsupported OAMPDU Tx : 0 Unsupported OAMPDU Rx : 0 Frames Lost due to OAM : 0
1.1.14 show ethernet oam configuration
命令描述
show ethernet oam configuration interface [intf-type intf-id] 显示所有端口上或者某个指定端口上的OAM配置信息。
参数
参数
参数说明
intf-id
显示指定端口的配置信息,否则显示所有protocol up,并且开启OAM的端口的配置信息。
- 13 -
OAM配置命令
缺省
无
说明
无
示例
显示端口GigaEthernet 0/2上的OAM配置信息。
Switch#show ethernet oam configuration interface g0/2 GigaEthernet0/2 General -------
Admin state : enabled Mode : active
PDU max rate : 10 packets/second PDU min rate : 1 seconds/packet Link timeout : 1 seconds High threshold action: no action
Remote Failure --------------
Link fault action : no action Dying gasp action : no action Critical event action: no action
Remote Loopback ---------------
Is supported : supported Loopback timeout : 2
Link Monitoring ---------------
Negotiation : supported Status : on
Errored Symbol Period Event
Window : 10 * 100M symbols Low threshold : 1 error symbol(s) High threshold : none
Errored Frame Event
Window : 1 seconds
- 14 -
OAM配置命令 Low threshold : 1 error frame(s) High threshold : none
Errored Frame Period Event
Window : 100 * 14881 frames Low threshold : 1 error frame(s) High threshold : none
Errored Frame Seconds Summary Event Window : 60 seconds Low threshold : 1 error second(s) High threshold : none
Errored CRC Frames Event Window : 1 seconds Low threshold : 10 error frame(s) High threshold : none
1.1.15 show ethernet oam runtime
命令描述
show ethernet oam runtime interface [intf-type intf-id]
显示所有端口上或者某个指定端口上的OAM运行时信息,包括一些协议内部控制变量的值,以及发现状态机的最近10次的状态转换记录。
参数
参数
intf-id
参数说明
显示指定端口的runtime信息,否则显示所有protocol up,并且开启OAM的端口的runtime信息。
缺省
无
说明
无
示例
显示端口GigaEthernet 0/2上的OAM运行时信息。
Switch#show ethernet oam runtime interface g0/2
- 15 -
OAM配置命令 GigaEthernet0/2 Runtime Settings: -----------------
local_pdu : NOT_WORKING local_mux : FWD local_par : FWD local_link_status : OK local_satisfied : FALSE local_stable : FALSE pdu_cnt : 10 pdu_timer : stopped lost_link_timer : stopped remote_state_valid: FALSE remote_stable : FALSE remote_evaluating : FALSE
Discovery State Machine: ------------------------
Last 10 state transition recorded: INACTIVE -> FAULT -> ACTIVE_SEND_LOCAL -> SEN D_LOCAL_REMOTE -> SEND_LOCAL_REMOTE_OK -> SEND_ANY -> INACTIVE
- 16 -