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

H3C S6850&S9850&S9820-64H 典型配置举例-Release 655x系列-6W100

目录

44-DLDP典型配置举例

本章节下载 44-DLDP典型配置举例  (260.58 KB)

44-DLDP典型配置举例

H3C S6850&S9850&S9820-64H DLDP典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2020  新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。

本文档中的信息可能变动,恕不另行通知。



1  简介

本文档介绍了DLDP的三种典型案例。

DLDP是H3C自主研发的一种链路层协议,可以监控光纤或铜质双绞线的链路状态。如果发现单向链路存在,DLDP会根据用户配置,自动关闭或通知用户手工关闭相关接口,以防止网络问题的发生。

2  配置前提

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

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

3  DLDP自动模式配置举例

3.1  组网需求

图1所示,Device A和Device B之间分别通过一对光纤进行连接。

现要求在这两台设备上配置DLDP自动模式,实现:

·            DLDP能够检测到光纤交叉连接或一条光纤未连接的单向链路故障;

·            当DLDP检测到单向链路故障后,DLDP会自动关闭故障接口;

·            当网络管理员排除故障后,故障接口能够自动恢复正常。

图1 DLDP自动模式配置组网图

 

3.2  适用产品及版本

表1 适用产品及版本

产品

软件版本

S6850系列

S9850系列

Release 6555P01

S9820-64H

Release 6555P01

 

3.3  配置注意事项

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

为确保DLDP能够正常工作,要保证两端设备的DLDP功能都处于开启状态,且Advertisement报文的发送间隔、DLDP认证模式和密码都相同。

3.3.1  配置步骤

(1)       Device A的配置

# 全局开启DLDP功能。

<DeviceA> system-view

[DeviceA] dldp global enable

# 在接口HundredGigE1/0/1和HundredGigE1/0/2上配置双工模式为全双工、端口速率为100000Mbps,并开启DLDP功能。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] duplex full

[DeviceA-HundredGigE1/0/1] speed 100000

[DeviceA-HundredGigE1/0/1] dldp enable

[DeviceA-HundredGigE1/0/1] quit

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] duplex full

[DeviceA-HundredGigE1/0/2] speed 100000

[DeviceA-HundredGigE1/0/2] dldp enable

[DeviceA-HundredGigE1/0/2] quit

# 配置Advertisement报文的发送间隔为5秒(缺省情况下,Advertisement报文的发送间隔为5秒),配置DLDP认证模式为明文认证,认证密码为abc。

[DeviceA] dldp interval 5

[DeviceA] dldp authentication-mode simple

[DeviceA] dldp authentication-password simple abc

# 配置发现单向链路后接口的关闭模式为自动模式(缺省情况下,关闭模式为自动模式)。

[DeviceA] dldp unidirectional-shutdown auto

(2)       Device B的配置

Device B上的配置与Device A上的配置完全一致,此处不再赘述。

3.3.2  验证配置

配置完成后,通过使用display dldp命令可以查看DLDP的全局配置信息和接口上的DLDP信息。例如:

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

[DeviceA] display dldp

 DLDP global status: Enabled

 DLDP advertisement interval: 5s

 DLDP authentication-mode: Simple

 DLDP authentication-password: ******

 DLDP unidirectional-shutdown mode: Auto

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface HundredGigE1/0/1

 DLDP port state: Bidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 100s

 Number of the port’s neighbors: 1

  Neighbor MAC address: 0023-8956-3600

  Neighbor port index: 1

  Neighbor state: Confirmed

  Neighbor aged time: 11s

  Neighbor echo time: -

 

Interface HundredGigE1/0/2

 DLDP port state: Bidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 100s

 Number of the port’s neighbors: 1

  Neighbor MAC address: 0023-8956-3600

  Neighbor port index: 2

  Neighbor state: Confirmed

  Neighbor aged time: 12s

  Neighbor echo time: -

由此可见,接口HundredGigE1/0/1和HundredGigE1/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

图2所示,以Device A和Device B的两对光纤被错误地进行了交叉连接为例。

图2 光纤交叉连接组网图

 

网络管理员会在Device A上看到如下日志信息:

