• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

10-可靠性配置举例

目录

00-S12500_DLDP典型配置举例

本章节下载 00-S12500_DLDP典型配置举例  (171.47 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500/Configure/Typical_Configuration_Example/H3C_S12500-R7129-6W100/10/201309/796631_30005_0.htm

00-S12500_DLDP典型配置举例


1  简介

本文档介绍了DLDP(Device Link Detection Protocol,设备链路检测协议)的配置举例。

DLDP能够通过在链路层监控光纤或网线的链路状态,检测链路连接是否正确、链路两端可否正常交互报文。当发现单向链路时,DLDP会根据用户配置自动关闭或由用户手工关闭相关接口,以防止错误转发、环路等网络问题的发生。DLDP与物理层检测机制协同工作,可以检测并避免物理和逻辑的单向连接。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解DLDP特性。

3  DLDP自动关闭单向链路配置举例

3.1  组网需求

图1所示,Device A和Device B通过两根长光纤连接,要求通过配置,使DLDP检测到单向链路故障后自动关闭故障端口;当故障排除后,自动恢复Down掉的端口。

图1 DLDP自动关闭单向链路配置组网图

 

 

3.2  使用版本

本举例是在S12500-CMW710-R7129版本上进行配置和验证的软件版本

3.3  配置注意事项

·     DLDP功能只对以太网接口生效。

·     要启用DLDP功能,必须在全局和接口上都使能DLDP功能。

·     为了使DLDP能够正常工作,需要将两端端口的双工模式都配置为全双工模式,速率都配置为相同的强制速率。

·     只有当物理链路连通后,DLDP才能检测出单向链路。因此在使能DLDP之前,请先连接好光纤或铜质双绞线。

3.4  配置步骤

3.4.1  Device A的配置

# 全局使能DLDP功能。

<DeviceA> system-view

[DeviceA] dldp global enable

# 在接口GigabitEthernet3/0/1上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceA] interface gigabitethernet 3/0/1

[DeviceA-Gigabitethernet3/0/1] undo shutdown

[DeviceA-GigabitEthernet3/0/1] duplex full

[DeviceA-GigabitEthernet3/0/1] speed 1000

[DeviceA-GigabitEthernet3/0/1] dldp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 在接口GigabitEthernet3/0/2上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceA] interface gigabitethernet 3/0/2

[DeviceA-Gigabitethernet3/0/2] undo shutdown

[DeviceA-GigabitEthernet3/0/2] duplex full

[DeviceA-GigabitEthernet3/0/2] speed 1000

[DeviceA-GigabitEthernet3/0/2] dldp enable

[DeviceA-GigabitEthernet3/0/2] quit

3.4.2  Device B的配置

# 全局使能DLDP功能。

<DeviceB> system-view

[DeviceB] dldp global enable

# 在接口GigabitEthernet3/0/1上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceB] interface gigabitethernet 3/0/1

[DeviceB-Gigabitethernet3/0/1] undo shutdown

[DeviceB-GigabitEthernet3/0/1] duplex full

[DeviceB-GigabitEthernet3/0/1] speed 1000

[DeviceB-GigabitEthernet3/0/1] dldp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 在接口GigabitEthernet3/0/2上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceB] interface gigabitethernet 3/0/2

[DeviceB-Gigabitethernet3/0/2] undo shutdown

[DeviceB-GigabitEthernet3/0/2] duplex full

[DeviceB-GigabitEthernet3/0/2] speed 1000

[DeviceB-GigabitEthernet3/0/2] dldp enable

[DeviceB-GigabitEthernet3/0/2] quit

3.5  验证配置

配置完成后,通过使用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 GigabitEthernet3/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 GigabitEthernet3/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

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2上的DLDP接口状态均为Bidirectional,说明这两个接口所在的链路均处于双通状态。

# 在Device A上配置允许日志信息输出到当前终端,且输出的日志信息最低为6级。

[DeviceA] quit

<DeviceA> terminal monitor

<DeviceA> terminal logging level 6

此后某刻,Device A上输出了以下日志信息:

<DeviceA>%Jul 11 17:40:31:089 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is DOWN.

%Jul 11 17:40:31:091 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/1 is DOWN.

%Jul 11 17:40:31:677 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is DOWN.

%Jul 11 17:40:31:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/2 is DOWN.

%Jul 11 17:40:38:544 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is UP.

%Jul 11 17:40:38:836 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is UP.

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2的物理状态都先down后up,而链路状态则都down后未再up。网络管理员进行进一步检查:

# 查看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 GigabitEthernet3/0/1

 DLDP port state: Unidirectional

 Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

 

