03-DLDP命令
本章節下載: 03-DLDP命令 (119.81 KB)
1.1.3 dldp authentication-mode
1.1.4 dldp authentication-password
1.1.9 dldp unidirectional-shutdown
display dldp命令用來顯示DLDP的全局配置信息和接口的DLDP信息。
【命令】
display dldp [ interface interface-type interface-number ]
【視圖】
任意視圖
【缺省用戶角色】
network-admin
network-operator
【參數】
interface interface-type interface-number:顯示指定接口的DLDP信息,interface-type interface-number為接口類型和接口編號。如果未指定本參數,將顯示DLDP的全局配置信息和所有接口的DLDP信息。
【舉例】
# 顯示DLDP的全局配置信息和所有接口的DLDP信息。
<Sysname> 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 Ten-GigabitEthernet1/0/1
DLDP port state: Bidirectional
Number of the port’s neighbors: 1
Neighbor MAC address: 0023-8956-3600
Neighbor port index: 79
Neighbor state: Confirmed
Neighbor aged time: 13s
Interface Ten-GigabitEthernet1/0/2
DLDP port state: Inactive
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
# 顯示接口Ten-GigabitEthernet1/0/1的DLDP信息。
<Sysname> display dldp interface ten-gigabitethernet 1/0/1
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: 79
Neighbor state: Confirmed
Neighbor aged time: 13s
表1-1 display dldp命令顯示信息描述表
字段 |
描述 |
DLDP global status |
DLDP的全局狀態: · Enabled:表示已使能 · Disabled:表示已關閉 |
DLDP advertisement interval |
Advertisement報文的發送間隔,單位為秒 |
DLDP authentication-mode |
當前設備與鄰居設備間的DLDP認證模式: · MD5:表示MD5認證 · None:表示不認證 · Simple:表示明文認證 |
DLDP authentication-password |
當前設備與鄰居設備間的DLDP認證密碼: · ******:表示已配置密碼 · Not configured:表示已配置認證模式但尚未配置密碼 |
DLDP unidirectional-shutdown mode |
DLDP發現單向鏈路後接口的關閉模式: · Auto:表示自動模式 · Manual:表示手動模式 |
DLDP delaydown-timer value |
DelayDown定時器的超時時間,單位為秒 |
Number of enabled ports |
使能DLDP的接口數 |
Interface |
使能DLDP的接口名稱 |
DLDP port state |
DLDP接口的狀態: · Bidirectional:表示雙通狀態 · Inactive:表示非活動狀態 · Initial:表示初始狀態 · Unidirectional:表示單通狀態 |
Number of the port’s neighbors |
接口的鄰居數 |
Maximum number ever detected |
接口曾收到的最大鄰居數(隻有在接口的當前鄰居數與其曾收到的最大鄰居數不一致時,才會顯示本字段) |
Neighbor MAC address |
鄰居的MAC地址 |
Neighbor port index |
鄰居的接口索引 |
Neighbor state |
DLDP鄰居的狀態: · Confirmed:表示確定狀態 · Unconfirmed:表示未確定狀態 |
Neighbor aged time |
鄰居的老化時間,單位為秒 |
display dldp statistics命令用來顯示接口的DLDP報文統計信息。
【命令】
display dldp statistics [ interface interface-type interface-number ]
【視圖】
任意視圖
【缺省用戶角色】
network-admin
network-operator
【參數】
interface interface-type interface-number:顯示指定接口的DLDP報文統計信息,interface-type interface-number為接口類型和接口編號。如果未指定本參數,將顯示所有接口的DLDP報文統計信息。
【舉例】
# 顯示所有接口的DLDP報文統計信息。
<Sysname> display dldp statistics
Interface Ten-GigabitEthernet1/0/1
Packets sent: 6
Packets received: 5
Invalid packets received: 2
Loopback packets received: 0
Authentication-failed packets received: 0
Valid packets received: 3
Interface Ten-GigabitEthernet1/0/2
Packets sent: 7
Packets received: 7
Invalid packets received: 3
Loopback packets received: 0
Authentication-failed packets received: 0
Valid packets received: 4
表1-2 display dldp statistics命令顯示信息描述表
字段 |
描述 |
Interface |
使能DLDP的接口名稱 |
Packets sent |
發送的報文總數 |
Packets received |
收到的報文總數 |
Invalid packets received |
收到的錯誤報文數 |
Loopback packets received |
收到的自環報文數 |
Authentication-failed packets received |
收到的認證失敗報文數 |
Valid packets received |
收到的合法報文數 |
【相關命令】
· reset dldp statistics
dldp authentication-mode命令用來配置當前設備與鄰居設備間的DLDP認證模式。
undo dldp authentication-mode命令用來恢複缺省情況。
【命令】
dldp authentication-mode { md5 | none | simple }
undo dldp authentication-mode
【缺省情況】
當前設備與鄰居設備間的DLDP認證模式為不認證。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
md5:表示認證模式為MD5認證。
none:表示認證模式為不認證。
simple:表示認證模式為明文認證。
【使用指導】
· 請確保兩台設備間通過光纖/網線連接的接口上配置的DLDP認證模式和認證密碼都相同,否則DLDP將無法正常工作。
· 在配置認證模式為明文認證或MD5認證後若未配置認證密碼,則認證模式將仍為不認證。
【舉例】
# 配置Device A和Device B通過光纖/網線連接的接口間的DLDP認證模式均為明文認證,認證密碼均為abc。
· Device A上的配置:
<DeviceA> system-view
[DeviceA] dldp authentication-mode simple
[DeviceA] dldp authentication-password simple abc
· Device B上的配置:
<DeviceB> system-view
[DeviceB] dldp authentication-mode simple
[DeviceB] dldp authentication-password simple abc
【相關命令】
· display dldp
· dldp authentication-password
dldp authentication-password命令用來配置當前設備與鄰居設備間的DLDP認證密碼。
undo dldp authentication-password命令用來恢複缺省情況。
【命令】
dldp authentication-password { cipher cipher | simple simple }
undo dldp authentication-password
【缺省情況】
沒有配置當前設備與鄰居設備間的DLDP認證密碼。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
cipher cipher:表示以密文方式輸入的DLDP認證密碼。cipher為1~53個字符的字符串,區分大小寫。
simple simple:表示以明文方式輸入的DLDP認證密碼。simple為1~16個字符的字符串,區分大小寫。
【使用指導】
· 以明文或密文方式設置的DLDP認證密碼,均以密文的方式保存在配置文件中。
· 請確保兩台設備間通過光纖/網線連接的接口上配置的DLDP認證模式和認證密碼都相同,否則DLDP將無法正常工作。
· 在配置認證模式為明文認證或MD5認證後若未配置認證密碼,則認證模式將仍為不認證。
【舉例】
# 配置Device A和Device B通過光纖/網線連接的接口間的DLDP認證模式均為明文認證,認證密碼均為abc。
· Device A上的配置:
<DeviceA> system-view
[DeviceA] dldp authentication-mode simple
[DeviceA] dldp authentication-password simple abc
· Device B上的配置:
<DeviceB> system-view
[DeviceB] dldp authentication-mode simple
[DeviceB] dldp authentication-password simple abc
【相關命令】
· display dldp
· dldp authentication-mode
dldp delaydown-timer命令用來配置DelayDown定時器的超時時間。
undo dldp delaydown-timer命令用來恢複缺省情況。
【命令】
dldp delaydown-timer time
undo dldp delaydown-timer
【缺省情況】
DelayDown定時器的超時時間為1秒。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
time:表示DelayDown定時器的超時時間,取值範圍為1~5,單位為秒。
【使用指導】
本配置將應用於所有使能了DLDP功能的接口上。
【舉例】
# 配置DelayDown定時器的超時時間為2秒。
<Sysname> system-view
[Sysname] dldp delaydown-timer 2
· display dldp
dldp enable命令用來在接口上使能DLDP功能。
undo dldp enable命令用來在接口上關閉DLDP功能。
【命令】
dldp enable
undo dldp enable
【缺省情況】
接口上的DLDP功能處於關閉狀態。
【視圖】
以太網接口視圖
【缺省用戶角色】
network-admin
【使用指導】
要啟用DLDP功能,必須在全局和接口上都使能DLDP功能。
【舉例】
# 全局使能DLDP功能,並在接口Ten-GigabitEthernet1/0/1上使能DLDP功能。
<Sysname> system-view
[Sysname] dldp global enable
[Sysname] interface ten-gigabitethernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] dldp enable
【相關命令】
· display dldp
· dldp global enable
dldp global enable命令用來全局使能DLDP功能。
undo dldp global enable命令用來全局關閉DLDP功能。
【命令】
dldp global enable
undo dldp global enable
【缺省情況】
DLDP功能處於全局關閉狀態。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【使用指導】
要啟用DLDP功能,必須在全局和接口上都使能DLDP功能。
【舉例】
# 全局使能DLDP功能。
<Sysname> system-view
[Sysname] dldp global enable
【相關命令】
· display dldp
· dldp enable
dldp interval命令用來配置Advertisement報文的發送間隔。
undo dldp interval命令用來恢複缺省情況。
【命令】
dldp interval time
undo dldp interval
【缺省情況】
Advertisement報文的發送間隔為5秒。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
time:表示Advertisement報文的發送間隔,取值範圍為1~100,單位為秒。
【使用指導】
· 本配置將應用於所有使能了DLDP功能的接口上。
· 請確保通過光纖/網線連接的兩台設備上Advertisement報文的發送間隔相同,否則DLDP將無法正常工作。
【舉例】
# 配置Advertisement報文的發送間隔為20秒。
<Sysname> system-view
[Sysname] dldp interval 20
【相關命令】
· display dldp
dldp unidirectional-shutdown命令用來配置DLDP發現單向鏈路後接口的關閉模式。
undo dldp unidirectional-shutdown命令用來恢複缺省情況。
【命令】
dldp unidirectional-shutdown { auto | manual }
undo dldp unidirectional-shutdown
【缺省情況】
DLDP發現單向鏈路後接口的關閉模式為自動模式。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
auto:表示自動模式。在此模式下,當DLDP檢測到單向鏈路時會自動關閉單通接口。
manual:表示手動模式。在此模式下,當DLDP檢測到單向鏈路時不會直接關閉單通接口,而是需要用戶手工將其關閉;當單向鏈路恢複為雙向鏈路後,還需要用戶手工將其打開。
【舉例】
# 配置DLDP發現單向鏈路後接口的關閉模式為手動模式。
<Sysname> system-view
[Sysname] dldp unidirectional-shutdown manual
【相關命令】
· display dldp
reset dldp statistics命令用來清除接口的DLDP報文統計信息。
【命令】
reset dldp statistics [ interface interface-type interface-number ]
【視圖】
用戶視圖
【缺省用戶角色】
network-admin
【參數】
interface interface-type interface-number:清除指定接口的DLDP報文統計信息,interface-type interface-number為接口類型和接口編號。如果未指定本參數,將清除所有接口的DLDP報文統計信息。
【舉例】
# 清除所有接口的DLDP報文統計信息。
<Sysname> reset dldp statistics
【相關命令】
· display dldp statistics
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!