<DeviceA>%Jul 11 17:40:31:089 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to down.

%Jul 11 17:40:31:091 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to down.

%Jul 11 17:40:31:677 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to down.

%Jul 11 17:40:31:678 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to down.

%Jul 11 17:40:38:544 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to up.

%Jul 11 17:40:38:836 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to up.

上述信息表明,接口HundredGigE1/0/1和HundredGigE1/0/2的物理状态都先down后up,而链路状态则都down后未再up。

# 查看Device A上接口HundredGigE1/0/1的运行状态和相关信息。

[DeviceA]display interface hundredgige 1/0/1

HundredGigE1/0/1

Current state: UP

Line protocol state: DOWN(DLDP)

IP packet frame type: Ethernet II, hardware address: 00e0-fc00-5929

Description: HundredGigE1/0/1 Interface

Bandwidth: 100000000kbps

Loopback is not set

Media type is optical fiber, Port hardware type is 10G_BASE_SR_SFP

10Gbps-speed mode, full-duplex mode

Link speed type is force link, link duplex type is force link

Flow-control is not enabled

Maximum frame length: 9216

Allow jumbo frame to pass

Broadcast max-ratio: 100%

Multicast max-ratio: 100%

Unicast max-ratio: 100%

PVID: 1

Mdi type: automdix

Port link-type: Access

 Tagged Vlan:   none

 UnTagged Vlan: 1

Port priority: 0

Last link flapping: 0 hours 11 minutes 9 seconds

Last clearing of counters: Never

 Peak input rate: 141 bytes/sec, at 2019-01-01 01:37:08

 Peak output rate: 84 bytes/sec, at 2019-01-01 05:39:56

 Last 300 second input:  0 packets/sec 99 bytes/sec 0%

 Last 300 second output:  0 packets/sec 63 bytes/sec 0%

 Input (total):  26470 packets, 2469445 bytes

          0 unicasts, 1 broadcasts, 26469 multicasts, 0 pauses

 Input (normal):  26470 packets, - bytes

          0 unicasts, 1 broadcasts, 26469 multicasts, 0 pauses

 Input:  0 input errors, 0 runts, 0 giants, 0 throttles

          0 CRC, 0 frame, - overruns, 0 aborts

          - ignored, - parity errors

 Output (total): 16962 packets, 1165236 bytes

          0 unicasts, 0 broadcasts, 16962 multicasts, 0 pauses

 Output (normal): 16962 packets, - bytes

          0 unicasts, 0 broadcasts, 16962 multicasts, 0 pauses

 Output: 0 output errors, - underruns, - buffer failures

          0 aborts, 0 deferred, 0 collisions, 0 late collisions

          0 lost carrier, - no carrier

上述信息表明,光纤被交叉连接后,接口HundredGigE1/0/1物理状态最终为up,链路层被DLDP协议自动关闭了。查看Device A上接口HundredGigE1/0/2的运行状态也和HundredGigE1/0/1一样。

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

<DeviceA> display dldp

 DLDP global status: Enabled

 DLDP advertisement interval: 5s

 DLDP authentication-mode: Simple

 DLDP authentication-password: ******

 DLDP unidirectional-shutdown mode: Auto

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface HundredGigE1/0/1

 DLDP port state: Unidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 0s

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

 

Interface HundredGigE1/0/2

 DLDP port state: Unidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 0s

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

上述信息表明,接口HundredGigE1/0/1和HundredGigE1/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。由此可知,DLDP在接口HundredGigE1/0/1和HundredGigE1/0/2上都检测到了单向链路。

网络管理员将这两对光纤重新进行正确连接后,在设备上可以看到如下日志信息:

<DeviceA>%Jul 11 17:42:57:709 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to down.

%Jul 11 17:42:58:603 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to down.

%Jul 11 17:43:02:342 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to up.

%Jul 11 17:43:02:343 2019 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface HundredGigE1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 1.

%Jul 11 17:43:02:344 2019 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface HundredGigE1/0/1.

%Jul 11 17:43:02:353 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to up.

%Jul 11 17:43:02:357 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to up.

%Jul 11 17:43:02:362 2019 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface HundredGigE1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 2.