Interface GigabitEthernet3/0/2

 DLDP port state: Unidirectional

 Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。

由此可知,DLDP在接口GigabitEthernet3/0/1和GigabitEthernet3/0/2上都检测到了单向链路,并自动关闭了这两个接口。经检查,网络管理员发现连接Device A和Device B的两对光纤被错误地进行了交叉连接,于是他将这两对光纤重新进行了正确连接。随后,Device A上输出了以下日志信息:

<DeviceA>%Jul 11 17:42:57:709 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is DOWN.

%Jul 11 17:42:58:603 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is DOWN.

%Jul 11 17:43:02:342 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/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 GigabitEthernet3/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 GigabitEthernet3/0/1.

%Jul 11 17:43:02:353 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/1 is UP.

%Jul 11 17:43:02:357 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/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 GigabitEthernet3/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 GigabitEthernet3/0/2.

%Jul 11 17:43:02:368 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/2 is UP.

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2的物理状态和链路状态均已up,并各自确定了DLDP邻居,所在链路也变为双通状态。

3.6  配置文件

·     Device A

#

 dldp global enable

#

 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

#

·     Device B

#

 dldp global enable

#

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

#

4  DLDP提示手动关闭单向链路配置举例

4.1  组网需求

图2所示,Device A和Device B通过两根长光纤连接,要求通过配置,使DLDP检测到单向链路故障后,提示网络管理员手工关闭故障端口。

图2 DLDP提示手动关闭单向链路配置组网图

 

4.2  配置思路

需求中要求发现单向链路时,能够提示手工关闭故障端口,因此配置发现单向链路后端口的关闭模式为手动模式(缺省情况下为自动模式)。

4.3  使用版本

本举例是在S12500-CMW710-R7129版本上进行配置和验证的软件版本。

4.4  配置注意事项

·     DLDP功能只对以太网接口生效。

·     要启用DLDP功能,必须在全局和接口上都使能DLDP功能。

·     为了使DLDP能够正常工作,需要将两端端口的双工模式都配置为全双工模式,速率都配置为相同的强制速率。

·     只有当物理链路连通后,DLDP才能检测出单向链路。因此在使能DLDP之前,请先连接好光纤或铜质双绞线。

4.5  配置步骤

4.5.1  Device A的配置

# 全局使能DLDP功能。

<DeviceA> system-view

[DeviceA] dldp global enable

# 在接口GigabitEthernet3/0/1上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceA] interface gigabitethernet 3/0/1

[DeviceA-Gigabitethernet3/0/1] undo shutdown

[DeviceA-GigabitEthernet3/0/1] duplex full

[DeviceA-GigabitEthernet3/0/1] speed 1000

[DeviceA-GigabitEthernet3/0/1] dldp enable

[DeviceA-GigabitEthernet3/0/1] quit

# 在接口GigabitEthernet3/0/2上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceA] interface gigabitethernet 3/0/2

[DeviceA-Gigabitethernet3/0/2] undo shutdown

[DeviceA-GigabitEthernet3/0/2] duplex full

[DeviceA-GigabitEthernet3/0/2] speed 1000

[DeviceA-GigabitEthernet3/0/2] dldp enable

[DeviceA-GigabitEthernet3/0/2] quit

# 配置DLDP发现单向链路后接口的关闭模式为手动模式。需求中要求发现单向链路时,能够提示手工关闭故障端口,因此配置关闭模式为手动模式(缺省情况下为自动模式)。

[DeviceA] dldp unidirectional-shutdown manual

4.5.2  Device B的配置

# 全局使能DLDP功能。

<DeviceB> system-view

[DeviceB] dldp global enable

# 在接口GigabitEthernet3/0/1上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceB] interface gigabitethernet 3/0/1

[DeviceB-Gigabitethernet3/0/1] undo shutdown

[DeviceB-GigabitEthernet3/0/1] duplex full

[DeviceB-GigabitEthernet3/0/1] speed 1000

[DeviceB-GigabitEthernet3/0/1] dldp enable

[DeviceB-GigabitEthernet3/0/1] quit

# 在接口GigabitEthernet3/0/2上配置双工模式为全双工、接口速率为1000Mbps,并使能DLDP功能。

[DeviceB] interface gigabitethernet 3/0/2

[DeviceB-Gigabitethernet3/0/2] undo shutdown

[DeviceB-GigabitEthernet3/0/2] duplex full

[DeviceB-GigabitEthernet3/0/2] speed 1000

[DeviceB-GigabitEthernet3/0/2] dldp enable

[DeviceB-GigabitEthernet3/0/2] quit

# 配置DLDP发现单向链路后接口的关闭模式为手动模式。

