01-H3C S12500 DLDP典型配置举例
本章节下载: 01-H3C S12500 DLDP典型配置举例 (188.59 KB)
H3C S12500 DLDP配置举例
Copyright © 2013 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
|
目 录
本文档介绍了DLDP(Device Link Detection Protocol,设备链路检测协议)的配置举例。
DLDP能够通过在链路层监控光纤或网线的链路状态,检测链路连接是否正确、链路两端可否正常交互报文。当发现单向链路时,DLDP会根据用户配置自动关闭或由用户手工关闭相关接口,以防止错误转发、环路等网络问题的发生。DLDP与物理层检测机制协同工作,可以检测并避免物理和逻辑的单向连接。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解DLDP特性。
如图1所示,Device A和Device B通过两根长光纤连接,要求通过配置,使DLDP检测到单向链路故障后自动关闭故障端口;当故障排除后,自动恢复Down掉的端口。
图1 DLDP自动关闭单向链路配置组网图
· DLDP协议的工作模式与其可识别的单向链路类型之间的对应关系如表1所示。由于本例中两种单向链路的类型均可能出现,因此需配置DLDP协议工作在加强模式。
表1 单向链路类型与DLDP协议工作模式关系表
单向链路类型 |
光纤是否可能出现此种情况 |
铜质双绞线是否可能出现此种情况 |
DLDP协议工作在哪种模式下可识别 |
交叉连接 |
是 |
否 |
在普通模式和加强模式下均可识别 |
某一方向线路未连接或断路 |
是 |
是 |
在普通模式下不可识别,在加强模式下可识别。此时,Rx端有信号的端口将处于Disable状态,而Rx端没有信号的端口将处于Inactive状态 |
· 需求中要求发现单向链路时能够自动断开,因此配置发现单向链路后端口的关闭模式为自动模式(缺省情况下即为该模式)。
本举例是在S12500-CMW520-R1825P01版本上进行配置和验证的。
· DLDP功能只对以太网接口生效。
· 要启用DLDP功能,必须先全局使能DLDP功能,再在端口上使能DLDP功能。
· 为了使DLDP能够正常工作,需要将两端端口的双工模式都配置为全双工模式,速率都配置为相同的强制速率。
· 只有当物理链路连通后,DLDP才能检测出单向链路。因此在使能DLDP之前,请先连接好光纤或铜质双绞线。
· 为确保能够成功检测出单向链路,要保证两端设备相连端口的DLDP处于使能状态、DLDP Advertisement报文发送时间间隔相等、认证方式和认证口令设置相同。
# 全局使能DLDP功能。
<DeviceA> system-view
[DeviceA] dldp enable
# 在端口Gigabitethernet2/0/1上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] undo shutdown
[DeviceA-Gigabitethernet2/0/1] duplex full
[DeviceA-Gigabitethernet2/0/1] speed 1000
[DeviceA-Gigabitethernet2/0/1] dldp enable
[DeviceA-Gigabitethernet2/0/1] quit
# 在端口Gigabitethernet2/0/2上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceA] interface gigabitethernet 2/0/2
[DeviceA-Gigabitethernet2/0/2] undo shutdown
[DeviceA-Gigabitethernet2/0/2] duplex full
[DeviceA-Gigabitethernet2/0/2] speed 1000
[DeviceA-Gigabitethernet2/0/2] dldp enable
[DeviceA-Gigabitethernet2/0/2] quit
# 配置DLDP的工作模式为加强模式。
[DeviceA] dldp work-mode enhance
# 配置发现单向链路后端口的关闭模式为自动模式。
[DeviceA] dldp unidirectional-shutdown auto
# 全局使能DLDP功能。
<DeviceB> system-view
[DeviceB] dldp enable
# 在端口Gigabitethernet2/0/1上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceB] interface gigabitethernet 2/0/1
[DeviceB-Gigabitethernet2/0/1] undo shutdown
[DeviceB-Gigabitethernet2/0/1] duplex full
[DeviceB-Gigabitethernet2/0/1] speed 1000
[DeviceB-Gigabitethernet2/0/1] dldp enable
[DeviceB-Gigabitethernet2/0/1] quit
# 在端口Gigabitethernet2/0/2上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceB] interface gigabitethernet 2/0/2
[DeviceB-Gigabitethernet2/0/2] undo shutdown
[DeviceB-Gigabitethernet2/0/2] duplex full
[DeviceB-Gigabitethernet2/0/2] speed 1000
[DeviceB-Gigabitethernet2/0/2] dldp enable
[DeviceB-Gigabitethernet2/0/2] quit
# 配置DLDP的工作模式为加强模式。
[DeviceB] dldp work-mode enhance
# 配置发现单向链路后端口的关闭模式为自动模式。
[DeviceB] dldp unidirectional-shutdown auto
配置完成后,通过使用display dldp命令可以查看端口上的DLDP配置信息。例如:
# 查看Device A所有使能了DLDP的端口上的DLDP配置信息。
[DeviceA] display dldp
DLDP global status : enable
DLDP interval : 5s
DLDP work-mode : enhance
DLDP authentication-mode : none
DLDP unidirectional-shutdown : auto
DLDP delaydown-timer : 1s
The number of enabled ports is 2.
Interface Gigabitethernet2/0/1
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 59
Neighbor state : two way
Neighbor aged time : 11
Interface Gigabitethernet2/0/2
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 60
Neighbor state : two way
Neighbor aged time : 12
以上信息表明,端口Gigabitethernet2/0/1和Gigabitethernet2/0/2上的DLDP状态机均处于Advertisement状态,说明这两个端口所在的链路均处于双通状态。
# 在Device A上打开系统信息监视功能,并分别打开Log和Trap信息的显示功能。
[DeviceA] quit
<DeviceA> terminal monitor
<DeviceA> terminal logging
<DeviceA> terminal trapping
此后某刻,网络管理员在Device A上看到如下Log和Trap信息:
<DeviceA>
#Jan 18 17:36:18:798 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; Trap 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort>: DLDP detects a unidirectional link in port 17825792.
%Jan 18 17:36:18:799 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is DOWN.
%Jan 18 17:36:18:799 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_AUTO: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/1. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is AUTO. DLDP shuts down the port.
#Jan 18 17:36:20:189 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; Trap 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort> : DLDP detects a unidirectional link in port 17825793.
%Jan 18 17:36:20:189 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is DOWN.
%Jan 18 17:36:20:190 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_AUTO: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/2. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is AUTO. DLDP shuts down the port.
%Jan 15 16:54:56:040 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_AUTO_ENHANCE: -Slot=2; In enhanced DLDP mode, port Gigabitethernet2/0/1 cannot detect its aged-out neighbor. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is AUTO. DLDP shuts down the port.
以上信息表明,端口Gigabitethernet2/0/1和Gigabitethernet2/0/2的链路状态均已变为down;DLDP在这两个端口上都检测到了单向链路,并自动关闭了这两个端口。
经过网络管理员排查,发现连接Device A和Device B的两对光纤被错误地进行了交叉连接。于是,网络管理员将这两对光纤重新进行了正确连接,然后在Device A上看到如下Log信息:
<DeviceA>
%Jan 18 17:47:33:869 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is UP.
%Jan 18 17:47:35:894 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is UP.
以上信息表明,端口Gigabitethernet2/0/1和Gigabitethernet2/0/2的链路状态均已重新变为up。
· 设备A:
#
dldp enable
dldp work-mode enhance
#
interface GigabitEthernet3/0/1
port link-mode bridge
speed 1000
duplex full
dldp enable
#
interface GigabitEthernet3/0/2
port link-mode bridge
speed 1000
duplex full
dldp enable
· 设备B:
#
dldp enable
dldp work-mode enhance
#
interface GigabitEthernet3/0/1
port link-mode bridge
speed 1000
duplex full
dldp enable
#
interface GigabitEthernet3/0/2
port link-mode bridge
speed 1000
duplex full
dldp enable
如图2所示,Device A和Device B通过两根长光纤连接,要求通过配置,使DLDP检测到单向链路故障后,提示网络管理员手工关闭故障端口。
图2 DLDP提示手动关闭单向链路配置组网图
· DLDP协议的工作模式与其可识别的单向链路类型之间的对应关系如表2所示。由于本例中两种单向链路的类型均可能出现,因此需配置DLDP协议工作在加强模式。
表2 单向链路类型与DLDP协议工作模式关系表
单向链路类型 |
光纤是否可能出现此种情况 |
铜质双绞线是否可能出现此种情况 |
DLDP协议工作在哪种模式下可识别 |
交叉连接 |
是 |
否 |
在普通模式和加强模式下均可识别 |
某一方向线路未连接或断路 |
是 |
是 |
在普通模式下不可识别,在加强模式下可识别。此时,Rx端有信号的端口将处于Disable状态,而Rx端没有信号的端口将处于Inactive状态 |
· 需求中要求发现单向链路时,能够提示手工关闭故障端口,因此配置发现单向链路后端口的关闭模式为手动模式(缺省情况下为自动模式)。
本举例是在S12500-CMW520-R1825P01版本上进行配置和验证的。
· DLDP功能只对以太网接口生效。
· 要启用DLDP功能,必须先全局使能DLDP功能,再在端口上使能DLDP功能。
· 为了使DLDP能够正常工作,需要将两端端口的双工模式都配置为全双工模式,速率都配置为相同的强制速率。
· 只有当物理链路连通后,DLDP才能检测出单向链路。因此在使能DLDP之前,请先连接好光纤或铜质双绞线。
· 为确保能够成功检测出单向链路,要保证两端设备相连端口的DLDP处于使能状态、DLDP Advertisement报文发送时间间隔相等、认证方式和认证口令设置相同。
# 全局使能DLDP功能。
<DeviceA> system-view
[DeviceA] dldp enable
# 在端口Gigabitethernet2/0/1上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] undo shutdown
[DeviceA-Gigabitethernet2/0/1] duplex full
[DeviceA-Gigabitethernet2/0/1] speed 1000
[DeviceA-Gigabitethernet2/0/1] dldp enable
[DeviceA-Gigabitethernet2/0/1] quit
# 在端口Gigabitethernet2/0/2上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceA] interface gigabitethernet 2/0/2
[DeviceA-Gigabitethernet2/0/2] undo shutdown
[DeviceA-Gigabitethernet2/0/2] duplex full
[DeviceA-Gigabitethernet2/0/2] speed 1000
[DeviceA-Gigabitethernet2/0/2] dldp enable
[DeviceA-Gigabitethernet2/0/2] quit
# 配置DLDP的工作模式为加强模式。
[DeviceA] dldp work-mode enhance
# 配置发现单向链路后端口的关闭模式为手动模式。
[DeviceA] dldp unidirectional-shutdown manual
# 全局使能DLDP功能。
<DeviceB> system-view
[DeviceB] dldp enable
# 在端口Gigabitethernet2/0/1上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceB] interface gigabitethernet 2/0/1
[DeviceB-Gigabitethernet2/0/1] undo shutdown
[DeviceB-Gigabitethernet2/0/1] duplex full
[DeviceB-Gigabitethernet2/0/1] speed 1000
[DeviceB-Gigabitethernet2/0/1] dldp enable
[DeviceB-Gigabitethernet2/0/1] quit
# 在端口Gigabitethernet2/0/2上配置双工模式为全双工、端口速率为1000Mbps,并使能DLDP功能。
[DeviceB] interface gigabitethernet 2/0/2
[DeviceB-Gigabitethernet2/0/2] undo shutdown
[DeviceB-Gigabitethernet2/0/2] duplex full
[DeviceB-Gigabitethernet2/0/2] speed 1000
[DeviceB-Gigabitethernet2/0/2] dldp enable
[DeviceB-Gigabitethernet2/0/2] quit
# 配置DLDP的工作模式为加强模式。
[DeviceB] dldp work-mode enhance
# 配置发现单向链路后端口的关闭模式为手动模式。
[DeviceB] dldp unidirectional-shutdown manual
配置完成后,通过使用display dldp命令可以查看端口上的DLDP配置信息。例如:
# 查看Device A所有使能了DLDP的端口上的DLDP配置信息。
[DeviceA] display dldp
DLDP global status : enable
DLDP interval : 5s
DLDP work-mode : enhance
DLDP authentication-mode : none
DLDP unidirectional-shutdown : manual
DLDP delaydown-timer : 1s
The number of enabled ports is 2.
Interface Gigabitethernet2/0/1
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 59
Neighbor state : two way
Neighbor aged time : 11
Interface Gigabitethernet2/0/2
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0023-8956-3600
Neighbor port index : 60
Neighbor state : two way
Neighbor aged time : 12
以上信息表明,端口Gigabitethernet2/0/1和Gigabitethernet2/0/2上的DLDP状态机均处于Advertisement状态,说明这两个端口所在的链路均处于双通状态。
# 在Device A上打开系统信息监视功能,并分别打开Log和Trap信息的显示功能。
[DeviceA] quit
<DeviceA> terminal monitor
<DeviceA> terminal logging
<DeviceA> terminal trapping
此后某刻,网络管理员在Device A上看到如下Log和Trap信息:
<DeviceA>
#Jan 18 18:10:38:481 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; Trap 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort> : DLDP detects a unidirectional link in port 17825792.
%Jan 18 18:10:38:481 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_MANUAL: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/1. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is MANUAL. The port needs to be shut down by the user.
#Jan 18 18:10:38:618 2010 DeviceA DLDP/1/TrapOfUnidirectional: -Slot=2; 1.3.6.1.4.1.25506.2.43.2.1.1<hh3cDLDPUnidirectionalPort> : DLDP detects a unidirectional link in port 17825793.
%Jan 18 18:10:38:618 2010 DeviceA DLDP/3/DLDP_UNIDIRECTION_MANUAL: -Slot=2; DLDP detects a unidirectional link on port Gigabitethernet2/0/2. The transceiver has malfunction in the Tx direction or cross-connected links exist between the local device and its neighbor. The shutdown mode is MANUAL. The port needs to be shut down by the user.
以上信息表明,DLDP在端口Gigabitethernet2/0/1和Gigabitethernet2/0/2上都检测到了单向链路,并提示用户手工关闭故障端口。
经过网络管理员排查,发现连接Device A和Device B的两对光纤被错误地进行了交叉连接。于是,网络管理员将故障端口手工关闭:
# 在Device A上分别关闭端口Gigabitethernet2/0/1和Gigabitethernet2/0/2,并看到如下Log信息:
<DeviceA> system-view
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] shutdown
%Jan 18 18:16:12:044 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is DOWN.
[DeviceA-Gigabitethernet2/0/1] quit
[DeviceA] interface gigabitethernet 2/0/2
[DeviceA-Gigabitethernet2/0/2] shutdown
%Jan 18 18:18:03:583 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is DOWN.
以上信息表明,端口Gigabitethernet2/0/1和Gigabitethernet2/0/2的链路状态均已变为down。
然后,网络管理员将连接Device A和Device B的两对光纤重新进行了正确连接。检查无误后,网络管理员将已排除故障的端口重新打开:
# 在Device A上分别打开端口Gigabitethernet2/0/2和Gigabitethernet2/0/1,并看到如下Log信息:
[DeviceA-Gigabitethernet2/0/2] undo shutdown
[DeviceA-Gigabitethernet2/0/2]
%Jan 18 18:22:11:698 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/2 link status is UP.
[DeviceA-Gigabitethernet2/0/2] quit
[DeviceA] interface gigabitethernet 2/0/1
[DeviceA-Gigabitethernet2/0/1] undo shutdown
[DeviceA-Gigabitethernet2/0/1]
%Jan 18 18:22:46:065 2010 DeviceA IFNET/3/LINK_UPDOWN: Gigabitethernet2/0/1 link status is UP.
以上信息表明,端口Gigabitethernet2/0/1和Gigabitethernet2/0/2的链路状态均已重新变为up。
· 设备A:
#
dldp enable
dldp work-mode enhance
dldp unidirectional-shutdown manual
#
interface GigabitEthernet3/0/1
port link-mode bridge
speed 1000
duplex full
dldp enable
#
interface GigabitEthernet3/0/2
port link-mode bridge
speed 1000
duplex full
dldp enable
· 设备B:
#
dldp enable
dldp work-mode enhance
dldp unidirectional-shutdown manual
#
interface GigabitEthernet3/0/1
port link-mode bridge
speed 1000
duplex full
dldp enable
#
interface GigabitEthernet3/0/2
port link-mode bridge
speed 1000
duplex full
dldp enable
· 《H3C S12500系列路由交换机 可靠性配置指导》中的“DLDP”
· 《H3C S12500系列路由交换机 可靠性命令参考》中的“DLDP”
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!