02-CFD配置
本章節下載: 02-CFD配置 (569.86 KB)
CFD(Connectivity Fault Detection,連通錯誤檢測)遵循IEEE 802.1ag的CFM(Connectivity Fault Management,連通錯誤管理)協議和ITU-T的Y.1731協議,是一種二層網絡的端到端OAM(Operation, Administration, and Maintenance,操作、管理和維護)機製,主要用於在二層網絡中檢測鏈路連通性,以及在故障發生時確認並定位故障。適用的二層網絡包括基於VLAN的以太網網絡和基於MPLS的二層VPN(Virtual Private Network,虛擬專用網絡)網絡。有關基於MPLS的二層VPN的詳細介紹,請參見“MPLS配置指導”中的“MPLS L2VPN”。
MD(Maintenance Domain,維護域)是指連通錯誤檢測所覆蓋的一個網絡或網絡的一部分,它以“MD名稱”來標識。
MA(Maintenance Association,維護集)是MD的一部分,一個MD可劃分為一個或多個MA。MA以“MD名稱+MA名稱”來標識。
在以太網網絡中,MA可以服務於指定的VLAN,也可以不服務於任何VLAN,分別稱為帶VLAN屬性和不帶VLAN屬性的MA。
在二層VPN網絡中,MA隻能服務於指定的交叉連接。
MP(Maintenance Point,維護點)配置在接口上,屬於某個MA,可分為MEP(Maintenance association End Point,維護端點)和MIP(Maintenance association Intermediate Point,維護中間點)。
MEP確定了MA的邊界,以“MEP ID”來標識。
在以太網網絡中,MEP所屬的MA確定了該MEP發出的報文所屬的VLAN。
在二層VPN網絡中,MEP所屬的MA確定了該MEP發出的報文所屬的交叉連接。
MEP具有方向性,分為內向MEP和外向MEP兩種:
· 內向MEP不會通過其所在的接口發送CFD協議報文。在以太網網絡中,內向MEP是通過所屬MA所服務的VLAN中其它所有接口廣播CFD協議報文;在二層VPN網絡中,內向MEP是通過所屬的交叉連接中其它所有接口廣播CFD協議報文。
· 外向MEP則直接通過其所在的接口向外發送CFD協議報文。
MIP位於MA的內部,不能主動發出CFD協議報文,但可以處理和響應CFD協議報文。MIP由設備自動創建,可以配合MEP完成類似於ping和tracert的功能。
MIP所屬的MA確定了該MIP所能接收的報文所屬的VLAN。
MIP配置僅在以太網網絡中生效,在二層VPN網絡中不生效。
MEP列表是同一MA中允許配置的本地MEP和需要監控的遠端MEP的集合,它限定了MA中MEP的選取範圍,不同設備上同一MA中的所有MEP都應包含在此列表中,且MEP ID互不重複。如果MEP收到來自遠端設備的CCM(Continuity Check Message,連續性檢測報文)報文所攜帶的MEP不在同一MA的MEP列表中,就丟棄該報文。
本端設備發送的CCM報文應當攜帶RDI(Remote Defect Indication,遠程故障指示)標誌位,否則對端設備將無法感知某些故障。當MA中至少有一個本地MEP未學到MEP列表中的所有遠端MEP時,該MA中的MEP發送的CCM報文將不會攜帶RDI標誌位。
為了準確定位故障點,在MD中引入了級別(層次)的概念。MD共分為八級,用整數0~7來表示,數字越大級別越高,MD的範圍也就越大。不同MD之間可以相鄰或嵌套,但不能交叉,且嵌套時,隻能由高級別MD嵌套低級別MD。
MD的分級使得故障定位更加便利和準確,如圖1-1所示,有MD_A和MD_B兩個MD,MD_B嵌套於MD_A中,如果在MD_A的邊界上發現鏈路不通,則表明該域內的設備出現了故障,故障可能出現在Device A~Device E這五台設備上。此時,如果在MD_B的邊界上也發現鏈路不通,則故障範圍就縮小到Device B~Device D這三台設備上;反之,如果MD_B中的設備都工作正常,則至少可以確定Device C是沒有故障的。
本節的故障描述不考慮物理鏈路故障。
CFD協議報文的交互以及相關處理都是基於MD的,合理的MD規劃可以幫助網絡管理員迅速定位故障點。
MA的級別等於其所屬MD的級別。
MEP的級別等於其所屬MD的級別。
MIP的級別由其創建規則和所屬MD的級別共同確定。MIP的創建規則有以下兩種:
· Default規則:當接口上沒有更低級別的MIP時,在本級別創建MIP。在此規則下,接口上即使沒有配置MEP也可創建MIP。
· Explicit規則:當接口上沒有更低級別的MIP且有更低級別的MEP時,在本級別創建MIP。在此規則下,接口上隻有配置了更低級別的MEP時才可創建MIP。
當用戶在設備上指定了MIP的創建規則後,係統會在尚沒有MIP的接口上,按照級別由低到高依次檢查各MD中的MA,並按照圖1-2所示的流程來確定接口是否要在本級別創建MIP。
圖1-2 是否創建MIP的確定流程
圖1-3所示為CFD的一種分級配置方式,圖中共有0、2、3、5四個級別的MD,標識號較大的MD的級別高、控製範圍廣;標識號較小的MD的級別低、控製範圍小。在Device A~Device F的各接口上配置了MP,譬如Device B的接口Port A上配置有:級別為5的MIP、級別為3的內向MEP、級別為2的內向MEP和級別為0的外向MEP。
圖1-3 CFD的分級配置
對於帶VLAN屬性的MA,MP僅在其所屬MA所服務於的VLAN中發送的報文,報文的級別為MP所屬MD的級別。
對於不帶VLAN屬性的MA,MP隻能為外向MEP,主要用來檢測直連鏈路的狀態。不帶VLAN屬性的外向MEP所發送報文的級別為該MEP所屬MD的級別。
當MEP收到高於自己級別的報文時隻轉發該報文,不會進行處理;當MEP收到小於等於自己級別的報文時才會進行處理。
當MIP收到不等於自己級別的報文時隻轉發該報文,不會進行處理;當MIP收到等於自己級別的報文時才會進行處理。
連通錯誤檢測的有效應用建立在合理的網絡部署和配置之上,它的功能是在所配置的MP之間實現的。
MEP之間的連通失敗可能由設備故障或配置錯誤造成,連續性檢測(Continuity Check,CC)功能就是用來檢測MEP之間的連通狀態。該功能的實現方式是:由MEP周期性地發送CCM報文,相同MA的其它MEP接收該報文,並由此獲知遠端狀態。若MEP在3.5個CCM報文發送周期內未收到遠端MEP發來的CCM報文,則認為鏈路有問題,會輸出日誌報告。當MD中的多個MEP在發送CCM報文時,就實現了多點到多點之間的鏈路檢測。
CCM報文是組播報文。
環回(Loopback,LB)功能類似於IP層的ping功能,用於驗證源MEP與目標MP之間的連接狀態。該功能的實現方式是:由源MEP發送LBM(Loopback Message,環回報文)報文給目標MP,並根據能否收到對端反饋的LBR(Loopback Reply,環回應答)報文來檢驗鏈路狀態。
LBM報文分為組播和單播兩種報文,設備支持發送和處理單播LBM報文,不支持發送但可處理組播LBM報文;LBR是單播報文。
鏈路跟蹤(Linktrace,LT)功能類似於IP層的tracert功能,用於確定源MEP到目標MP的路徑,其實現方式是:由源MEP發送LTM(Linktrace Message,鏈路跟蹤報文)報文給目標MP,目標MP以及LTM報文所經過的MIP收到該報文後,都會發送LTR(Linktrace Reply,鏈路跟蹤應答)報文給源MEP,源MEP則根據收到的LTR報文來確定到目標MP的路徑。
LTM報文是組播報文,LTR報文是單播報文。
告警抑製功能用來減少MEP故障告警的數量。如果MEP在3.5個CCM報文發送周期內未收到遠端MEP發來的CCM報文,便立刻開始周期性地發送AIS(Alarm Indication Signal,告警指示信號)報文,該報文的發送方向與CCM報文相反。其它MEP在收到AIS報文後,會抑製本端的故障告警,並繼續發送AIS報文。此後,如果MEP收到了CCM報文,便停止發送AIS報文並恢複故障告警。
AIS報文是組播報文。
丟包測試(Loss Measurement,LM)功能用來檢測MEP之間的丟包情況:
· 單向丟包測試
單向丟包測試功能的實現方式是:由源MEP發送LMM(Loss Measurement Message,丟包測量報文)報文給目標MEP,目標MEP收到該報文後,會發送LMR(Loss Measurement Reply,丟包測量應答)報文給源MEP,源MEP則根據兩個連續的LMR報文來計算源MEP和目標MEP間的丟包數,即源MEP從收到第二個LMR報文開始,根據本LMR報文和前一個LMR報文的統計計數來計算源MEP和目標MEP間的丟包數。
LMM報文和LMR報文都是單播報文。
單向丟包測試功能可以通過如下方式觸發:
¡ 手工按需測試:用戶根據需要執行命令手工觸發單向丟包測試。執行命令後,源MEP按照指定的時間間隔周期性發送指定數目的LMM報文進行測試,收到對應的LMR報文後停止測試,並在設備上打印測試結果。
¡ 係統自動測試:開啟係統自動執行單向丟包測試功能後,源MEP按照指定的時間間隔周期性發送LMM報文,進行單向丟包測試。關閉該功能後,設備停止測試。通過display cfd slm history命令可以查看測試結果。
係統自動執行單向丟包測試功能還能配合端口聯動功能一起使用,根據外向MEP檢測到的鏈路故障結果,從而關閉或阻塞存在鏈路故障的端口,保護流量不在該端口丟失,詳細內容請參見“1.1.5 端口聯動功能”。
幀時延測試(Delay Measurement,DM)功能用來檢測MEP之間報文傳輸的時延情況,分為以下兩種:
· 單向時延測試
單向時延測試功能的實現方式是:源MEP發送1DM(One-way Delay Measurement,單向時延測量)報文給目標MEP,該報文中攜帶有其發送時間。目標MEP收到該報文後記錄其接收時間,並結合其發送時間來計算並記錄鏈路傳輸的時延和抖動(即時延變化值)。
1DM報文是單播報文。
單向時延測試功能可以通過如下方式觸發:
¡ 手工按需測試:用戶根據需要執行命令手工觸發單向時延測試。執行命令後,源MEP按照指定的時間間隔周期性發送指定數目的1DM報文進行測試,目標MEP收到該報文後記錄其接收時間,並結合其發送時間來計算並記錄鏈路傳輸的時延和抖動(即時延變化值),可在目標MEP所在設備上通過display cfd dm one-way history命令查看測試結果。
¡ 係統自動測試:開啟係統自動執行單向時延測試功能後,源MEP按照指定的時間間隔周期性發送1DM報文,進行單向時延測試。關閉該功能後,設備停止測試。可在目標MEP所在設備上通過display cfd dm one-way history命令可以查看測試結果。
· 雙向時延測試
雙向時延測試功能的實現方式是:源MEP發送DMM(Delay Measurement Message,時延測量報文)報文給目標MEP,該報文中攜帶有其發送時間。目標MEP收到該報文後記錄其接收時間,然後再發送DMR(Delay Measurement Reply,時延測量應答)報文給源MEP,該報文中攜帶有DMM報文的發送和接收時間,以及DMR報文的發送時間。源MEP收到DMR報文後記錄其接收時間,並據此計算出鏈路傳輸的時延和抖動。
DMM報文和DMR報文都是單播報文。
雙向時延測試功能可以通過如下方式觸發:
¡ 手工按需測試:用戶根據需要執行命令手工觸發雙向時延測試。執行命令後,源MEP按照指定的時間間隔周期性發送指定數目的DMM報文進行測試,收到對應的DMR報文後停止測試,並在設備上打印測試結果。
¡ 係統自動測試:開啟係統自動執行雙向時延測試功能後,源MEP按照指定的時間間隔周期性發送DMM報文,進行雙向時延測試。關閉該功能後,設備停止測試。通過display cfd dm two-way history命令可以查看測試結果。
係統自動執行雙向時延測試功能還可以配合端口聯動功能一起使用,根據外向MEP檢測到的鏈路故障結果,從而關閉或阻塞存在鏈路故障的端口,保護流量不在該端口丟失,詳細內容請參見“1.1.5 端口聯動功能”。
比特錯誤測試功能用來測試MEP之間的比特錯誤。源MEP發送TST(Test,比特錯誤測試)報文給目標MEP,該報文中攜帶有偽隨機序列或全0值。目標MEP收到該報文後,通過對報文內容進行計算比較來確定錯誤比特的情況。
TST報文是單播報文。
比特錯誤測試功能可以通過如下方式觸發:
· 手工按需測試:用戶根據需要執行命令手工觸發比特錯誤測試。執行命令後,源MEP按照指定的時間間隔周期性發送指定數目的TST報文進行測試,發送完指定數目的TST報文後停止測試。
· 係統自動測試:開啟係統自動執行比特錯誤測試功能後,源MEP按照指定的時間間隔周期性發送測試報文,進行比特錯誤測試。關閉該功能後,設備停止測試。通過display cfd tst history命令可以查看測試結果。
係統自動執行比特錯誤測試功能還可以配合端口聯動功能一起使用,根據外向MEP檢測到的鏈路故障結果,從而關閉或阻塞存在鏈路故障的端口,保護流量不在該端口丟失,詳細內容請參見“1.1.5 端口聯動功能”。
閾值告警功能用來監測鏈路的傳輸性能。當鏈路的傳輸性能連續三次達到或超過閾值上限時,則提示用戶已超過上限。當鏈路的傳輸性能連續三次達到或低於閾值下限時,則提示用戶已低於下限。
端口聯動功能用來根據外向MEP檢測到的鏈路故障結果,關閉或阻塞存在鏈路故障的端口,保護流量不在該端口丟失。
· 連續性檢測超時模式:表示當CFD連續性檢測功能超時時,觸發端口聯動。
· 係統自動執行雙向時延測試模式:表示當延時時間達到或超過上限閾值,達到或低於下限閾值時,觸發端口聯動。
· 遠端故障標記模式:表示當收到有遠端故障標記的CCM報文時,觸發端口聯動。
· 係統自動執行單向丟包測試模式:表示當丟包率達到或超過上限閾值,達到或低於下限閾值時,觸發端口聯動。
· 係統自動執行比特錯誤測試模式:表示當發生比特錯誤的報文率達到或超過上限閾值,達到或低於下限閾值時,觸發端口聯動。
同一個接口上可以配置兩種觸發模式,滿足任何一種情況,都會觸發端口聯動功能。
· 阻塞端口:即端口的鏈路層協議狀態變為DOWN(CFD),且不允許該端口繼續收發數據報文。
· 關閉端口:即端口的物理狀態變為CFD DOWN,且不允許該端口繼續收發數據報文和協議報文。
如果鏈路一端配置了端口聯動功能的觸發模式,當端口上的外向MEP檢測到鏈路故障後,該端口就會依據配置的聯動觸發動作命令來阻塞或關閉端口。
端口被阻塞或關閉後,若鏈路另一端恢複正常:
· 端口聯動觸發的動作為阻塞端口:
¡ 係統自動執行單向丟包測試模式:被阻塞的端口需要執行undo cfd port-trigger slm action命令或cfd slm port-trigger up-delay命令才能被重新開啟。
¡ 其它模式:被阻塞的端口會自動恢複正常。
· 端口聯動觸發的動作為關閉端口,需要執行undo shutdown命令或undo cfd port-trigger { cc-expire | dm | rdi | slm | tst } action命令才能被重新開啟
CFD連續性檢測功能與Track項建立關聯時,CFD會根據對端是否可達來通知Track項的狀態置位:當CFD判斷出對端可達時,CFD會通知Track模塊將與CFD連續性檢測功能關聯的Track項的狀態置為Positive;當CFD判斷出對端不可達時,CFD會通知Track模塊將與CFD連續性檢測功能關聯的Track項的狀態置為Negative。Track的詳細介紹,請參見“可靠性配置指導”中的“Track”。
與CFD相關的協議規範有:
· IEEE 802.1ag:Virtual Bridged Local Area Networks Amendment 5: Connectivity Fault Management
· ITU-T Y.1731:OAM functions and mechanisms for Ethernet based networks
· 在使用遠端MEP的MEP ID進行其它各項CFD功能測試之前,必須先配置連續性檢測功能;在使用遠端MEP的MAC地址進行其它CFD各項功能測試之前,則沒有此限製。
· 被生成樹協議阻塞的端口通常不能收發CFD協議報文,但下列情況例外:
¡ 如果設備上配置有外向MEP,那麼外向MEP所在的端口即使被生成樹協議阻塞,也仍能收發CFD協議報文。
¡ 如果設備上配置有MIP或內向MEP,那麼該設備上的端口即使被生成樹協議阻塞,也仍能收發除CCM報文以外的其它CFD協議報文。
有關生成樹協議的詳細介紹,請參見“二層技術-以太網交換配置指導”中的“生成樹”。
(1) 配置CFD基本功能
a. 開啟CFD功能
b. 配置服務實例
c. 配置MEP
d. 配置MIP的創建規則
(2) 配置CFD各項功能
a. 配置連續性檢測功能
b. (可選)配置環回功能
c. (可選)配置鏈路跟蹤功能
d. (可選)配置告警抑製功能
e. (可選)配置單向丟包測試功能
f. (可選)配置單向時延測試功能
g. (可選)配置雙向時延測試功能
h. (可選)配置比特錯誤測試功能
i. (可選)配置閾值告警功能
(3) (可選)配置端口聯動功能
在配置CFD功能之前,應對網絡進行如下規劃:
· 對整個網絡的MD進行分級,確定各級別MD的邊界。
· 確定各MD的名稱,同一MD內的設備使用相同的MD名稱。
· 根據需要監控的VLAN、交叉連接,確定各MD中的MA。
· 確定各MA的名稱,同一MD中同一MA內的設備使用相同的MA名稱。
· 確定同一MD中同一MA的MEP列表,在不同設備上應保持相同。
· 在MD和MA的邊界接口上應規劃MEP。
· 在MD和MA的非邊界設備或接口上可規劃MIP。(僅以太網網絡需要)
(1) 進入係統視圖。
system-view
(2) 開啟CFD功能。
cfd enable
缺省情況下,CFD功能處於關閉狀態。
一個服務實例用一個整數表示,代表了一個MD中的一個MA。
在以太網網絡中,服務實例內的MP所處理報文的級別屬性和VLAN屬性分別由MD和MA來確定。其中,不帶VLAN屬性的MA中的MP也不屬於任何VLAN。
在二層VPN網絡中,服務實例內的MEP所處理報文的級別屬性由MD來確定,交叉連接屬性由MA來確定。
(1) 進入係統視圖。
system-view
(2) 創建MD。
cfd md md-name [ index index-value ] level level-value [ md-id { dns dns-name | mac mac-address subnumber | none } ]
(3) 創建服務實例。
¡ 在以太網網絡中:
cfd service-instance instance-id ma-id { icc-based ma-name | integer ma-num | string ma-name | vlan-based [ vlan-id ] } [ ma-index index-value ] md md-name [ vlan vlan-id ]
¡ 在二層VPN網絡中:
cfd service-instance instance-id ma-id { icc-based ma-name | integer ma-num | string ma-name } [ ma-index index-value ] md md-name xconnect-group group-name connection connection-name
CFD功能主要體現在對MEP的各種操作上,由於MEP配置在服務實例上,因此服務實例所代表的MD的級別、VLAN屬性、交叉連接屬性就自然成為了MEP的屬性。
在以太網網絡中:
在一個級別上,一個接口隻能配置一個不帶VLAN屬性的MEP,且隻能為外向MEP;而配置帶VLAN屬性的MEP,則無此限製。
在三層以太網接口上為帶VLAN屬性的MA創建MEP時,要求設備支持配置子接口且子接口上支持配置VLAN終結。有關VLAN終結的詳細介紹,請參見“二層技術-以太網交換配置指導”中的“VLAN終結”。
在二層VPN網絡中:
· 設備在同一服務實例下隻支持配置一個內向MEP。
· MEP隻能配置在PE設備的AC側接口上,用於檢測PW或AC的連通性。
· 如果需要指定端口所屬的VLAN的編號,必須先配置vlan-type dot1q vid命令,且vlan vlan-id參數必須與vlan-type dot1q vid命令的vid vlan-id-list參數相同。有關vlan-type dot1q vid命令的詳細介紹,請參見“二層技術-以太網交換命令參考”中的“VLAN終結”。
· 如果需要指定報文外層VLAN和內層VLAN的編號,必須先配置vlan-type dot1q vid second-dot1q命令,且service-vid vlan-id參數必須與vlan-type dot1q vid second-dot1q命令的vid vlan-id-list參數相同,customer-vid vlan-id參數必須與second-dot1q vlan-id-list參數相同。有關vlan-type dot1q vid second-dot1q命令的詳細介紹,請參見“二層技術-以太網交換命令參考”中的“VLAN終結”。
在配置MEP之前,必須首先配置服務實例。
(1) 進入係統視圖。
system-view
(2) 創建MEP列表。
cfd meplist mep-list service-instance instance-id
所創建的MEP必須已包含在對應服務實例的MEP列表中。
(3) 進入接口視圖。
interface interface-type interface-number
(4) 創建MEP。
¡ 在二層以太網接口視圖或二層聚合接口視圖下創建MEP。
cfd mep mep-id service-instance instance-id { inbound | outbound }
¡ 在三層以太網接口視圖下創建MEP。
cfd mep mep-id service-instance instance-id outbound
(1) 進入係統視圖。
system-view
(2) 創建MEP列表。
cfd meplist mep-list service-instance instance-id
所創建的MEP必須已包含在對應服務實例的MEP列表中。
(3) 進入接口視圖。
¡ 進入三層以太網接口或三層聚合接口視圖。
interface interface-type interface-number
¡ 進入三層以太網子接口或三層聚合子接口視圖。
interface interface-type interface-number.subnumber
(4) 創建MEP。
¡ 在三層聚合接口或三層聚合子接口視圖下創建MEP
cfd mep mep-id service-instance instance-id inbound
¡ 在三層以太網接口視圖下創建MEP。
cfd mep mep-id service-instance instance-id { inbound | outbound }
¡ 在三層以太網子接口視圖下創建MEP。
cfd mep mep-id service-instance instance-id inbound
cfd mep mep-id service-instance instance-id [ vlan vlan-id | service-vid vlan-id customer-vid vlan-id ] outbound
MIP是服務實例中的功能實體,用來響應各種CFD測試報文(如LTM、LBM等)。請根據網絡規劃配置MIP的創建規則,係統將按照此規則在接口上自動創建MIP。在配置了MIP的創建規則之後,下列任一條件均可觸發MIP的創建或刪除:
· 開啟或關閉CFD功能。
· 創建或刪除接口上的MEP。
· 端口的VLAN屬性發生變化。
· MIP的創建規則發生變化。
由於不帶VLAN屬性的MA主要用來檢測直連鏈路的狀態,因而此類MA無法創建MIP。
對於帶VLAN屬性的MA,當接口上有同級別或更高級別的MEP時,不會在該接口上生成該MA的MIP。
(1) 進入係統視圖。
system-view
(2) 配置MIP的創建規則。
cfd mip-rule { default | explicit } service-instance instance-id
缺省情況下,未配置MIP的創建規則,係統不自動創建MIP。
連續性檢測功能通過在MEP之間互發CCM報文來檢測這些MEP之間的連通狀態,從而實現鏈路連通性的管理。
在使用遠端MEP的MEP ID進行其它各項CFD功能測試之前,必須先配置連續性檢測功能;在使用遠端MEP的MAC地址進行其它CFD各項功能測試之前,則沒有此限製。
CCM報文中時間間隔域(Interval域)的值、CCM報文的發送間隔和遠端MEP的超時時間這三者之間的關係如表1-1所示。
CCM報文中時間間隔域的值 |
CCM報文的發送間隔 |
遠端MEP的超時時間 |
1 |
10/3毫秒 |
35/3毫秒 |
2 |
10毫秒 |
35毫秒 |
3 |
100毫秒 |
350毫秒 |
4 |
1秒 |
3.5秒 |
5 |
10秒 |
35秒 |
6 |
60秒 |
210秒 |
7 |
600秒 |
2100秒 |
· 為了便於描述,下文中我們將時間間隔域小於4的CCM報文稱為“高速CCM報文”,大於等於4的則稱為“低速CCM報文”。
配置CCM報文中時間間隔域時,需要注意:
· 同一MA中所有MEP發送的CCM報文中時間間隔域的值必須相同。
· 當CCM報文中時間間隔域的值改變後,需要等待一個新的間隔才能發送CCM報文。
(1) 進入係統視圖。
system-view
(2) (可選)配置MEP發送的CCM報文中時間間隔域的值。
cfd cc interval interval-value service-instance instance-id
缺省情況下,MEP發送的CCM報文中時間間隔域的值為4。
(3) 進入二/三層以太網或二層聚合接口視圖。
interface interface-type interface-number
(4) 開啟MEP的CCM報文發送功能。
cfd cc service-instance instance-id mep mep-id enable
缺省情況下,MEP的CCM報文發送功能處於關閉狀態。
(1) 進入係統視圖。
system-view
(2) (可選)配置MEP發送的CCM報文中時間間隔域的值。
cfd cc interval interval-value service-instance instance-id
缺省情況下,MEP發送的CCM報文中時間間隔域的值為4。
(3) 進入接口視圖。
¡ 進入三層以太網接口或三層聚合接口視圖。
interface interface-type interface-number
¡ 進入三層以太網子接口或三層聚合子接口視圖。
interface interface-type interface-number.subnumber
(4) 開啟MEP的CCM報文發送功能。
cfd cc service-instance instance-id mep mep-id enable
缺省情況下,MEP的CCM報文發送功能處於關閉狀態。
(5) (可選)開啟硬件檢測功能。
cfd hardware-cc service-instance instance-id remote-mep mep-list
缺省情況下,硬件檢測功能處於關閉狀態。
如需檢查鏈路連通性狀況,可在任意視圖下執行本命令,開啟環回功能。
cfd loopback service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ number number ]
通過配置鏈路跟蹤功能,可以查找源MEP到目標MEP之間的路徑,從而實現鏈路故障的定位。它包括以下兩種功能:
· 查找源MEP到目標MEP的路徑:通過從源MEP發送LTM報文到目標MEP,並檢測回應的LTR報文來確定設備間的路徑。
· 自動發送LTM報文:開啟本功能後,當源MEP在3.5個CCM報文發送周期內未收到目標MEP發來的CCM報文,從而判定與目標MEP的連接出錯時,將發送LTM報文(該LTM報文的目地為目標MEP,LTM報文中TTL字段為最大值255),通過檢測回應的LTR報文來定位故障。
在以太網網絡中,為帶VLAN屬性的MA所創建的MEP配置鏈路跟蹤功能之前,必須先創建該MA所屬的VLAN。
在二層VPN網絡中,為帶交叉連接屬性的MA所創建的MEP配置鏈路跟蹤功能之前,必須先創建該MA所屬的交叉連接。
(1) 可在任意視圖下執行本命令,查找源MEP到目標MEP的路徑。
cfd linktrace service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ ttl ttl-value ] [ hw-only ]
(2) 進入係統視圖。
system-view
(3) 開啟自動發送LTM報文功能。
cfd linktrace auto-detection [ size size-value ]
缺省情況下,自動發送LTM報文功能處於關閉狀態。
通過配置告警抑製功能可以減少MEP故障告警的數量。
如果隻開啟了告警抑製功能,而沒有配置AIS報文發送級別或者配置的級別錯誤,那麼該MEP隻能抑製自己的故障告警,而不會再繼續向更高級別的MD發送AIS報文。
告警抑製功能僅支持在以太網網絡中配置,不支持在二層VPN網絡中配置。
(1) 進入係統視圖。
system-view
(2) 開啟告警抑製功能。
cfd ais enable
缺省情況下,告警抑製功能處於關閉狀態。
(3) 配置AIS報文的發送級別。
cfd ais level level-value service-instance instance-id
缺省情況下,未配置AIS報文的發送級別,服務實例中的MEP將無法發送AIS報文。
AIS報文發送級別必須高於服務實例所在MD的級別。
(4) 配置AIS報文的發送周期。
cfd ais period period-value service-instance instance-id
缺省情況下,AIS報文的發送周期為1秒。
通過配置單向丟包測試功能,可以檢測MEP之間的單向丟包情況,包括:目標MEP的丟包數、丟包率和平均丟包數,源MEP的丟包數、丟包率和平均丟包數。
在二層VPN網絡上進行單向丟包測試前,需要先配置丟包測試報文的統計模式,並在源MEP和目標MEP上配置相同的報文統計模式。
在以太網網絡中創建的內向MEP不支持係統自動執行單向丟包測試功能。
(1) 進入係統視圖。
system-view
(2) 進入接口視圖。
¡ 進入三層以太網接口或三層聚合接口視圖。
interface interface-type interface-number
¡ 進入三層以太網子接口或三層聚合子接口視圖。
interface interface-type interface-number.subnumber
(3) 配置單向丟包測試報文的統計模式。
cfd frame-count mode { dot1p-based | port-based }
缺省情況下,未配置單向丟包測試報文的統計模式。
本命令僅在二層VPN網絡中生效。
可在任意視圖下執行本命令,手工按需執行單向丟包測試。
cfd slm service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ dot1p dot1p-value ] [ number number ] [ interval { interval | msec msec-interval } ]
(1) 進入係統視圖。
system-view
(2) 開啟係統自動執行單向丟包測試功能。
cfd slm continual service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ dot1p dot1p-value ] [ interval { interval | msec msec-interval }][ period period ]
缺省情況下,係統自動執行單向丟包檢測功能處於關閉狀態。
通過配置單向時延測試功能,可以檢測MEP之間報文傳輸的單向時延,從而對鏈路的傳輸性能進行監測和管理。
測試時要求源MEP和目標MEP的時間相同,否則時延值會出現負值或較大數值;用於單向時延變化測量時兩端時間可以不同。
測試結果需在目標MEP上通過display cfd dm one-way history命令來顯示。
在以太網網絡中創建的內向MEP不支持係統自動執行單向時延測試功能。
可在任意視圖下執行本命令,手工按需執行單向時延測試功能。
cfd dm one-way service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ number number ]
(1) 進入係統視圖。
system-view
(2) 開啟係統自動執行單向時延測試功能。
cfd dm one-way continual service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [dot1p dot1p-value ][ interval interval ]
缺省情況下,係統自動執行單向時延測試功能處於關閉狀態。
通過配置雙向時延測試功能,可以檢測MEP之間報文傳輸的雙向時延、平均時延和時延變化值,從而對鏈路的傳輸性能進行監測和管理。
在以太網網絡中創建的內向MEP不支持係統自動執行雙向時延測試功能。
可在任意視圖下執行本命令,手工按需執行雙向時延測試功能。
cfd dm two-way service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ dot1p dot1p-value ] [ number number ] [ interval interval ]
(1) 進入係統視圖。
system-view
(2) 開啟係統自動執行雙向時延測試功能。
cfd dm two-way continual service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ dot1p dot1p-value ] [ interval interval ]
缺省情況下,係統自動執行雙向時延測試功能處於關閉狀態。
通過配置比特錯誤測試功能,可以檢測到鏈路上比特錯誤發生的情況,從而對鏈路的傳輸性能進行監測和管理。
測試結果需在目標MEP上通過display cfd tst history命令來顯示。
比特錯誤測試功能僅支持在以太網網絡中配置,不支持在二層VPN網絡中配置。
在以太網網絡中創建的內向MEP不支持係統自動執行比特錯誤測試功能。
可在任意視圖下執行本命令,手工按需執行比特錯誤測試。
cfd tst service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ number number ] [ length-of-test length ] [ pattern-of-test { all-zero | prbs } [ with-crc ] ]
(1) 進入係統視圖。
system-view
(2) 開啟係統自動執行比特錯誤測試功能。
cfd tst continual service-instance instance-id mep mep-id { target-mac mac-address | target-mep target-mep-id } [ length-of-test length ] [ pattern-of-test { all-zero | prbs } [ with-crc ] ] [ interval interval ]
缺省情況下,係統自動執行比特錯誤測試功能處於關閉狀態。
通過配置閾值告警功能,可以監測MEP的丟包率、報文傳輸的時延或錯誤報文率的情況,並將監測結果提示用戶。
配置的閾值下限必須小於上限。
(1) 進入係統視圖。
system-view
(2) 配置單向丟包測試閾值告警功能。
cfd slm { far-end | near-end } threshold service-instance instance-id mep mep-id { lower-limit lower-limit | upper-limit upper-limit }
隻有配置了cfd slm continual命令,本命令才會生效。
(1) 進入係統視圖。
system-view
(2) 配置雙向時延測試閾值告警功能。
cfd dm two-way threshold service-instance instance-id mep mep-id { lower-limit lower-limit | upper-limit upper-limit }
隻有配置了cfd dm two-way continual命令,本命令才會生效。
端口聯動功能僅在有外向MEP的接口上配置才會生效。
(1) 進入係統視圖。
system-view
(2) 進入二/三層以太網接口或二層聚合接口視圖。
interface interface-type interface-number
(3) 配置連續性檢測超時模式的端口聯動動作。
cfd port-trigger cc-expire action { block | shutdown }
(1) 進入係統視圖。
system-view
(2) 進入二/三層以太網接口或二層聚合接口視圖。
interface interface-type interface-number
(3) 配置係統自動執行雙向時延測試模式的端口聯動動作。
cfd port-trigger dm action { block | shutdown }
(4) 退回係統視圖。
quit
(5) 配置係統自動執行雙向時延測試的延時閾值。
cfd dm two-way threshold service-instance instance-id mep mep-id { lower-limit lower-limit | upper-limit upper-limit } *
缺省情況下,係統自動執行雙向時延測試的延時時間的下限為0微秒,上限為4294967295微秒。
(1) 進入係統視圖。
system-view
(2) 進入二/三層以太網接口或二層聚合接口視圖。
interface interface-type interface-number
(3) 配置遠端故障標記模式的端口聯動動作。
cfd port-trigger rdi action { block | shutdown }
(1) 進入係統視圖。
system-view
(2) 進入二/三層以太網接口或二層聚合接口視圖。
interface interface-type interface-number
(3) 配置係統自動執行單向丟包測試模式的端口聯動動作。
cfd port-trigger slm action { block | shutdown }
(4) 退回係統視圖。
quit
(5) 配置係統自動執行單向丟包測試的丟包率閾值。
cfd slm { far-end | near-end } threshold service-instance instance-id mep mep-id { lower-limit lower-limit | upper-limit upper-limit } *
缺省情況下,對於源MEP端和目標MEP端,係統自動執行單向丟包測試的丟包率閾值的下限均為0,上限均為100%。
(6) 配置被阻塞的接口經過指定的延時時間後自動恢複為up狀態,並恢複係統自動執行單向丟包測試功能。
cfd slm port-trigger up-delay delay
缺省情況下,在係統自動執行單向丟包測試功能與端口聯動過程中,如果接口被端口聯動功能阻塞,需要執行undo cfd port-trigger slm action命令恢複up狀態。
(1) 進入係統視圖。
system-view
(2) 進入二/三層以太網接口或二層聚合接口視圖。
interface interface-type interface-number
(3) 配置係統自動執行比特錯誤測試模式的端口聯動動作
cfd port-trigger tst action { block | shutdown }
(4) 退回係統視圖。
quit
(5) 配置係統自動執行比特錯誤測試的錯誤報文率閾值。
cfd tst threshold service-instance instance-id mep mep-id { lower-limit lower-limit | upper-limit upper-limit } *
缺省情況下,係統自動執行比特錯誤測試的錯誤報文率閾值的下限為0,上限為100%。
可在任意視圖下執行以下命令:
· 顯示CFD的開啟狀態。
display cfd status
· 顯示MD的配置信息。
display cfd md
· 顯示服務實例的配置信息。
display cfd service-instance [ instance-id ]
可在任意視圖下執行以下命令,顯示MEP上AIS的配置和動態信息。
display cfd ais [ service-instance instance-id [ mep mep-id ] ]
可在任意視圖下執行以下命令:
· 顯示MP的信息。
display cfd mp [ interface interface-type interface-number ]
· 顯示MEP的屬性和運行信息。
display cfd mep mep-id service-instance instance-id
· 顯示遠端MEP的信息。
display cfd remote-mep service-instance instance-id mep mep-id
· 顯示服務實例內的MEP列表。
display cfd meplist [ service-instance instance-id ]
可在任意視圖下執行以下命令:
· 顯示MEP上獲得的LTR報文信息。
display cfd linktrace-reply [ service-instance instance-id [ mep mep-id ] ]
· 顯示自動發送LTM報文後收到的LTR報文信息。
display cfd linktrace-reply auto-detection [ size size-value ]
可在任意視圖下執行以下命令:
· 顯示單向時延的測試結果。
display cfd dm one-way history [ service-instance instance-id [ mep mep-id ] ]
· 顯示雙向時延的測試結果。
display cfd dm two-way history [ service-instance instance-id [ mep mep-id ] ] [ number number ]
· 顯示單向丟包的測試結果。
display cfd slm history [ service-instance instance-id [ mep mep-id ] ] [ number number ]
· 顯示比特錯誤的測試結果。
display cfd tst history [ service-instance instance-id [ mep mep-id ] ] [ number number ]
請在用戶視圖下執行以下命令:
· 清除單向時延的測試結果。
reset cfd dm one-way history [ service-instance instance-id [ mep mep-id ] ]
· 清除比特錯誤的測試結果。
reset cfd tst [ service-instance instance-id [ mep mep-id ] ]
· 由五台設備組成的網絡被劃分為MD_A和MD_B兩個MD,其級別分別為5和3,各設備的所有端口都屬於VLAN 100,且各MD中的MA均服務於該VLAN,並假定Device A~Device E的MAC地址依次為0010-FC01-6511、0010-FC02-6512、0010-FC03-6513、0010-FC04-6514和0010-FC05-6515。
· MD_A的邊界端口為Device A的GigabitEthernet0/0/1、Device D的GigabitEthernet0/0/3和Device E的GigabitEthernet0/0/4,這些端口上都是內向MEP;MD_B的邊界端口為Device B的GigabitEthernet0/0/3和Device D的GigabitEthernet0/0/1,這些端口都是外向MEP。
· 要求將MD_A的MIP規劃在Device B上,並隻在端口上有低級別MEP時配置。根據此規劃,由於Device B的GigabitEthernet0/0/3上配置有MD_B的MEP,因此在Device B上采用Explicit規則來創建MD_A的MIP。
· 要求將MD_B的MIP規劃在Device C上,並在其所有端口上配置。根據此規劃,在Device C上配置MD_B的MIP,且其創建規則為Default規則。
· 要求通過使用連續性檢測功能來檢測MD_A和MD_B中各MEP之間的連通狀態,當檢測到鏈路故障時,使用環回功能進行故障定位,並通過告警抑製功能來減少故障告警的數量。
· 要求通過端口聯動功能保護Device B的接口GigabitEthernet0/0/3與Device D的接口GigabitEthernet0/0/1之間鏈路的數據流量,當Device B的接口GigabitEthernet0/0/3上的外向MEP檢測到鏈路故障時,會觸發端口聯動動作,從而保護流量不在此接口丟失。
· 要求在獲取到整個組網的狀態後,分別使用鏈路跟蹤功能、單向丟包測試功能、單向時延測試功能、雙向時延測試功能和比特錯誤測試功能進行各種鏈路故障檢測。
圖1-4 CFD配置組網圖
按照圖1-4在各設備上分別創建VLAN 100,並配置端口GigabitEthernet0/0/1~GigabitEthernet0/0/4都屬於VLAN 100。
(1) 開啟CFD功能
# 在Device A上開啟CFD功能。
<DeviceA> system-view
[DeviceA] cfd enable
Device B~Device E的配置與Device A相似,配置過程略。
(2) 配置服務實例
# 在Device A上創建級別為5的MD MD_A,並創建服務實例1,該服務實例的MA以VLAN編號為名稱,且服務於VLAN 100。
[DeviceA] cfd md MD_A level 5
[DeviceA] cfd service-instance 1 ma-id vlan-based md MD_A vlan 100
Device E的配置與Device A相似,配置過程略。
# 在Device B上先創建級別為5的MD MD_A,並創建服務實例1,該服務實例的MA以VLAN編號為名稱,且服務於VLAN 100;再創建級別為3的MD MD_B,並創建服務實例2,該服務實例的MA以VLAN編號為名稱,且服務於VLAN 100。
[DeviceB] cfd md MD_A level 5
[DeviceB] cfd service-instance 1 ma-id vlan-based md MD_A vlan 100
[DeviceB] cfd md MD_B level 3
[DeviceB] cfd service-instance 2 ma-id vlan-based md MD_B vlan 100
Device D的配置與Device B相似,配置過程略。
# 在Device C上創建級別為3的MD MD_B,並創建服務實例2,該服務實例的MA以VLAN編號為名稱,且服務於VLAN 100。
[DeviceC] cfd md MD_B level 3
[DeviceC] cfd service-instance 2 ma-id vlan-based md MD_B vlan 100
(3) 配置MEP
# 在Device A的服務實例1內配置MEP列表,在端口GigabitEthernet0/0/1上創建服務實例1內的內向MEP 1001。
[DeviceA] cfd meplist 1001 4002 5001 service-instance 1
[DeviceA] interface gigabitethernet 0/0/1
[DeviceA-GigabitEthernet0/0/1] cfd mep 1001 service-instance 1 inbound
[DeviceA-GigabitEthernet0/0/1] quit
# 在Device B的服務實例1和2內分別配置MEP列表,在端口GigabitEthernet0/0/3上創建服務實例2內的外向MEP 2001。
[DeviceB] cfd meplist 1001 4002 5001 service-instance 1
[DeviceB] cfd meplist 2001 4001 service-instance 2
[DeviceB] interface gigabitethernet 0/0/3
[DeviceB-GigabitEthernet0/0/3] cfd mep 2001 service-instance 2 outbound
[DeviceB-GigabitEthernet0/0/3] quit
# 在Device D的服務實例1和2內分別配置MEP列表,在端口GigabitEthernet0/0/1上創建服務實例2內的外向MEP 4001,然後在端口GigabitEthernet0/0/3上創建服務實例1內的內向MEP 4002。
[DeviceD] cfd meplist 1001 4002 5001 service-instance 1
[DeviceD] cfd meplist 2001 4001 service-instance 2
[DeviceD] interface gigabitethernet 0/0/1
[DeviceD-GigabitEthernet0/0/1] cfd mep 4001 service-instance 2 outbound
[DeviceD-GigabitEthernet0/0/1] quit
[DeviceD] interface gigabitethernet 0/0/3
[DeviceD-GigabitEthernet0/0/3] cfd mep 4002 service-instance 1 inbound
[DeviceD-GigabitEthernet0/0/3] quit
# 在Device E的服務實例1內配置MEP列表,在端口GigabitEthernet0/0/4上創建服務實例1內的內向MEP 5001。
[DeviceE] cfd meplist 1001 4002 5001 service-instance 1
[DeviceE] interface gigabitethernet 0/0/4
[DeviceE-GigabitEthernet0/0/4] cfd mep 5001 service-instance 1 inbound
[DeviceE-GigabitEthernet0/0/4] quit
(4) 配置MIP
# 在Device B的服務實例1內配置MIP的創建規則為Explicit規則。
[DeviceB] cfd mip-rule explicit service-instance 1
# 在Device C的服務實例2內配置MIP的創建規則為Default規則。
[DeviceC] cfd mip-rule default service-instance 2
(5) 配置連續性檢測功能
# 在Device A的端口GigabitEthernet0/0/1上開啟服務實例1內MEP 1001的CCM報文發送功能。
[DeviceA] interface gigabitethernet 0/0/1
[DeviceA-GigabitEthernet0/0/1] cfd cc service-instance 1 mep 1001 enable
[DeviceA-GigabitEthernet0/0/1] quit
# 在Device B的端口GigabitEthernet0/0/3上開啟服務實例2內MEP 2001的CCM報文發送功能。
[DeviceB] interface gigabitethernet 0/0/3
[DeviceB-GigabitEthernet0/0/3] cfd cc service-instance 2 mep 2001 enable
[DeviceB-GigabitEthernet0/0/3] quit
# 在Device D的端口GigabitEthernet0/0/1上開啟服務實例2內MEP 4001的CCM報文發送功能,並在端口GigabitEthernet0/0/3上開啟服務實例1內MEP 4002的CCM報文發送功能。
[DeviceD] interface gigabitethernet 0/0/1
[DeviceD-GigabitEthernet0/0/1] cfd cc service-instance 2 mep 4001 enable
[DeviceD-GigabitEthernet0/0/1] quit
[DeviceD] interface gigabitethernet 0/0/3
[DeviceD-GigabitEthernet0/0/3] cfd cc service-instance 1 mep 4002 enable
[DeviceD-GigabitEthernet0/0/3] quit
# 在Device E的端口GigabitEthernet0/0/4上開啟服務實例1內MEP 5001的CCM報文發送功能。
[DeviceE] interface gigabitethernet 0/0/4
[DeviceE-GigabitEthernet0/0/4] cfd cc service-instance 1 mep 5001 enable
[DeviceE-GigabitEthernet0/0/4] quit
(6) 配置告警抑製功能
# 在Device B上開啟告警抑製功能,並在服務實例2內配置AIS報文的發送級別為5,發送周期為1秒。
[DeviceB] cfd ais enable
[DeviceB] cfd ais level 5 service-instance 2
[DeviceB] cfd ais period 1 service-instance 2
(7) 配置端口聯動功能
# 在Device B的端口GigabitEthernet0/0/3上同時配置兩種端口聯動觸發模式:連續性檢測超時模式及遠端故障標記模式,對應的端口聯動觸發動作分別為關閉端口、阻塞端口。
[DeviceB-GigabitEthernet0/0/3] cfd port-trigger cc-expire action shutdown
[DeviceB-GigabitEthernet0/0/3] cfd port-trigger rdi action block
[DeviceB-GigabitEthernet0/0/3] quit
(1) 驗證環回功能
當通過連續性檢測功能檢測到鏈路故障時,可以使用環回功能進行故障定位。譬如:
# 在Device A上啟用環回功能,檢查服務實例1內MEP 1001到5001的鏈路狀況。
[DeviceA] cfd loopback service-instance 1 mep 1001 target-mep 5001
Loopback to MEP 5001 with the sequence number start from 1001-43404:
Reply from 0010-fc05-6515: sequence number=1001-43404 time=5ms
Reply from 0010-fc05-6515: sequence number=1001-43405 time=5ms
Reply from 0010-fc05-6515: sequence number=1001-43406 time=5ms
Reply from 0010-fc05-6515: sequence number=1001-43407 time=5ms
Reply from 0010-fc05-6515: sequence number=1001-43408 time=5ms
Sent: 5 Received: 5 Lost: 0
(2) 驗證鏈路跟蹤功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用鏈路跟蹤功能進行路徑查找或故障定位。譬如:
# 在Device A的服務實例1內查找MEP 1001到5001的路徑。
[DeviceA] cfd linktrace service-instance 1 mep 1001 target-mep 5001
Linktrace to MEP 5001 with the sequence number 1001-43462:
MAC address TTL Last MAC Relay action
0010-fc05-6515 63 0010-fc02-6512 Hit
(3) 驗證單向丟包測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用單向丟包測試功能檢測鏈路狀態。譬如:
# 在Device A上手工按需執行測試服務實例1內MEP 1001到4002的單向丟包情況。
[DeviceA] cfd slm service-instance 1 mep 1001 target-mep 4002
Reply from 0010-fc02-6514:
Far-end frame loss : 10 Far-end frame loss rate : 10.00%
Near-end frame loss: 20 Near-end frame loss rate: 20.00%
Reply from 0010-fc02-6514:
Far-end frame loss : 40 Far-end frame loss rate : 40.00%
Near-end frame loss: 40 Near-end frame loss rate: 40.00%
Reply from 0010-fc02-6514:
Far-end frame loss : 0 Far-end frame loss rate : 0.00%
Near-end frame loss: 10 Near-end frame loss rate: 10.00%
Reply from 0010-fc02-6514:
Far-end frame loss : 30 Far-end frame loss rate : 30.00%
Near-end frame loss: 30 Near-end frame loss rate: 30.00%
Average:
Far-end frame loss : 20 Far-end frame loss rate : 20.00%
Near-end frame loss: 25 Near-end frame loss rate: 25.00%
Packet statistics:
Sent LMMs: 5 Received: 5
# 在Device A上開啟係統自動執行測試服務實例1內MEP 1001到4002的單向丟包。
[DeviceA] cfd slm continual service-instance 1 mep 1001 target-mep 4002
# 在Device A上顯示服務實例1內MEP 1001到4002上單向丟包的測試結果。
[DeviceA] display cfd slm history service-instance 1 mep 1001
Service instance: 1
MEP ID: 1001
Send status: Testing
Test state: Active
Reply from 0010-fc04-6514:
Far-end frame loss : 10 Far-end frame loss rate : 10.00%
Near-end frame loss: 20 Near-end frame loss rate: 20.00%
Reply from 0010-fc04-6514:
Far-end frame loss : 40 Far-end frame loss rate : 40.00%
Near-end frame loss: 40 Near-end frame loss rate: 40.00%
Reply from 0010-fc04-6514:
Far-end frame loss : 0 Far-end frame loss rate : 0.00%
Near-end frame loss: 10 Near-end frame loss rate: 10.00%
Reply from 0010-fc04-6514:
Far-end frame loss : 30 Far-end frame loss rate : 30.00%
Near-end frame loss: 30 Near-end frame loss rate: 30.00%
Reply from 0010-fc04-6514:
Far-end frame loss : 20 Far-end frame loss rate : 20.00%
Near-end frame loss: 25 Near-end frame loss rate: 25.00%
Average:
Far-end frame loss : 20 Far-end frame loss rate : 20.00%
Near-end frame loss: 25 Near-end frame loss rate: 25.00%
(4) 驗證單向時延測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用單向時延測試功能檢測鏈路的單向時延。例如:
# 在Device A上測試服務實例1內MEP 1001到4002的單向時延。
[DeviceA] cfd dm one-way service-instance 1 mep 1001 target-mep 4002
5 1DMs have been sent. Please check the result on the remote device.
# 在Device D上顯示服務實例1內MEP 4002上單向時延的測試結果。
[DeviceD] display cfd dm one-way history service-instance 1 mep 4002
Service instance: 1
MEP ID: 4002
Sent 1DM total number: 0
Received 1DM total number: 5
Frame delay: 10ms 9ms 11ms 5ms 5ms
Delay average: 8ms
Delay variation: 5ms 4ms 6ms 0ms 0ms
Variation average: 3ms
(5) 驗證雙向時延測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用雙向時延測試功能檢測鏈路的雙向時延。例如:
# 在Device A上手工按需執行測試服務實例1內MEP 1001到4002的雙向時延。
[DeviceA] cfd dm two-way service-instance 1 mep 1001 target-mep 4002
Reply from 0010-fc04-6514: 10us
Reply from 0010-fc04-6514: 9us
Reply from 0010-fc04-6514: 11us
Reply from 0010-fc04-6514: 5us
Reply from 0010-fc04-6514: 5us
Average: 8us
Frame delay variation: 1us 2us 6us 0us
Average: 2us
Packet statistics:
Sent DMMs: 5 Received: 5 Lost: 0
# 在Device A上開啟係統自動執行測試服務實例1內MEP 1001到4002的雙向時延。
[DeviceA] cfd dm two-way continual service-instance 1 mep 1001 target-mep 4002
# 在Device A上顯示服務實例1內MEP 1001到4002上雙向時延的測試結果。
[DeviceA] display cfd dm two-way history service-instance 1 mep 1001
Service instance: 1
MEP ID: 1001
Send status: Testing
Frame delay:
Reply from 0010-fc04-6514: 564us
Reply from 0010-fc04-6514: 606us
Reply from 0010-fc04-6514: 650us
Reply from 0010-fc04-6514: 626us
Reply from 0010-fc04-6514: 660us
Average: 621us
Frame delay variation: 42us 44us 24us 34us
Average: 36us
Packet statistics:
Sent DMMs: 5 Received: 5 Lost: 0
(6) 驗證比特錯誤測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用比特錯誤測試功能檢測鏈路上比特錯誤的情況。例如:
# 在Device A上手工按需執行測試服務實例1內MEP 1001到4002的比特錯誤。
[DeviceA] cfd tst service-instance 1 mep 1001 target-mep 4002
5 TSTs have been sent. Please check the result on the remote device.
# 在Device D上顯示服務實例1內MEP 4002上比特錯誤的測試結果。
[DeviceD] display cfd tst history service-instance 1 mep 4002
Service instance: 1
MEP ID: 4002
Send status: Testing
Received from 0010-fc01-6511, Bit True, sequence number 0
Received from 0010-fc01-6511, Bit True, sequence number 1
Received from 0010-fc01-6511, Bit True, sequence number 2
Received from 0010-fc01-6511, Bit True, sequence number 3
Received from 0010-fc01-6511, Bit True, sequence number 4
Sent TST total number: 7
Received TST total number: 5
Received bit error TST number: 0
Percentage of error messages: 0.00%
· 由四台設備組成的網絡中,CE1和CE2為用戶網絡邊緣設備,PE1和PE2為服務提供商網絡邊緣設備。希望通過在骨幹網上建立靜態PW,實現CE1的和CE2互聯,CE1和CE2通過以太網接口的方式接入PE1和PE2。假定Device A~Device D的MAC地址依次為0010-FC01-6511、0010-FC02-6512、0010-FC03-6513和0010-FC04-6514。
· 將PE 1和PE 2的三層以太網子接口GigabitEthernet0/0/1.1配置為AC側接口,並關聯交叉連接組vpna和交叉連接svc。
· 將該網絡劃分到MD_A,其級別為5。該MD的邊界接口為PE1和PE2的三層以太網子接口GigabitEthernet0/0/1.1,兩個接口上都是內向MEP。
· 通過使用連續性檢測功能來檢測內向MEP之間的連通狀態,當檢測到鏈路故障時,使用環回功能進行故障定位。
· 要求在獲取到整個組網的狀態後,分別使用鏈路跟蹤功能、丟包測試功能和時延測試功能進行各種鏈路故障檢測。
圖1-5 基於二層VPN的CFD配置組網圖
(1) 配置靜態PW的二層VPN(略)
有關配置靜態PW的二層VPN的詳細介紹,請參見“MPLS配置指導”中的“MPLS L2VPN”。
(2) 開啟CFD功能
# 在Device A上開啟CFD功能。
<DeviceA> system-view
[DeviceA] cfd enable
Device B的配置與Device A相同,配置過程略。
(3) 配置服務實例
# 在Device A上創建級別為5的MD MD_A,並創建服務實例1,該服務實例的MA名稱為vpnma,且服務於交叉連接組vpna中的交叉連接svc。
[DeviceA] cfd md MD_A level 5
[DeviceA] cfd service-instance 1 ma-id string vpnma md MD_A xconnect-group vpna connection svc
Device B的配置與Device A相同,配置過程略。
(4) 配置MEP
# 在Device A的服務實例1內配置MEP列表,在三層以太網子接口GigabitEthernet0/0/1.1上創建服務實例1內的內向MEP 1001。
[DeviceA] cfd meplist 1001 2001 service-instance 1
[DeviceA] interface gigabitethernet 0/0/1.1
[DeviceA-GigabitEthernet0/0/1.1] cfd mep 1001 service-instance 1 inbound
[DeviceA-GigabitEthernet0/0/1.1] quit
# 在Device B的服務實例1內配置MEP列表,在三層以太網子接口GigabitEthernet0/0/1.1上創建服務實例1內的內向MEP 2001。
[DeviceB] cfd meplist 1001 2001 service-instance 1
[DeviceB] interface gigabitethernet 0/0/1.1
[DeviceB-GigabitEthernet0/0/1.1] cfd mep 2001 service-instance 1 inbound
[DeviceB-GigabitEthernet0/0/1.1] quit
(5) 配置連續性檢測功能
# 在Device A的三層以太網子接口GigabitEthernet0/0/1.1上開啟服務實例1內MEP 1001的CCM報文發送功能。
[DeviceA] interface gigabitethernet 0/0/1.1
[DeviceA-GigabitEthernet0/0/1.1] cfd cc service-instance 1 mep 1001 enable
[DeviceA-GigabitEthernet0/0/1.1] quit
# 在Device B的三層以太網子接口GigabitEthernet0/0/1.1上開啟服務實例1內MEP 2001的CCM報文發送功能。
[DeviceB] interface gigabitethernet 0/0/1.1
[DeviceB-GigabitEthernet0/0/1.1] cfd cc service-instance 1 mep 2001 enable
[DeviceB-GigabitEthernet0/0/1.1] quit
(6) 配置丟包測試報文的統計模式
# 在Device A的三層以太網子接口GigabitEthernet0/0/1.1上配置丟包測試報文的統計模式為按接口進行統計。
[DeviceA] interface gigabitethernet 0/0/1.1
[DeviceA-GigabitEthernet0/0/1.1] cfd frame-count mode port-based
[DeviceA-GigabitEthernet0/0/1.1] quit
# 在Device B的三層以太網子接口GigabitEthernet0/0/1.1上配置丟包測試報文的統計模式為按接口進行統計。
[DeviceB] interface gigabitethernet 0/0/1.1
[DeviceB-GigabitEthernet0/0/1.1] cfd frame-count mode port-based
[DeviceB-GigabitEthernet0/0/1.1] quit
(1) 驗證環回功能
當通過連續性檢測功能檢測到鏈路故障時,可以使用環回功能進行故障定位。譬如:
# 在Device A上啟用環回功能,檢查服務實例1內MEP 1001到2001的鏈路狀況。
[DeviceA] cfd loopback service-instance 1 mep 1001 target-mep 2001
Loopback to MEP 2001 with the sequence number start from 1001-43404:
Reply from 0010-fc02-6512: sequence number=1001-43404 time=5ms
Reply from 0010-fc02-6512: sequence number=1001-43405 time=5ms
Reply from 0010-fc02-6512: sequence number=1001-43406 time=5ms
Reply from 0010-fc02-6512: sequence number=1001-43407 time=5ms
Reply from 0010-fc02-6512: sequence number=1001-43408 time=5ms
Sent: 5 Received: 5 Lost: 0
(2) 驗證鏈路跟蹤功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用鏈路跟蹤功能進行路徑查找或故障定位。譬如:
# 在Device A的服務實例1內查找MEP 1001到2001的路徑。
[DeviceA] cfd linktrace service-instance 1 mep 1001 target-mep 2001
Linktrace to MEP 2001 with the sequence number 1001-43462:
MAC address TTL Last MAC Relay action
0010-fc02-6512 63 0010-fc02-6512 Hit
(3) 驗證單向丟包測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用單向丟包測試功能檢測鏈路狀態。譬如:
# 在Device A上手工按需執行測試服務實例1內MEP 1001到2001的單向丟包。
[DeviceA] cfd slm service-instance 1 mep 1001 target-mep 2001
Reply from 0010-fc02-6512:
Far-end frame loss : 10 Far-end frame loss rate : 10.00%
Near-end frame loss: 20 Near-end frame loss rate: 20.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 40 Far-end frame loss rate : 40.00%
Near-end frame loss: 40 Near-end frame loss rate: 40.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 0 Far-end frame loss rate : 0.00%
Near-end frame loss: 10 Near-end frame loss rate: 10.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 30 Far-end frame loss rate : 30.00%
Near-end frame loss: 30 Near-end frame loss rate: 30.00%
Average:
Far-end frame loss : 20 Far-end frame loss rate : 20.00%
Near-end frame loss: 25 Near-end frame loss rate: 25.00%
Packet statistics:
Sent LMMs: 5 Received: 5
# 在Device A上開啟係統自動執行測試服務實例1內MEP 1001到2001的單向丟包。
[DeviceA] cfd slm continual service-instance 1 mep 1001 target-mep 2001
# 在Device A上顯示服務實例1內MEP 1001的單向丟包的測試結果。
[DeviceA] display cfd slm history service-instance 1 mep 1001
Service instance: 1
MEP ID: 1001
Send status: Testing
Test state: Active
Reply from 0010-fc02-6512:
Far-end frame loss : 10 Far-end frame loss rate : 10.00%
Near-end frame loss: 20 Near-end frame loss rate: 20.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 40 Far-end frame loss rate : 40.00%
Near-end frame loss: 40 Near-end frame loss rate: 40.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 0 Far-end frame loss rate : 0.00%
Near-end frame loss: 10 Near-end frame loss rate: 10.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 30 Far-end frame loss rate : 30.00%
Near-end frame loss: 30 Near-end frame loss rate: 30.00%
Reply from 0010-fc02-6512:
Far-end frame loss : 20 Far-end frame loss rate : 20.00%
Near-end frame loss: 25 Near-end frame loss rate: 25.00%
Average:
Far-end frame loss : 20 Far-end frame loss rate : 20.00%
Near-end frame loss: 25 Near-end frame loss rate: 25.00%
Packet statistics:
Sent LMMs: 100 Received: 100
(4) 驗證單向時延測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用單向時延測試功能檢測鏈路的單向時延。例如:
# 在Device A上手工按需執行測試服務實例1內MEP 1001到2001的單向時延。
[DeviceA] cfd dm one-way service-instance 1 mep 1001 target-mep 2001
5 1DMs have been sent. Please check the result on the remote device.
# 在Device B上顯示服務實例1內MEP 2001上單向時延的測試結果。
[DeviceB] display cfd dm one-way history service-instance 1 mep 2001
Service instance: 1
MEP ID: 2001
Sent 1DM total number: 0
Received 1DM total number: 5
Frame delay: 10us 9us 11us 5us 5us
Delay average: 8us
Frame Delay variation: 2us 1us 5us 0us
Variation average: 2us
# 在Device A上開啟係統自動執行測試服務實例1內MEP 1001到2001的單向時延。
[DeviceA] cfd dm one-way continual service-instance 1 mep 1001 target-mep 2001
# 在Device B上顯示服務實例1內MEP 2001上單向時延的測試結果。
[DeviceB] display cfd dm one-way history service-instance 1 mep 2001
Service instance: 1
MEP ID: 2001
Sent 1DM total number: 0
Received 1DM total number: 5
Frame delay: 10us 9us 11us 5us 5us
Delay average: 8us
Frame Delay variation: 2us 1us 5us 0us
Variation average: 2us
(5) 驗證雙向時延測試功能
當通過連續性檢測功能獲取到整個組網的狀態後,可以使用雙向時延測試功能檢測鏈路的雙向時延。例如:
# 在Device A上手工按需執行測試服務實例1內MEP 1001到2001的雙向時延。
[DeviceA] cfd dm two-way service-instance 1 mep 1001 target-mep 2001
Frame delay:
Reply from 0010-fc02-6512: 10us
Reply from 0010-fc02-6512: 9us
Reply from 0010-fc02-6512: 11us
Reply from 0010-fc02-6512: 5us
Reply from 0010-fc02-6512: 5us
Average: 8us
Frame delay variation: 1us 2us 6us 0us
Average: 2us
Packet statistics:
Sent DMMs: 5 Received: 5 Lost: 0
# 在Device A上開啟係統自動執行測試服務實例1內MEP 1001到2001的雙向時延。
[DeviceA] cfd dm two-way continual service-instance 1 mep 1001 target-mep 2001
# 在Device A上顯示服務實例1內MEP 1001的雙向時延的測試結果。
[DeviceA] display cfd dm two-way history service-instance 1 mep 1001
Service instance: 1
MEP ID: 1001
Send status: Testing
Test state: Active
Frame delay:
Reply from 0010-fc02-6512: 10us
Reply from 0010-fc02-6512: 9us
Reply from 0010-fc02-6512: 11us
Reply from 0010-fc02-6512: 5us
Reply from 0010-fc02-6512: 5us
Average: 8us
Frame delay variation: 1us 2us 6us 0us
Average: 2us
Packet statistics:
Sent DMMs: 5 Received: 5 Lost: 0
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!