%Jul 11 17:43:02:362 2019 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface HundredGigE1/0/2.

%Jul 11 17:43:02:368 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to up.

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

3.3.3  配置文件

·            Device A

#

 dldp global enable

 dldp authentication-mode simple

 dldp authentication-password cipher $c$3$wHDzwD/AZNW+q+otXapfZ/tUB/Wgbg==

#

interface HundredGigE1/0/1

 port link-mode bridge

 speed 100000

 duplex full

 dldp enable

#

interface HundredGigE1/0/2

 port link-mode bridge

 speed 100000

 duplex full

 dldp enable

#

·            Device B

Device B上的配置文件与Device A完全一致,此处不再赘述。

4  DLDP手动模式配置举例

4.1  组网需求

图3所示,Device A和Device B之间分别通过一对光纤进行连接。

现要求在这两台设备上配置DLDP手动模式,实现:

·            DLDP能够检测到光纤交叉连接或一条光纤未连接的单向链路故障;

·            当DLDP检测到单向链路后,网络管理员可以通过检查链路连接情况来判断是否需要手工关闭接口,避免由于网络性能较差、设备业务量较大或CPU利用率较高等情况造成DLDP对单通的误判而自动关闭接口;

·            当网络管理员排除故障并重新将故障接口打开后,故障接口才能够恢复正常。

图3 DLDP手动模式配置组网图

 

4.2  适用产品及版本

表2 适用产品及版本

产品

软件版本

S6850系列

S9850系列

Release 6555P01

S9820-64H

Release 6555P01

 

4.3  配置注意事项

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

为确保DLDP能够正常工作,要保证两端设备的DLDP功能都处于使能状态,且Advertisement报文的发送间隔、DLDP认证模式和密码都相同。

4.3.1  配置步骤

(1)       Device A的配置

# 全局开启DLDP功能。

<DeviceA> system-view

[DeviceA] dldp global enable

# 在端口HundredGigE1/0/1和HundredGigE1/0/2上配置双工模式为全双工、端口速率为100000Mbps,并开启DLDP功能。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] duplex full

[DeviceA-HundredGigE1/0/1] speed 100000

[DeviceA-HundredGigE1/0/1] dldp enable

[DeviceA-HundredGigE1/0/1] quit

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] duplex full

[DeviceA-HundredGigE1/0/2] speed 100000

[DeviceA-HundredGigE1/0/2] dldp enable

[DeviceA-HundredGigE1/0/2] quit

# 配置Advertisement报文的发送间隔为5秒(缺省情况下,Advertisement报文的发送间隔为5秒),配置DLDP认证模式为明文认证,认证密码为abc。

[DeviceA] dldp interval 5

[DeviceA] dldp authentication-mode simple

[DeviceA] dldp authentication-password simple abc

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

[DeviceA] dldp unidirectional-shutdown manual

(2)       Device B的配置

Device B上的配置与Device A上的配置完全一致,此处不再赘述。

4.3.2  验证配置

配置完成后,通过使用display dldp命令可以查看DLDP的全局配置信息和接口上的DLDP信息。例如:

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

[DeviceA] display dldp

 DLDP global status: Enabled

 DLDP advertisement interval: 5s

 DLDP authentication-mode: Simple

 DLDP authentication-password: ******

 DLDP unidirectional-shutdown mode: Manual

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface HundredGigE1/0/1

 DLDP port state: Bidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 100s

 Number of the port’s neighbors: 1

  Neighbor MAC address: 0023-8956-3600

  Neighbor port index: 1

  Neighbor state: Confirmed

  Neighbor aged time: 11s

  Neighbor echo time: -

 

Interface HundredGigE1/0/2

 DLDP port state: Bidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 100s

 Number of the port’s neighbors: 1

  Neighbor MAC address: 0023-8956-3600

  Neighbor port index: 2

  Neighbor state: Confirmed

  Neighbor aged time: 12s

  Neighbor echo time: -

由此可见,接口HundredGigE1/0/1和HundredGigE1/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

图4所示,以连接Device A和Device B的两对光纤被错误地进行了交叉连接为例。

图4 光纤交叉连接组网图

 

网络管理员会在Device A上看到如下日志信息:

