03-DLDP配置
本章節下載: 03-DLDP配置 (384.82 KB)
目 錄
物理層的檢測機製(如自動協商機製)負責進行物理信號和故障的檢測,但在出現單向鏈路時,由於物理層仍處於連通狀態,因此物理層檢測機製無法發現設備間的通信異常。H3C私有實現的DLDP(Device Link Detection Protocol,設備鏈路檢測協議)通過在鏈路層監控光纖或網線的鏈路狀態,與物理層檢測機製協同工作,檢測鏈路連接是否正確、鏈路兩端可否正常交互報文。當發現單向鏈路時,DLDP會根據用戶配置自動關閉或由用戶手工關閉相關接口,避免錯誤轉發、環路等問題。
在實際組網中,有時會出現單通現象,即一條鏈路上的兩個端口,有且隻有一端可收到另一端發來的鏈路層報文,此鏈路便稱為單向鏈路。圖1-1以光纖連接為例,示意了兩種單通情形:一種是光纖交叉相連,另一種是一條光纖未連接或斷路。
當發現單向鏈路時,DLDP會根據用戶配置自動關閉或由用戶手工關閉相關接口,以防止網絡問題的發生。
假設接口A和B同處一條鏈路上,若A能收到B發來的鏈路層報文,便將B稱為A的DLDP鄰居,能夠互相收發報文的兩個接口互為鄰居。DLDP鄰居的狀態如表1-1所示。
表1-1 DLDP鄰居狀態
狀態 |
說明 |
Confirmed(確定) |
鏈路雙通時的DLDP鄰居狀態 |
Unconfirmed(未確定) |
發現新鄰居但未確認鏈路雙通時的DLDP鄰居狀態 |
開啟了DLDP功能的接口簡稱DLDP接口。DLDP接口可以有一或多個DLDP鄰居,其狀態與各DLDP鄰居的狀態相關,具體如表1-2所示。
表1-2 DLDP接口狀態
狀態 |
說明 |
Initial(初始) |
當接口已開啟DLDP功能,但全局尚未開啟DLDP功能時的接口狀態 |
Inactive(非活動) |
當接口和全局均已開啟DLDP功能,但鏈路物理down時的接口狀態 |
Bidirectional(雙通) |
當接口和全局均已開啟DLDP功能,且有至少一個處於確定狀態下的鄰居時的接口狀態 |
Unidirectional(單通) |
當接口和全局均已開啟DLDP功能,且沒有處於確定狀態下的鄰居時的接口狀態,處於此狀態的接口隻能收發DLDP報文 |
DLDP在工作過程中使用到的定時器如表1-3所示。
表1-3 DLDP定時器
定時器 |
說明 |
Advertisement發送定時器 |
Advertisement報文的發送間隔(缺省為5秒,可配) |
Probe發送定時器 |
Probe報文的發送間隔(固定為1秒) |
Echo等待定時器 |
對鄰居進行探測時會啟動此定時器,該定時器超時則刪除鄰居信息(固定為10秒) |
鄰居老化定時器 |
每個新鄰居的加入都要建立鄰居表項,當鄰居處於確定狀態時啟動鄰居老化定時器,當收到鄰居的Advertisement報文時刷新鄰居表項的鄰居老化定時器。如果該定時器超時,則啟動該鄰居的加強探測定時器和Echo等待定時器。鄰居老化定時器的值是Advertisement發送定時器的值的3倍 |
加強探測定時器 |
Probe報文的發送間隔(固定為1秒) 若鄰居老化定時器超時,則啟動該鄰居的加強探測定時器並發送Probe報文,同時啟動Echo等待定時器 |
DelayDown定時器 |
接口物理down時不會立即刪除所有鄰居,而是先啟動DelayDown定時器(缺省為1秒,可配),該定時器超時後再核對接口的物理狀態:若為down,則刪除DLDP鄰居信息;若為up,則不進行任何處理 |
恢複探測定時器 |
RecoverProbe報文的發送間隔(固定為2秒)。處於單通狀態的接口會定期發送RecoverProbe報文來檢測單向鏈路是否恢複 |
進行DLDP認證,可以防止網絡攻擊和惡意探測,DLDP的認證模式如表1-4所示。
表1-4 DLDP認證模式
認證模式 |
DLDP報文發送端的處理 |
DLDP報文接收端的處理 |
不認證 |
將DLDP報文的認證字字段置為全0 |
將接收的DLDP報文的認證信息與本端配置進行比較,若一致則認證通過,否則丟棄該報文 |
明文認證 |
將DLDP報文的認證字字段置為明文認證密碼 |
|
MD5認證 |
將DLDP報文的認證字字段置為用MD5算法加密後的密碼摘要 |
當兩台設備通過光纖或網線直接相連時,可以在這兩台設備之間啟用DLDP協議來檢測單向鏈路,此時這兩台設備的接口互為DLDP鄰居,因此稱為單鄰居檢測。下麵分兩種情況分別介紹單鄰居的單向鏈路檢測過程。
(1) 開啟DLDP功能前鏈路已出現單通
如圖1-2所示,在開啟DLDP功能之前,Device A和Device B之間的光纖就已交叉連接。當開啟DLDP功能後,處於up狀態的四個接口都進入單通狀態,並向外發送RecoverProbe報文。下麵以Port A1為例介紹單向鏈路的檢測過程:
a. Port A1收到Port B2發來的RecoverProbe報文後,回複RecoverEcho報文。
b. 由於Port B2無法收到Port A1發來的RecoverEcho報文,因此不會與Port A1建立鄰居關係。
c. Port B1雖能收到Port A1發來的RecoverEcho報文,但由於該報文並不是回複給Port B1的,因此Port B1也不會與Port A1建立鄰居關係。
其它三個接口上的檢測過程與Port A1類似,這四個接口將始終處於單通狀態。
(2) 開啟DLDP功能後鏈路才出現單通
如圖1-3所示,Device A和Device B通過光纖相連。在開啟DLDP功能之後,光纖連接起初是正常的,Port A1與Port B1之間的雙通鄰居建立過程如下:
a. 處於物理up狀態的Port A1先進入單通狀態,向外發送RecoverProbe報文。
b. Port B1收到RecoverProbe報文後,回複RecoverEcho報文。
c. Port A1收到RecoverEcho報文後,發現該報文中攜帶的鄰居信息與本機的相同,於是與Port B1建立確定的鄰居關係,接口狀態由單通變為雙通,啟動該鄰居的老化定時器並定期發送Advertisement報文。
d. Port B1收到Advertisement報文後與Port A1建立未確定的鄰居關係,為該鄰居啟動Echo等待定時器和Probe發送定時器,定期發送Probe報文。
e. Port A1收到Probe報文後,回複Echo報文。
f. Port B1收到Echo報文後,發現該報文中攜帶的鄰居信息和本機保存的相同,於是將鄰居狀態由未確定切換為確定,接口狀態則由單通切換為雙通,啟動該鄰居的老化定時器並定期發送Advertisement報文。
至此,Port A1與Port B1之間的雙通鄰居關係建立完畢。
此後,假設Port B1的Rx端突發故障而無法接收信號,該接口將物理down並進入非活動狀態,但此時由於其Tx端尚能發送信號給Port A1,因此Port A1還處於up狀態。Port A1在鄰居老化定時器超時後,將啟用加強探測定時器和Echo等待定時器,並向鄰居Port B1發送Probe報文;而由於Port A1的Tx端已斷路,Echo等待定時器超時後將收不到Port B1回複的Echo報文,於是Port A1進入單通狀態,並發送Disable報文通知對端。同時,Port A1刪除鄰居Port B1,並啟動恢複探測定時器以檢測鏈路是否恢複。在此過程中,Port B1將一直處於非活動狀態。
當接口物理down之後,DLDP將嚐試發送LinkDown報文,對端收到此報文後會直接刪除鄰居表項,以縮短故障發現時間。但由於發送此報文時接口已物理down,因此能否發送成功取決於接口的Tx端是否完好。
當多台設備通過Hub相連時,也可以在這些設備之間啟用DLDP協議來檢測單向鏈路,此時每個接口都會檢測到一個以上的DLDP鄰居,因此稱為多鄰居檢測。在多鄰居組網環境中,為了能正確檢測出單向鏈路,要求在所有與Hub相連的接口上都啟用DLDP,接口一旦發現沒有確定的鄰居,便進入單通狀態。
如圖1-4所示,Device A~Device D都通過一台Hub相連,各設備都支持DLDP。當Port A1、Port B1和Port C1發現與Port D1的連接出錯後,都將刪除該鄰居,但仍保持雙通狀態。
· 為確保DLDP功能正常工作,要保證兩端設備的DLDP功能都處於開啟狀態,且Advertisement報文的發送間隔、DLDP認證模式和密碼都相同。
· 為確保DLDP功能正常工作,請將兩端接口的雙工模式配置為全雙工、速率配置為相同的強製速率。
DLDP配置任務如下:
(1) 開啟DLDP功能
(2) (可選)配置Advertisement報文的發送間隔
(3) (可選)配置DelayDown定時器的超時時間
(4) (可選)全局配置DLDP發現單向鏈路後接口的關閉模式
(5) (可選)配置DLDP的認證模式和密碼
(1) 進入係統視圖。
system-view
(2) 全局開啟DLDP功能。
dldp global enable
缺省情況下,DLDP功能處於全局關閉狀態。
(3) 進入以太網接口視圖。
interface interface-type interface-number
(4) 開啟接口的DLDP功能。
dldp enable
缺省情況下,接口上的DLDP功能處於關閉狀態。
通過合理調整Advertisement報文的發送間隔,可使DLDP在不同的網絡環境下都能夠及時發現單向鏈路(建議采用缺省值)。
(1) 進入係統視圖。
system-view
(2) 配置Advertisement報文的發送間隔。
dldp interval interval
缺省情況下,Advertisement報文的發送間隔為5秒。
有些接口當其Tx端發生故障時會引起Rx端光信號的抖動(表現為該接口down後隨即又up),為避免在這種情況下錯誤清除鄰居信息,DLDP會在接口物理down時先啟動DelayDown定時器,該定時器超時後再核對接口的物理狀態:若為down,則刪除DLDP鄰居信息;若為up,則不進行任何處理。
本配置將應用於所有開啟了DLDP功能的接口上。
(1) 進入係統視圖。
system-view
(2) 配置DelayDown定時器的超時時間。
dldp delaydown-timer time
缺省情況下,DelayDown定時器的超時時間為1秒。
當DLDP檢測到單向鏈路時,可以采用以下方式關閉單通接口:
· 自動模式:在此模式下,若DLDP檢測到單向鏈路,會自動關閉單通接口;若單向鏈路恢複為雙向鏈路,則DLDP會自動打開被關閉的接口。
· 手動模式:在此模式下,若DLDP檢測到單向鏈路,不會直接關閉單通接口,需要用戶手工將其關閉;當用戶想知道鏈路是否恢複為雙向鏈路時,需要執行undo shutdown命令打開端口重新檢測鏈路,若檢測到鏈路恢複為雙向鏈路,則接口恢複正常。當網絡性能較差、設備業務量較大或CPU利用率較高時,都容易造成DLDP對單通的誤判而自動關閉接口,手動模式就是為了避免這種誤判而采取的一種折中方案。
(1) 進入係統視圖。
system-view
(2) 全局配置DLDP發現單向鏈路後接口的關閉模式。
dldp unidirectional-shutdown { auto | manual }
缺省情況下,DLDP發現單向鏈路後,所有接口的關閉模式為自動模式。
通過配置適當的DLDP認證模式和密碼,可以防止網絡攻擊和惡意探測。DLDP的認證模式包括:不認證、明文認證和MD5認證。
(1) 進入係統視圖。
system-view
(2) 配置當前設備與鄰居設備間的DLDP認證模式。
dldp authentication-mode { md5 | none | simple }
缺省情況下,當前設備與鄰居設備間的DLDP認證模式為不認證。
(3) 配置當前設備與鄰居設備間的DLDP認證密碼。
dldp authentication-password { cipher | simple } string
缺省情況下,未配置當前設備與鄰居設備間的DLDP認證密碼。
在配置認證模式為明文認證或MD5認證後若未配置認證密碼,則認證模式將仍不生效。
在完成上述配置後,在任意視圖下執行display命令可以顯示配置後DLDP的運行情況及報文統計信息,通過查看顯示信息驗證配置的效果。
在用戶視圖下執行reset命令可以清除DLDP報文統計信息。
表1-5 DLDP顯示和維護
操作 |
命令 |
顯示DLDP的全局配置信息和接口的DLDP信息 |
display dldp [ interface interface-type interface-number ] |
顯示接口的DLDP報文統計信息 |
display dldp statistics [ interface interface-type interface-number ] |
清除接口的DLDP報文統計信息 |
reset dldp statistics [ interface interface-type interface-number ] |
· Device A和Device B各自的接口GigabitEthernet1/0/1和GigabitEthernet1/0/2之間分別通過一對光纖進行連接。
· 要求通過配置DLDP功能,使接口上發生單向鏈路故障後由DLDP自動關閉故障接口,並在網絡管理員排除故障後,故障接口自動恢複。
(1) 配置Device A
# 全局開啟DLDP功能。
<DeviceA> system-view
[DeviceA] dldp global enable
# 在接口GigabitEthernet1/0/1上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] duplex full
[DeviceA-GigabitEthernet1/0/1] speed 1000
[DeviceA-GigabitEthernet1/0/1] dldp enable
[DeviceA-GigabitEthernet1/0/1] quit
# 在接口GigabitEthernet1/0/2上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] duplex full
[DeviceA-GigabitEthernet1/0/2] speed 1000
[DeviceA-GigabitEthernet1/0/2] dldp enable
[DeviceA-GigabitEthernet1/0/2] quit
# 全局配置DLDP發現單向鏈路後接口的關閉模式為自動模式。
[DeviceA] dldp unidirectional-shutdown auto
(2) 配置Device B
# 全局開啟DLDP功能。
<DeviceB> system-view
[DeviceB] dldp global enable
# 在接口GigabitEthernet1/0/1上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] duplex full
[DeviceB-GigabitEthernet1/0/1] speed 1000
[DeviceB-GigabitEthernet1/0/1] dldp enable
[DeviceB-GigabitEthernet1/0/1] quit
# 在接口GigabitEthernet1/0/2上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] duplex full
[DeviceB-GigabitEthernet1/0/2] speed 1000
[DeviceB-GigabitEthernet1/0/2] dldp enable
[DeviceB-GigabitEthernet1/0/2] quit
# 全局配置DLDP發現單向鏈路後接口的關閉模式為自動模式。
[DeviceB] dldp unidirectional-shutdown auto
配置完成後,通過使用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 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 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
以上信息表明,接口GigabitEthernet1/0/1和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
<DeviceA>%Jul 11 17:40:31:089 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 11 17:40:31:091 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 11 17:40:31:677 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to down.
%Jul 11 17:40:31:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to down.
%Jul 11 17:40:38:544 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 11 17:40:38:836 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to up.
以上信息表明,接口GigabitEthernet1/0/1和GigabitEthernet1/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 GigabitEthernet1/0/1
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
Interface GigabitEthernet1/0/2
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
以上信息表明,接口GigabitEthernet1/0/1和GigabitEthernet1/0/2上的DLDP接口狀態均為Unidirectional,說明這兩個接口所在的鏈路均處於單通狀態。
由此可知,DLDP在接口GigabitEthernet1/0/1和GigabitEthernet1/0/2上都檢測到了單向鏈路,並自動關閉了這兩個接口。經檢查,網絡管理員發現連接Device A和Device B的兩對光纖被錯誤地進行了交叉連接,於是他將這兩對光纖重新進行了正確連接。隨後,Device A上輸出了以下日誌信息:
<DeviceA>%Jul 11 17:42:57:709 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 11 17:42:58:603 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to down.
%Jul 11 17:43:02:342 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 11 17:43:02:343 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface 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 GigabitEthernet1/0/1.
%Jul 11 17:43:02:353 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 11 17:43:02:357 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to up.
%Jul 11 17:43:02:362 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface 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 GigabitEthernet1/0/2.
%Jul 11 17:43:02:368 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to up.
以上信息表明,接口GigabitEthernet1/0/1和GigabitEthernet1/0/2的物理狀態和鏈路狀態均已up,並各自確定了DLDP鄰居,所在鏈路也變為雙通狀態。
· Device A和Device B各自的接口GigabitEthernet1/0/1和GigabitEthernet1/0/2之間分別通過一對光纖進行連接。
· 要求通過配置DLDP功能,使接口上發生單向鏈路故障後,需要由網絡管理員手工關閉和恢複故障接口。
圖1-6 手動關閉單向鏈路配置組網圖
(1) 配置Device A
# 全局開啟DLDP功能。
<DeviceA> system-view
[DeviceA] dldp global enable
# 在接口GigabitEthernet1/0/1上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] duplex full
[DeviceA-GigabitEthernet1/0/1] speed 1000
[DeviceA-GigabitEthernet1/0/1] dldp enable
[DeviceA-GigabitEthernet1/0/1] quit
# 在接口GigabitEthernet1/0/2上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] duplex full
[DeviceA-GigabitEthernet1/0/2] speed 1000
[DeviceA-GigabitEthernet1/0/2] dldp enable
[DeviceA-GigabitEthernet1/0/2] quit
# 全局配置DLDP發現單向鏈路後接口的關閉模式為手動模式。
[DeviceA] dldp unidirectional-shutdown manual
(2) 配置Device B
# 全局開啟DLDP功能。
<DeviceB> system-view
[DeviceB] dldp global enable
# 在接口GigabitEthernet1/0/1上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] duplex full
[DeviceB-GigabitEthernet1/0/1] speed 1000
[DeviceB-GigabitEthernet1/0/1] dldp enable
[DeviceB-GigabitEthernet1/0/1] quit
# 在接口GigabitEthernet1/0/2上配置雙工模式為全雙工、接口速率為1000Mbps,並開啟DLDP功能。
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] duplex full
[DeviceB-GigabitEthernet1/0/2] speed 1000
[DeviceB-GigabitEthernet1/0/2] dldp enable
[DeviceB-GigabitEthernet1/0/2] quit
# 全局配置DLDP發現單向鏈路後接口的關閉模式為手動模式。
[DeviceB] dldp unidirectional-shutdown manual
配置完成後,通過使用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 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 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
以上信息表明,接口GigabitEthernet1/0/1和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上看到如下Log信息:
<DeviceA>%Jul 12 08:29:17:786 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 12 08:29:17:787 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 12 08:29:17:800 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to down.
%Jul 12 08:29:17:800 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to down.
%Jul 12 08:29:25:004 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 12 08:29:25:005 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 12 08:29:25:893 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to up.
%Jul 12 08:29:25:894 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to up.
以上信息表明,接口GigabitEthernet1/0/1和GigabitEthernet1/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 GigabitEthernet1/0/1
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
Interface GigabitEthernet1/0/2
DLDP port state: Unidirectional
Number of the port’s neighbors: 0 (Maximum number ever detected: 1)
以上信息表明,接口GigabitEthernet1/0/1和GigabitEthernet1/0/2上的DLDP接口狀態均為Unidirectional,說明這兩個接口所在的鏈路均處於單通狀態。
由此可知,DLDP在接口GigabitEthernet1/0/1和GigabitEthernet1/0/2上都檢測到了單向鏈路,但並未關閉這兩個接口。經檢查,網絡管理員發現連接Device A和Device B的兩對光纖被錯誤地進行了交叉連接,於是他分別將Device A的兩個接口手工關閉:
# 關閉接口GigabitEthernet1/0/1。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] shutdown
Device A上隨即輸出以下日誌信息:
[DeviceA-GigabitEthernet1/0/1]%Jul 12 08:34:23:717 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 12 08:34:23:718 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down.
%Jul 12 08:34:23:778 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to down.
%Jul 12 08:34:23:779 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to down.
以上信息表明,接口GigabitEthernet1/0/1和GigabitEthernet1/0/2的物理狀態和鏈路狀態均已變為down。
# 關閉接口GigabitEthernet1/0/2。
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] shutdown
然後,網絡管理員將連接Device A和Device B的兩對光纖重新進行了正確連接,檢查無誤後,他又分別將Device A的兩個接口重新打開:
# 打開接口GigabitEthernet1/0/2。
[DeviceA-GigabitEthernet1/0/2] undo shutdown
Device A上隨即輸出以下日誌信息:
[DeviceA-GigabitEthernet1/0/2]%Jul 12 08:46:17:677 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/2 changed to up.
%Jul 12 08:46:17:678 2012 DeviceA IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/2 changed to up.
%Jul 12 08:46:17:959 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface 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 GigabitEthernet1/0/2.
以上信息表明,接口GigabitEthernet1/0/2的物理狀態和鏈路狀態均已up,並確定了DLDP鄰居,所在鏈路也變為雙通狀態。
# 打開接口GigabitEthernet1/0/1。
[DeviceA-GigabitEthernet1/0/2] quit
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] undo shutdown
Device A上隨即輸出以下日誌信息:
[DeviceA-GigabitEthernet1/0/1]%Jul 12 08:48:25:952 2012 DeviceA IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 12 08:48:25:952 2012 DeviceA DLDP/6/DLDP_NEIGHBOR_CONFIRMED: A neighbor was confirmed on interface 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 state on the interface GigabitEthernet1/0/1 changed to up.
%Jul 12 08:48:25:953 2012 DeviceA DLDP/6/DLDP_LINK_BIDIRECTIONAL: DLDP detected a bidirectional link on interface GigabitEthernet1/0/1.
以上信息表明,接口GigabitEthernet1/0/1的物理狀態和鏈路狀態均已up,並確定了DLDP鄰居,所在鏈路也變為雙通狀態。
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!