53-DLDP典型配置举例
本章节下载: 53-DLDP典型配置举例 (184.6 KB)
目 录
DLDP是H3C自主研发的一种链路层协议,可以监控光纤或铜质双绞线的链路状态。如果发现单向链路存在,DLDP会根据用户配置,自动关闭或通知用户手工关闭相关端口,以防止网络问题的发生。本章介绍了DLDP的这两种关闭方式的典型案例。
表1 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图1所示,Device A和Device B各自的端口之间分别通过一对光纤进行连接。
现要求在这两台设备上配置DLDP自动关闭单向链路功能,实现:
· DLDP能够检测到光纤交叉连接和一条光纤未连接或断路这两种类型的单向链路故障;
· 当DLDP检测到单向链路故障后,DLDP会自动关闭故障端口;
· 当网络管理员排除故障后,故障端口能够自动恢复。
图1 DLDP检测并自动关闭单向链路典型配置组网图
为确保DLDP能够正常工作,需要将两端端口的双工模式都配置为全双工模式,速率都配置为相同的强制速率。
(1) 配置Device A
# 全局开启DLDP功能。
<DeviceA> system-view
[DeviceA] dldp global enable
# 在端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置双工模式为全双工、端口速率为10000Mbps,并开启DLDP功能。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] duplex full
[DeviceA-Ten-GigabitEthernet1/0/1] speed 10000
[DeviceA-Ten-GigabitEthernet1/0/1] dldp enable
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] duplex full
[DeviceA-Ten-GigabitEthernet1/0/2] speed 10000
[DeviceA-Ten-GigabitEthernet1/0/2] dldp enable
[DeviceA-Ten-GigabitEthernet1/0/2] quit
# 配置发现单向链路后端口的关闭模式为自动模式。
[DeviceA] dldp unidirectional-shutdown auto
(2) 配置Device B
Device B上的配置与Device A上的配置完全一致,此处不再赘述。
配置完成后,通过使用display dldp命令可以查看DLDP的全局配置信息和接口上的DLDP信息。例如:
# 查看Device A上DLDP的全局配置信息和所有接口上的DLDP信息。
[DeviceA] display dldp
DLDP global status: Enabled
DLDP advertisement interval: 5s
DLDP authentication-mode: None
DLDP unidirectional-shutdown mode: Auto
DLDP delaydown-timer value: 1s
Number of enabled ports: 2
Interface Ten-GigabitEthernet1/0/1
DLDP port state: Bidirectional
Number of the port’s neighbors: 1
Neighbor MAC address: 0023-8956-3600
Neighbor port index: 1
Neighbor state: Confirmed
Neighbor aged time: 11s
Interface Ten-GigabitEthernet1/0/2
DLDP port state: Bidirectional
Number of the port’s neighbors: 1
Neighbor MAC address: 0023-8956-3600
Neighbor port index: 2
Neighbor state: Confirmed
Neighbor aged time: 12s
由此可见,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上的DLDP接口状态均为Bidirectional,表明这两个端口所在的链路均处于双通状态。
# 在Device A上配置允许日志信息输出到当前终端,且输出的日志信息最低为6级。
[DeviceA] quit
<DeviceA> terminal monitor
The current terminal is enabled to display logs.
<DeviceA> terminal logging level 6
以Device A和Device B的两对光纤被错误地进行了交叉连接为例,则网络管理员会在Device A上看到如下日志信息:
<DeviceA>%Jul 11 17:40:31:089 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/1 link status is DOWN.
%Jul 11 17:40:31:091 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/1 is DOWN.
%Jul 11 17:40:31:677 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is DOWN.
%Jul 11 17:40:31:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/2 is DOWN.
%Jul 11 17:40:38:544 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/1 link status is UP.
%Jul 11 17:40:38:836 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is UP.
上述信息表明,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2的物理状态都先down后up,而链路状态则都down后未再up。
# 查看Device A上DLDP的全局配置信息和所有接口上的DLDP信息。
DLDP global status: Enabled
DLDP advertisement interval: 5s
DLDP authentication-mode: None
DLDP unidirectional-shutdown mode: Auto
DLDP delaydown-timer value: 1s
Number of enabled ports: 2
Interface Ten-GigabitEthernet1/0/1
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
Interface Ten-GigabitEthernet1/0/2
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
上述信息表明,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。由此可知,DLDP在接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上都检测到了单向链路,并自动关闭了这两个接口。
网络管理员将这两对光纤重新进行正确连接后,在设备上可以看到如下日志信息:
%Jul 11 17:42:58:603 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is DOWN.
%Jul 11 17:43:02:342 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/1 link status is UP.
%Jul 11 17:43:02:343 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface Ten-GigabitEthernet1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 1.
%Jul 11 17:43:02:344 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface Ten-GigabitEthernet1/0/1.
%Jul 11 17:43:02:353 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/1 is UP.
%Jul 11 17:43:02:357 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is UP.
%Jul 11 17:43:02:362 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface Ten-GigabitEthernet1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 2.
%Jul 11 17:43:02:362 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface Ten-GigabitEthernet1/0/2.
%Jul 11 17:43:02:368 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/2 is UP.
上述信息表明,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2的物理状态和链路状态均已up,并各自确定了DLDP邻居,所在链路也变为双通状态。
· Device A
#
dldp global enable
#
interface Ten-GigabitEthernet1/0/1
speed 10000
duplex full
dldp enable
#
interface Ten-GigabitEthernet1/0/2
speed 10000
duplex full
dldp enable
#
· Device B
Device B上的配置文件与Device A完全一致,此处不再赘述。
表2 配置适用的产品与软件版本关系
产品 |
软件版本 |
S5830V2&S5820V2系列以太网交换机 |
Release 2208P01,Release 2210 |
如图2所示,Device A和Device B各自的端口之间分别通过一对光纤进行连接。
现要求在这两台设备上配置DLDP手动关闭单向链路功能,实现:
· DLDP能够检测到光纤交叉连接和一条光纤未连接或断路这两种类型的单向链路故障;
· 当DLDP检测到单向链路后,DLDP会提示网络管理员手工关闭故障端口;
· 当网络管理员排除故障后,需要重新将故障端口打开。
图2 DLDP检测并通知用户手动关闭单向链路典型配置组网图
为确保DLDP能够正常工作,需要将两端端口的双工模式都配置为全双工模式,速率都配置为相同的强制速率。
(1) 配置Device A
# 全局开启DLDP功能。
<DeviceA> system-view
[DeviceA] dldp global enable
# 在端口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上配置双工模式为全双工、端口速率为10000Mbps,并开启DLDP功能。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] duplex full
[DeviceA-Ten-GigabitEthernet1/0/1] speed 10000
[DeviceA-Ten-GigabitEthernet1/0/1] dldp enable
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] duplex full
[DeviceA-Ten-GigabitEthernet1/0/2] speed 10000
[DeviceA-Ten-GigabitEthernet1/0/2] dldp enable
[DeviceA-Ten-GigabitEthernet1/0/2] quit
# 配置发现单向链路后端口的关闭模式为手动模式。
[DeviceA] dldp unidirectional-shutdown manual
(2) 配置Device B
Device B上的配置与Device A上的配置完全一致,此处不再赘述。
配置完成后,通过使用display dldp命令可以查看DLDP的全局配置信息和接口上的DLDP信息。例如:
# 查看Device A上DLDP的全局配置信息和所有接口上的DLDP信息。
DLDP global status: Enabled
DLDP advertisement interval: 5s
DLDP authentication-mode: None
DLDP unidirectional-shutdown mode: Manual
DLDP delaydown-timer value: 1s
Number of enabled ports: 2
Interface Ten-GigabitEthernet1/0/1
DLDP port state: Bidirectional
Number of the port’s neighbors: 1
Neighbor MAC address: 0023-8956-3600
Neighbor port index: 1
Neighbor state: Confirmed
Neighbor aged time: 11s
Interface Ten-GigabitEthernet1/0/2
DLDP port state: Bidirectional
Number of the port’s neighbors: 1
Neighbor MAC address: 0023-8956-3600
Neighbor port index: 2
Neighbor state: Confirmed
Neighbor aged time: 12s
由此可见,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上的DLDP接口状态均为Bidirectional,说明这两个接口所在的链路均处于双通状态。
# 在Device A上配置允许日志信息输出到当前终端,且输出的日志信息最低为6级。
[DeviceA] quit
<DeviceA> terminal monitor
The current terminal is enabled to display logs.
<DeviceA> terminal logging level 6
以连接Device A和Device B的两对光纤被错误地进行了交叉连接为例,则网络管理员会在Device A上看到如下日志信息:
%Jul 12 08:29:17:787 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/1 is DOWN.
%Jul 12 08:29:17:800 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is DOWN.
%Jul 12 08:29:17:800 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/2 is DOWN.
%Jul 12 08:29:25:004 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/1 link status is UP.
%Jul 12 08:29:25:005 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/1 is UP.
%Jul 12 08:29:25:893 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is UP.
%Jul 12 08:29:25:894 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/2 is UP.
以上信息表明,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2的物理状态和链路状态都先down后up。
# 查看Device A上DLDP的全局配置信息和所有接口上的DLDP信息。
DLDP global status: Enabled
DLDP advertisement interval: 5s
DLDP authentication-mode: None
DLDP unidirectional-shutdown mode: Manual
DLDP delaydown-timer value: 1s
Number of enabled ports: 2
Interface Ten-GigabitEthernet1/0/1
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
Interface Ten-GigabitEthernet1/0/2
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
以上信息表明,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。由此可知,DLDP在接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2上都检测到了单向链路,但并未关闭这两个接口。
网络管理员将故障端口手工关闭:
# 关闭接口Ten-GigabitEthernet1/0/1。
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] shutdown
Device A上随即输出以下日志信息:
%Jul 12 08:34:23:718 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/1 is DOWN.
%Jul 12 08:34:23:778 2012 DeviceA IFNET/3/PHY_UPDOWN: Ten-GigabitEthernet1/0/2 link status is DOWN.
%Jul 12 08:34:23:779 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/2 is DOWN.
以上信息表明,接口Ten-GigabitEthernet1/0/1和Ten-GigabitEthernet1/0/2的物理状态和链路状态均已变为down。
# 关闭接口Ten-GigabitEthernet1/0/2。
[DeviceA-Ten-GigabitEthernet1/0/1] quit
[DeviceA] interface ten-gigabitethernet 1/0/2
[DeviceA-Ten-GigabitEthernet1/0/2] shutdown
然后,网络管理员将连接Device A和Device B的两对光纤重新进行了正确连接。检查无误后,网络管理员将已排除故障的端口重新打开:
# 打开接口Ten-GigabitEthernet1/0/2。
[DeviceA-Ten-GigabitEthernet1/0/2] undo shutdown
Device A上随即输出以下日志信息:
%Jul 12 08:46:17:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/2 is UP.
%Jul 12 08:46:17:959 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface Ten-GigabitEthernet1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 2.
%Jul 12 08:46:17:959 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface Ten-GigabitEthernet1/0/2.
以上信息表明,接口Ten-GigabitEthernet1/0/2的物理状态和链路状态均已up,并确定了DLDP邻居,所在链路也变为双通状态。
# 打开接口Ten-GigabitEthernet1/0/1。
[DeviceA-Ten-GigabitEthernet1/0/2] quit
[DeviceA] interface ten-gigabitethernet 1/0/1
[DeviceA-Ten-GigabitEthernet1/0/1] undo shutdown
Device A上随即输出以下日志信息:
%Jul 12 08:48:25:952 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface Ten-GigabitEthernet1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 1.
%Jul 12 08:48:25:953 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface Ten-GigabitEthernet1/0/1 is UP.
%Jul 12 08:48:25:953 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface Ten-GigabitEthernet1/0/1.
以上信息表明,接口Ten-GigabitEthernet1/0/1的物理状态和链路状态均已up,并确定了DLDP邻居,所在链路也变为双通状态。
· Device A
#
dldp global enable
dldp unidirectional-shutdown manual
#
interface Ten-GigabitEthernet1/0/1
speed 10000
duplex full
dldp enable
#
interface Ten-GigabitEthernet1/0/2
speed 10000
duplex full
dldp enable
#
· Device B
Device B上的配置文件与Device A完全一致,此处不再赘述。
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!