<DeviceA>%Jul 12 08:29:17:786 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to down.

%Jul 12 08:29:17:787 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to down.

%Jul 12 08:29:17:800 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to down.

%Jul 12 08:29:17:800 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to down.

%Jul 12 08:29:25:004 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to up.

%Jul 12 08:29:25:005 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to up.

%Jul 12 08:29:25:893 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to up.

%Jul 12 08:29:25:894 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to up.

以上信息表明,接口HundredGigE1/0/1和HundredGigE1/0/2的物理状态和链路状态都先down后up。

# 查看Device A上接口HundredGigE1/0/1的运行状态和相关信息。

[DeviceA]display interface hundredgige 1/0/1

HundredGigE1/0/1

Current state: UP

Line protocol state: UP

IP packet frame type: Ethernet II, hardware address: 00e0-fc00-5929

Description: HundredGigE1/0/1 Interface

Bandwidth: 100000000kbps

Loopback is not set

Media type is optical fiber, Port hardware type is 10G_BASE_SR_SFP

10Gbps-speed mode, full-duplex mode

Link speed type is force link, link duplex type is force link

Flow-control is not enabled

Maximum frame length: 9216

Allow jumbo frame to pass

Broadcast max-ratio: 100%

Multicast max-ratio: 100%

Unicast max-ratio: 100%

PVID: 1

Mdi type: automdix

Port link-type: Access

 Tagged Vlan:   none

 UnTagged Vlan: 1

Port priority: 0

Last link flapping: 0 hours 11 minutes 9 seconds

Last clearing of counters: Never

 Peak input rate: 141 bytes/sec, at 2019-01-01 01:37:08

 Peak output rate: 104 bytes/sec, at 2019-01-01 06:40:58

 Last 300 second input:  0 packets/sec 27 bytes/sec 0%

 Last 300 second output:  1 packets/sec 101 bytes/sec 0%

 Input (total):  27226 packets, 2547709 bytes

          0 unicasts, 1 broadcasts, 27225 multicasts, 0 pauses

 Input (normal):  27226 packets, - bytes

          0 unicasts, 1 broadcasts, 27225 multicasts, 0 pauses

 Input:  0 input errors, 0 runts, 0 giants, 0 throttles

          0 CRC, 0 frame, - overruns, 0 aborts

          - ignored, - parity errors

 Output (total): 17991 packets, 1260564 bytes

          0 unicasts, 0 broadcasts, 17991 multicasts, 0 pauses

 Output (normal): 17991 packets, - bytes

          0 unicasts, 0 broadcasts, 17991 multicasts, 0 pauses

 Output: 0 output errors, - underruns, - buffer failures

          0 aborts, 0 deferred, 0 collisions, 0 late collisions

          0 lost carrier, - no carrier

上述信息表明,光纤被交叉连接后,接口HundredGigE1/0/1物理状态最终为up,链路层协议状态最终也为up,由此可知DLDP协议并没有关闭接口HundredGigE1/0/1。查看Device A上接口HundredGigE1/0/2的运行状态也和HundredGigE1/0/1一样。

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

<DeviceA> display dldp

 DLDP global status: Enabled

 DLDP advertisement interval: 5s

 DLDP authentication-mode: Simple

 DLDP authentication-password: ******

 DLDP unidirectional-shutdown mode: Manual

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface HundredGigE1/0/1

 DLDP port state: Unidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 0s

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

 

Interface HundredGigE1/0/2

 DLDP port state: Unidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 0s

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

以上信息表明,接口HundredGigE1/0/1和HundredGigE1/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。由此可知,DLDP在接口HundredGigE1/0/1和HundredGigE1/0/2上都检测到了单向链路,但并未关闭这两个接口。

网络管理员将故障端口手工关闭:

# 关闭接口HundredGigE1/0/1。

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] shutdown

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

[DeviceA-HundredGigE1/0/1]%Jul 12 08:34:23:717 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to down.

%Jul 12 08:34:23:718 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to down.

%Jul 12 08:34:23:778 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to down.

%Jul 12 08:34:23:779 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to down.

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

# 关闭接口HundredGigE1/0/2。

