以太网OAM是一种监控网络故障的工具,可以监控两台直连设备之间的链路状态。
1目录(略)
2配置前提
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。 本文档假设您已了解以太网OAM特性。
3配置举例
3.1 组网需求
如图所示,企业网络和运营商网络通过各自边缘设备Device A和Device B进行相连。使用以太网OAM功能,监控Device A和Device B间链路的状态,从而可确定运营商所提供的网络链路可靠性是否符合与企业用户签订的SLA(Service Level Agreement),具体需求: · 实现自动检测Device A和Device B之间链路的连通性; · 网络管理员可以查看是否Device A和Device B之间链路是否发生紧急链路事件; · 网络管理员可以通过观察一般链路事件统计信息动态地了解链路状态
3.2 配置思路 为了在Device A和Device B之间链路上成功建立以太网OAM连接,至少需要保证链路两端至少有一个接口的以太网OAM的连接模式为Active模式。由于本设备的所有接口的以太网OAM的连接模式缺省情况为Active模式,所以可以省去此配置。本案例以在Device A的XGE3/0/1上配置以太网OAM的连接模式为Active模式,在Device B的XGE3/0/1上配置以太网OAM的连接模式为Passive模式为例。
以太网OAM功能可以监控的一般链路事件包括错误信号事件、错误帧事件、错误帧周期事件及错误帧秒事件。缺省情况下,开启了以太网OAM功能的接口的一般链路事件检测参数均采用全局配置,您可以根据实际网络情况对其中某些事件的检测参数进行修改,以满足您对这些事件的检测精度。本案例以对错误帧事件的检测参数进行修改为例。
3.3 使用版本
本举例是在S12500-CMW710-R7328P02版本上进行配置和验证的。
3.4 配置注意事项
不允许在已使能以太网OAM功能的接口上更改以太网OAM的连接模式。如需更改,请先关闭该接口上的以太网OAM功能。
3.5 配置步骤
3.5.1 Device A的配置
# 配置接口Ten-GigabitEthernet3/0/1的以太网OAM的连接模式为Active模式(缺省情况下,所有接口的以太网OAM的连接模式都为Active模式),并开启以太网OAM功能。
<DeviceA> system-view
[DeviceA] interface ten-gigabitethernet 3/0/1
[DeviceA-Ten-GigabitEthernet3/0/1] undo shutdown
[DeviceA-Ten-GigabitEthernet3/0/1] oam mode active
[DeviceA-Ten-GigabitEthernet3/0/1] oam enable
# 在接口Ten-GigabitEthernet3/0/1上配置错误帧事件的检测窗口为20000毫秒,检测阈值为10次。
[DeviceA-Ten-GigabitEthernet3/0/1] oam errored-frame window 200
[DeviceA-Ten-GigabitEthernet3/0/1] oam errored-frame threshold 10
[DeviceA-Ten-GigabitEthernet3/0/1] quit
3.5.2 Device B的配置
# 配置接口Ten-GigabitEthernet3/0/1的以太网OAM的连接模式为Passive模式,并开启以太网OAM功能。
<DeviceB> system-view
[DeviceB] interface ten-gigabitethernet 3/0/1
[DeviceB-Ten-GigabitEthernet3/0/1] undo shutdown
[DeviceB-Ten-GigabitEthernet3/0/1] oam mode passive
[DeviceB-Ten-GigabitEthernet3/0/1] oam enable
[DeviceB-Ten-GigabitEthernet3/0/1] quit
3.6 验证配置 # 显示Device A上的全局以及未采用缺省配置的接口上的以太网OAM配置信息。
[DeviceA] display oam configuration
—————- [Global] —————- OAM timers Hello timer : 1000 milliseconds Keepalive timer : 5000 milliseconds Link monitoring Errored symbol period Window : 100 x 1000000 symbols Threshold : 1 error symbols Errored frame Window : 10 x 100 milliseconds Threshold : 1 error frames Errored frame period Window : 1000 x 10000 frames Threshold : 1 error frames Errored frame seconds Window : 600 x 100 milliseconds Threshold : 1 error seconds ———– [Ten-GigabitEthernet3/0/1] ———– OAM timers Hello timer : 1000 milliseconds Keepalive timer : 5000 milliseconds Link monitoring Errored symbol period Window : 100 x 1000000 symbols Threshold : 1 error symbols Errored frame Window : 200 x 100 milliseconds
Threshold : 10 error frames Errored frame period Window : 1000 x 10000 frames Threshold : 1 error frames Errored frame seconds Window : 600 x 100 milliseconds Threshold : 1 error seconds
# 显示Device A上以太网OAM的紧急链路事件统计信息。
[DeviceA] display oam critical-event ———– [Ten-GigabitEthernet3/0/1] ———– Local link status : UP Event statistics Link fault : Not occurred Dying gasp : Not occurred Critical event : Not occurred
以上信息表明:Device A与Device B之间的链路连通正常,尚未发生任何紧急链路事件。
# 通过Device A显示本端的一般链路事件统计信息。
[DeviceA] display oam link-event
local ———– [Ten-GigabitEthernet3/0/1] ———– Link status: UP OAM local errored frame event Event time stamp : 5789 x 100 milliseconds Errored frame window : 200 x 100 milliseconds Errored frame threshold : 10 error frames Errored frame : 13 error frames Error running total : 350 error frames Event running total : 17 events
上面的显示信息表明从OAM连接建立后,Device A上总共发生了350次错误帧,其中错误帧事件有17次,链路的性能不稳定。
3.7 配置文件 ·
Device A
# interface Ten-GigabitEthernet3/0/1 port link-mode bridge oam errored-frame window 200 oam errored-frame threshold 10 oam enable
Device B
# interface Ten-GigabitEthernet3/0/1 port link-mode bridge oam mode passive oam enable
摘自h3c官方配置指南