[DeviceB] dldp unidirectional-shutdown manual

4.6  验证配置

配置完成后,通过使用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: Manual

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface GigabitEthernet3/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 GigabitEthernet3/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

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2上的DLDP接口状态均为Bidirectional,说明这两个接口所在的链路均处于双通状态。

# 在Device A上配置允许日志信息输出到当前终端,且输出的日志信息最低为6级。

[DeviceA] quit

<DeviceA> terminal monitor

<DeviceA> terminal logging level 6

此后某刻,网络管理员在Device A上看到如下Log信息:

<DeviceA>%Jul 12 08:29:17:786 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is DOWN.

%Jul 12 08:29:17:787 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/1 is DOWN.

%Jul 12 08:29:17:800 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is DOWN.

%Jul 12 08:29:17:800 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/2 is DOWN.

%Jul 12 08:29:25:004 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is UP.

%Jul 12 08:29:25:005 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/1 is UP.

%Jul 12 08:29:25:893 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is UP.

%Jul 12 08:29:25:894 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/2 is UP.

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2的物理状态和链路状态都先down后up。网络管理员进行进一步检查:

# 查看Device A上DLDP的全局配置信息和所有接口上的DLDP信息。

<DeviceA> display 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 GigabitEthernet3/0/1

 DLDP port state: Unidirectional

 Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

 

Interface GigabitEthernet3/0/2

 DLDP port state: Unidirectional

 Number of the port’s neighbors: 0 (Maximum number ever detected: 1)

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。

由此可知,DLDP在接口GigabitEthernet3/0/1和GigabitEthernet3/0/2上都检测到了单向链路,但并未关闭这两个接口。经检查,网络管理员发现连接Device A和Device B的两对光纤被错误地进行了交叉连接,于是他分别将Device A的两个接口手工关闭:

# 关闭接口GigabitEthernet3/0/1。

<DeviceA> system-view

[DeviceA] interface gigabitethernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] shutdown

Device A上随即输出以下日志信息:

[DeviceA-GigabitEthernet3/0/1]%Jul 12 08:34:23:717 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is DOWN.

%Jul 12 08:34:23:718 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/1 is DOWN.

%Jul 12 08:34:23:778 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is DOWN.

%Jul 12 08:34:23:779 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/2 is DOWN.

以上信息表明,接口GigabitEthernet3/0/1和GigabitEthernet3/0/2的物理状态和链路状态均已变为down。

# 关闭接口GigabitEthernet3/0/2。

[DeviceA-GigabitEthernet3/0/1] quit

[DeviceA] interface gigabitethernet 3/0/2

[DeviceA-GigabitEthernet3/0/2] shutdown

然后,网络管理员将连接Device A和Device B的两对光纤重新进行了正确连接,检查无误后,他又分别将Device A的两个接口重新打开:

# 打开接口GigabitEthernet3/0/2。

[DeviceA-GigabitEthernet3/0/2] undo shutdown

Device A上随即输出以下日志信息:

[DeviceA-GigabitEthernet3/0/2]%Jul 12 08:46:17:677 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/2 link status is UP.

%Jul 12 08:46:17:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol on the interface GigabitEthernet3/0/2 is UP.

%Jul 12 08:46:17:959 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface GigabitEthernet3/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 GigabitEthernet3/0/2.

以上信息表明,接口GigabitEthernet3/0/2的物理状态和链路状态均已up,并确定了DLDP邻居,所在链路也变为双通状态。

# 打开接口GigabitEthernet3/0/1。

[DeviceA-GigabitEthernet3/0/2] quit

[DeviceA] interface gigabitethernet 3/0/1

[DeviceA-GigabitEthernet3/0/1] undo shutdown

Device A上随即输出以下日志信息:

[DeviceA-GigabitEthernet3/0/1]%Jul 12 08:48:25:952 2012 DeviceA IFNET/3/PHY_UPDOWN: GigabitEthernet3/0/1 link status is UP.

%Jul 12 08:48:25:952 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface GigabitEthernet3/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 GigabitEthernet3/0/1 is UP.

%Jul 12 08:48:25:953 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface GigabitEthernet3/0/1.

以上信息表明,接口GigabitEthernet3/0/1的物理状态和链路状态均已up,并确定了DLDP邻居,所在链路也变为双通状态。

4.7  配置文件

·     Device A

#

 dldp global enable

 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

#

·     Device B

#

 dldp global enable

 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

#

5  相关资料

·     《H3C S12500系列路由交换机 可靠性配置指导》中的“DLDP”

·     《H3C S12500系列路由交换机 可靠性命令参考》中的“DLDP”

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们