[DeviceA-HundredGigE1/0/1] quit

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] shutdown

然后,网络管理员将连接Device A和Device B的两对光纤重新进行了正确连接。检查无误后,网络管理员将已排除故障的端口重新打开:

# 打开接口HundredGigE1/0/2。

[DeviceA-HundredGigE1/0/2] undo shutdown

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

[DeviceA-HundredGigE1/0/2]%Jul 12 08:46:17:677 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to up.

%Jul 12 08:46:17:678 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to up.

%Jul 12 08:46:17:959 2019 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface HundredGigE1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 2.

%Jul 12 08:46:17:959 2019 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface HundredGigE1/0/2.

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

# 打开接口HundredGigE1/0/1。

[DeviceA-HundredGigE1/0/2] quit

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] undo shutdown

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

[DeviceA-HundredGigE1/0/1]%Jul 12 08:48:25:952 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to up.

%Jul 12 08:48:25:952 2019 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface HundredGigE1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 1.

%Jul 12 08:48:25:953 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to up.

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

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

4.3.3  配置文件

·            Device A

#

 dldp global enable

 dldp authentication-mode simple

 dldp authentication-password cipher $c$3$wHDzwD/AZNW+q+otXapfZ/tUB/Wgbg==

 dldp unidirectional-shutdown manual

#

interface HundredGigE1/0/1

 port link-mode bridge

 speed 100000

 duplex full

 dldp enable

#

interface HundredGigE1/0/2

 port link-mode bridge

 speed 100000

 duplex full

 dldp enable

#

·            Device B

Device B上的配置文件与Device A完全一致,此处不再赘述。

5  DLDP混合模式配置举例

5.1  组网需求

图5所示,Device A和Device B之间分别通过一对光纤进行连接。

现要求在这两台设备上配置DLDP混合模式,实现:

·            DLDP能够检测到光纤交叉连接或一条光纤未连接的单向链路故障;

·            当DLDP检测到单向链路故障后,DLDP会自动关闭故障接口;

·            当网络管理员排除故障并重新将故障接口打开后,故障接口才能够恢复正常。

图5 DLDP混合模式配置组网图

 

5.2  适用产品及版本

表3 适用产品及版本

产品

软件版本

S6850系列

S9850系列

Release 6555P01

S9820-64H

Release 6555P01

 

5.3  配置注意事项

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

为确保DLDP能够正常工作,要保证两端设备的DLDP功能都处于开启状态,且Advertisement报文的发送间隔、DLDP认证模式和密码都相同。

5.3.1  配置步骤

(1)       Device A的配置

# 全局开启DLDP功能。

<DeviceA> system-view

[DeviceA] dldp global enable

# 在接口HundredGigE1/0/1和HundredGigE1/0/2上配置双工模式为全双工、端口速率为100000Mbps,并开启DLDP功能。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] duplex full

[DeviceA-HundredGigE1/0/1] speed 100000

[DeviceA-HundredGigE1/0/1] dldp enable

[DeviceA-HundredGigE1/0/1] quit

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] duplex full

[DeviceA-HundredGigE1/0/2] speed 100000

[DeviceA-HundredGigE1/0/2] dldp enable

[DeviceA-HundredGigE1/0/2] quit

# 配置Advertisement报文的发送间隔为5秒(缺省情况下,Advertisement报文的发送间隔为5秒),配置DLDP认证模式为明文认证,认证密码为abc。

[DeviceA] dldp interval 5

[DeviceA] dldp authentication-mode simple

[DeviceA] dldp authentication-password simple abc

# 配置发现单向链路后接口的关闭模式为混合模式。

[DeviceA] dldp unidirectional-shutdown hybrid

(2)       Device B的配置

Device B上的配置与Device A上的配置完全一致,此处不再赘述。

5.3.2  验证配置

配置完成后,通过使用display dldp命令可以查看DLDP的全局配置信息和接口上的DLDP信息。例如:

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

[DeviceA] display dldp

 DLDP global status: Enabled

 DLDP advertisement interval: 5s

 DLDP authentication-mode: Simple

 DLDP authentication-password: ******

 DLDP unidirectional-shutdown mode: Hybrid

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface HundredGigE1/0/1

 DLDP port state: Bidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 100s

 Number of the port’s neighbors: 1

  Neighbor MAC address: 0023-8956-3600

  Neighbor port index: 1

  Neighbor state: Confirmed

  Neighbor aged time: 11s

  Neighbor echo time: -

 

Interface HundredGigE1/0/2

 DLDP port state: Bidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 100s

 Number of the port’s neighbors: 1

  Neighbor MAC address: 0023-8956-3600

  Neighbor port index: 2

  Neighbor state: Confirmed

  Neighbor aged time: 12s

  Neighbor echo time: -

由此可见,接口HundredGigE1/0/1和HundredGigE1/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

3.3.2  图2所示,以Device A和Device B的两对光纤被错误地进行了交叉连接为例。

图6 光纤交叉连接组网图

 

网络管理员会在Device A上看到如下日志信息:

<DeviceA>%Jan  4 07:16:06:556 2019 DeviceA DLDP/5/DLDP_NEIGHBOR_AGED: A neighbor on interface

HundredGigE1/0/1 was deleted because the neighbor was aged. The neighbor's system MAC is 0023-8956-3600, and the port index is 162.

%Jan  4 07:16:06:560 2019 DeviceA DLDP/5/DLDP_NEIGHBOR_AGED: A neighbor on interface

HundredGigE1/0/2 was deleted because the neighbor was aged. The neighbor's system MAC is 0023-8956-3600, and the port index is 165.

%Jan  4 07:16:06:724 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to down.

%Jan  4 07:16:06:730 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to down.

%Jan  4 07:16:06:736 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to down.

%Jan  4 07:16:06:738 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to down.

%Jan  4 07:16:07:152 2019 DeviceA DLDP/3/DLDP_LINK_UNIDIRECTIONAL: DLDP detected a unidirectional link on interface HundredGigE1/0/1. DLDP automatically shut down the interface. Please manually bring up the interface.

%Jan  4 07:16:07:156 2019 DeviceA DLDP/3/DLDP_LINK_UNIDIRECTIONAL: DLDP detected a unidirectional link on interface HundredGigE1/0/2. DLDP automatically shut down the interface. Please manually bring up the interface.

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

# 查看Device A上接口HundredGigE1/0/1的运行状态和相关信息。

[DeviceA]display interface hundredgige 1/0/1

HundredGigE1/0/1

Current state: DOWN

Line protocol state: DOWN(DLDP)

IP packet frame type: Ethernet II, hardware address: 00e0-fc00-5929

Description: HundredGigE1/0/1 Interface

Bandwidth: 100000000kbps

Loopback is not set

Media type is optical fiber, Port hardware type is 10G_BASE_SR_SFP

10Gbps-speed mode, full-duplex mode

Link speed type is force link, link duplex type is force link

Flow-control is not enabled

Maximum frame length: 9216

Allow jumbo frame to pass

Broadcast max-ratio: 100%

Multicast max-ratio: 100%

Unicast max-ratio: 100%

PVID: 1

Mdi type: automdix

Port link-type: Access

 Tagged Vlan:   none

 UnTagged Vlan: 1

Port priority: 0

Last link flapping: 0 hours 11 minutes 9 seconds

Last clearing of counters: Never

 Peak input rate: 141 bytes/sec, at 2019-01-01 01:37:08

 Peak output rate: 84 bytes/sec, at 2019-01-01 05:39:56

 Last 300 second input:  0 packets/sec 99 bytes/sec 0%

 Last 300 second output:  0 packets/sec 63 bytes/sec 0%

 Input (total):  26470 packets, 2469445 bytes

          0 unicasts, 1 broadcasts, 26469 multicasts, 0 pauses

 Input (normal):  26470 packets, - bytes

          0 unicasts, 1 broadcasts, 26469 multicasts, 0 pauses

 Input:  0 input errors, 0 runts, 0 giants, 0 throttles

          0 CRC, 0 frame, - overruns, 0 aborts

          - ignored, - parity errors

 Output (total): 16962 packets, 1165236 bytes

          0 unicasts, 0 broadcasts, 16962 multicasts, 0 pauses

 Output (normal): 16962 packets, - bytes

          0 unicasts, 0 broadcasts, 16962 multicasts, 0 pauses

 Output: 0 output errors, - underruns, - buffer failures

          0 aborts, 0 deferred, 0 collisions, 0 late collisions

          0 lost carrier, - no carrier

上述信息表明,光纤被交叉连接后,接口HundredGigE1/0/1物理状态变为down,链路层被DLDP协议自动关闭了。查看Device A上接口HundredGigE1/0/2的运行状态也和HundredGigE1/0/1一样。

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

<DeviceA> display dldp

 DLDP global status: Enabled

 DLDP advertisement interval: 5s

 DLDP authentication-mode: Simple

 DLDP authentication-password: ******

 DLDP unidirectional-shutdown mode: Hybrid

 DLDP delaydown-timer value: 1s

 Number of enabled ports: 2

 

Interface HundredGigE1/0/1

 DLDP port state: Unidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 0s

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

 

Interface HundredGigE1/0/2

 DLDP port state: Unidirectional

 DLDP port unidirectional-shutdown mode: None

 DLDP initial-unidirectional-delay: 0s

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

上述信息表明,接口HundredGigE1/0/1和HundredGigE1/0/2上的DLDP接口状态均为Unidirectional,说明这两个接口所在的链路均处于单通状态。由此可知,DLDP在接口HundredGigE1/0/1和HundredGigE1/0/2上都检测到了单向链路。

网络管理员将这两对光纤重新进行正确连接,并将Device A的两个接口重新打开:

# 打开接口HundredGigE1/0/1。

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] undo shutdown

在设备上可以看到如下日志信息:

[DeviceA-HundredGigE1/0/1]%Jan  4 07:33:26:574 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/1 changed to up.

%Jan  4 07:33:57:562 2019 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface HundredGigE1/0/1. The neighbor's system MAC is 0023-8956-3600, and the port index is 162.

%Jan  4 07:33:57:563 2019 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface HundredGigE1/0/1.

%Jan  4 07:33:57:590 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/1 changed to up.

%Jan  4 07:33:57:609 2019 DeviceA STP/6/STP_DETECTED_TC: Instance 0's port HundredGigE1/0/1 detected a topology change.

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

# 打开接口HundredGigE1/0/2。

[DeviceA-HundredGigE1/0/2] quit

[DeviceA] interface HundredGigE1/0/2

[DeviceA-HundredGigE1/0/2] undo shutdown

在设备上可以看到如下日志信息:

[DeviceA-HundredGigE1/0/2]%Jan  4 07:35:26:574 2019 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface HundredGigE1/0/2 changed to up.

%Jan  4 07:35:57:562 2019 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface HundredGigE1/0/2. The neighbor's system MAC is 0023-8956-3600, and the port index is 162.

%Jan  4 07:35:57:563 2019 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface HundredGigE1/0/2.

%Jan  4 07:35:57:590 2019 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface HundredGigE1/0/2 changed to up.

%Jan  4 07:35:57:609 2019 DeviceA STP/6/STP_DETECTED_TC: Instance 0's port HundredGigE1/0/2 detected a topology change.

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

5.3.3  配置文件

·            Device A

#

 dldp global enable

 dldp authentication-mode simple

 dldp authentication-password cipher $c$3$wHDzwD/AZNW+q+otXapfZ/tUB/Wgbg==

 dldp unidirectional-shutdown hybrid

#

interface HundredGigE1/0/1

 port link-mode bridge

 speed 100000

 duplex full

 dldp enable

#

interface HundredGigE1/0/2

 port link-mode bridge

 speed 100000

 duplex full

 dldp enable

#

·            Device B

Device B上的配置文件与Device A完全一致,此处不再赘述。

6  相关资料

·            H3C S6850 & S9850系列以太网交换机 可靠性配置指导-Release 655x系列

·            H3C S6850 & S9850系列以太网交换机 可靠性命令参考-Release 655x系列

·            H3C S9820-64H交换机 可靠性配置指导-Release 655x系列

·            H3C S9820-64H交换机 可靠性命令参考-Release 655x系列

 

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

新华三官网
联系我们