CFM IEEE 802.1ag 筆記

 

 

 

  IEEE802.1ag   20 3小節, 再上圖 MEP / MIP / MD MA/

 

Figure 18-7—MEPs, MIPs, and MD Levels

 

 

# PDU

 

DUT shall not accept the CCM frame that source MAC address is “Group MAC address”.

DUT shall not accept the CCM frame that destination MAC address is different with MD Level.

DUT shall always ignore the Version field that is unknowable.

 // Ingnore的意思是,接收方不對該字節進行檢查,忽略此字段,若該包中其他格式正確則接收方對此包正常處理, 記錄信息到MEPDB中等.

 

# MD/ MA / VLAN 連通性之間的關係;

1) 一個MD可以包含多個MA;

2) 一個MA中可以指定多個vlan,但是隻有primary生效;

3) CFM的目的在於檢查鏈路的連通性,  所以被檢測的鏈路必須在同一個vlan中的MEP纔有意義;

4) 所以一個MA中主機必須在一個vlan,    確認聯通性纔有意義;

5)  案例, 一個MD中有多個MA,每個MA有不同的Primary Vlan,  所以當MEP確認聯通性時, 爲每個MA單獨確認, 不同vlan間互不影響.

 

# MEP/MIP , MA , MD

1) MEP/MIP是由端口組成的, MA 是由相同或者不同BRIDGE上的端口(MEP/MIP) 組成的,  MD 是由一個或者多個MD組成的.

2) 在同一個Bridge的同一個MA, 如果某個端口被配置成UP(down) MEP,則該MA中該Bridge上的所有端口必須是UP(dwon) MEP.

3) Mep是綁定端口的, MA是綁定VLAN.

 

# MEP / MHF 發送LBM/LBR, LTM/LMR, CCM 時的SMACDMAC,  以及這些MAC地址和Bridge的關係?

 

 

 

# CCM reception

Any CFM PDU received that is too short to contain an MD Level header field shall be discarded. 

 

Those PDUs that do not match any of the OpCodes recognized by an MP OpCode Demultiplexer, or that are too

short to contain an OpCode, are discarded by either of a MEP’s MP OpCode Demultiplexers, and passed to

the Passive MHF Multiplexer by an MHF’s MP OpCode Demultiplexer.

 

 

# Port Status and Interface Status

 

 

# MIP Creation

 cfm中有兩個值, 分別在MDMA,  CfmMdMhfCreationCfmMaMhfCreation:  具體使用ma的值.  ma的值可以單獨指定或者指向MD中的值.  

 CfmMdMhfCreation:  MD下有3個值, 分別是 defMHFnone, defMHFdefaultdefMHFexplicit;  標準指定的默認值爲defMHFnone. 而目前DUT上使用的是defMHFdefault;

 

CfmMaMhfCreation: MA下游4個值, 分別是 defMHFnone, defMHFdefaultdefMHFexplicit, 加上defMHFdefer.且標準指出默認值爲 defMHFdefer, 但是目前dut上默認值爲defMHFdefault;

 

·    defMHFnone:  不自動創建MIP;

·    defMHFdefault:  mip creationdefault, 會在屬於ma所在vlan的所有端口下自動創建MIP, 如果 該端口沒有屬於更低等級的active MD或者

·                                  該端口是 更低級別的MEP. 

·    defMHFexplicit:  mip creationExplicit, 會在屬於ma所在vlan的所有端口下自動創建MIP, 如果 該端口是更低級別的MEP.   並不是所有所有

·                                   都創建.                  

·    defMHFdefer:     只有在MA下存在的值,  也是標準中指定的CfmMaMhfCreation的默認值, CfmMaMhfCreation被設定成defMHFdefer, 表明該值從CfmMdMhfCreation中取值 .

 

Referenc ieee802.1ag P220.

 

 

#  First TLV Offset    (1 octet)

The First TLV Offset field of the Common CFM Header in a CCM is transmitted as 70.

The First TLV Offset field of the Common CFM Header in an LBM or LBR is transmitted as 4.

The First TLV Offset field of the Common CFM Header in an LTM is be transmitted as 17.

The First TLV Offset field of the Common CFM Header in an LTR is transmitted as 6.

 

 

defMHFnone: No

defMHFdefault:

VID(s) can pass

i) There are no

ii) There is a MEP

defMHFexplicit:

 

 

Only the highest priority defect is reported in the Fault Alarm.

# Highest Defect:  Lowest Alarm : 

Console#show ethernet cfm fault-notify-generator mep 1               

MD Name      MA Name      Highest Defect Lowest Alarm  Alarm Time Reset Time       

------------ ------------ -------------- ------------- ---------- ----------

md1p         ma1p         defXconCCM     macRemErrXcon    10 sec.     8 sec.

 

Highest Defect: 表示目前DUT發生的或者檢測到的, 並且已經alarm的錯誤類型;   標準規定:Only the highest priority defect is reported in the Fault Alarm.

Lowest Alarm : 定義需要report錯誤的最低等級, 及低於定義的等級則不需要報告.

 

Lowest Alarm                     

------------------------------------------------

allDef                            1

macRemErrXcon           2

remErrXcon                     3

errXcon                          4

xcon                              5

noDef                            6

-----------------------------               // DUT ASF4528B

allDef (1),

macRemErrXcon (2),

remErrXcon (3),

errXcon (4),

xcon (5),

noXcon (6)

----------- // From 802.1ag

 

 

 

 

#

 

# RDI (Remote Defect Indication)

 

20.33.7 someRDIdefect

A Boolean indicating the aggregate health of the remote MEPs. True indicates that at least one of the

Remote MEP state machines is receiving valid CCMs from its remote MEP that has the RDI bit set, and

false that no Remote MEP state machines are receiving valid CCMs with the RDI bit set. someRDIdefect is

the logical OR of all of the rMEPlastRDI variables for all of the Remote MEP state machines on this MEP.

This variable is readable as a managed object [item o) in 12.14.7.1.3].

 

Read MEP Database

e) A Boolean value indicating the state of the RDI bit in the last received CCM (true for RDI = 1), or

false, if none has been received (20.19.2);

 

20.19.2 rMEPlastRDI

Boolean flag. Contains the RDI flag from the last-received CCM. This variable is readable as a managed

object [item e) in 12.14.7.6.3].

 

20.11.1 xmitCCM()

g) Fills the RDI field (21.6.1.1) with the presentRDI variable (20.9.6);

 

20.9.6 presentRDI

A Boolean value indicating the state of the RDI bit in CCMs transmitted by this MEP. presentRDI is true if

and only if one or more of the variables someRMEPCCMdefect, someMACstatusDefect, errorCCMdefect,

or xconCCMdefect is true, and if the corresponding priority of that variable, from Table 20-1, is greater than

or equal to the value of the variable lowestAlarmPri.

 

 

 

# LTM / LTR   實體/ 處理函數調用/ 狀態機

 

實體:  MEP DOWN / MEP UP / MHF UP / MHF DOWN ;

               Linktrace Responder  : 負責接收LTM和發送LTR;   牽涉到函數爲ProcessLTM, enqueLTR/xmitOldestLTR ForwardLTM;

           MEP Linktrace Initiator:負責發送LTM和接收LTR; 牽涉到的函數有ProcessLTR() ,  xmitLTM() .

 

 

實體接收到LTM的處理過程:

 

1)    任意實體接收到LTM包都由 ProcessLTM 處理.   並由其決定是調用ForwardLTM 來轉發LTM包和/enqueLTR來回復LTR;

2)    先校驗包格式.  Dmac應該爲table-8-10; ttl !=0 ;

3)    Target mac = received mp's mac, 則認爲該LTM到達地點,  回覆LTR並丟棄LTM, 不對LTM再進行轉發.   ProcessLTM調用enqueLTR處理. enqueLTR負責製造LTR包根據收到的LTM,  並將需要發送的LTR包放入到隊列中(enqueue), nPendingLTRs +1.  當且僅當nPendingLTRs !=0,  觸發 xmitOldestLTR 發送LTR. ( 爲什麼爲Oldest? 因爲該隊列爲FIFO.);  

4)    Target mac != received mp' mac. 則對LTM包進行Forward.    ProcessLTM調用ForwardLTM 重組一個LTM( 包括將TTL-1; 修改Source macmp's mac. )並轉發.   在轉發LTM的時,如何選擇出端口? 

5)   LTM包出端口的選擇.     首先使用LTM包中的vid target mac( not dmac) mac-address table中查找Egress端口, 若沒有找到唯一出口, 則其次是要MIPDatebase來進行查找唯一出口.   如果LTM未找到唯一的Egress出口, LTM包被discard; ( 因爲有可能存在同一個mac地址被兩個端口同時學習 或者target mac 未被學習到的情況??. )

6)     被選中的Egress端口可能存在以下四種情況.   with UP MEP , with UP MHF, with Down MEP, with Down MHF,  without MEP or MIP; 

       with UP MHF:  若指定的egress端口中有up mhf存在, 先回復LTR(調用enqueLTR)ingress端口發出; 並確認是否Forward LTM, 如果Target mac != mp's mac, LTM從該Egress port發出;

       with UP MEP: 若指定的egress 端口上有up mep存在, 則只回復LTR(調用enqueLTR)ingress端口發出且丟棄LTM.

       剩下的3 with Down MEP, with Down MHF,  without MEP or MIP. 情況一樣(因爲從cpu發出的LTM包在經過Down MEP Down MEP時會被透傳), 則通知Ingress port 調用 enqueLTR 發送LTR; 

 

 總結:   

·     UP MEP/DOWN MEP UP MHF  active 方向上收到LTM,  無論其target mac是否等於自己的mac 都會回覆LTR,前提是能找到唯一的egress port,否則則丟棄; 但是UP MEPDown MEPdrop LTM,不會Forward LTM. 但是UP MHF 是否Forward LTM取決  target mac != received MP's MAC(不同則forward ) ;

·     DOWN MHF  mac不同時不會回覆LBR,  LBR則是由被選定的Egress端口的被遇到的MP發出.(with Down MEP, with Down MHF,  without MEP or MIP除外)

·      當一個LTMDUT的外部進入DUT內部後, 有沒有可能回覆兩個或者多個LBR.  多個MP回覆?

 

##

1) 當任意實體收到LTM包時,  回覆LTR和轉發LTM是兩個獨自的進程來處理. 可以理解爲兩個獨立的線路; 相互之間沒有必然的聯繫

2)   暫時可以理解爲所有的LTR包都從接收到LTM的口發送出去.  但是從該口收到的LTM包絕對不能從ingress口再轉發出去.

 

 

 

具體實例:

LTM is received by a Down MEP

  if target mac = received MP's MAC,  回覆LTR 並丟棄LTM;

  otherwise, 尋找egress port. 如果該端口未被stp block 且在同一個vlan.

  otherwise,  ingress port發送LBR, discard LTM;

 

 

 

LTM is received by a Down MHF or originated by an Up MEP

 

 

 

 

20.42 LTM Receiver procedures

The procedures local to the LTM Receiver state machine are:

a) ProcessLTM() (20.42.1);

b) clearPendingLTRs() (20.42.2);

c) ForwardLTM() (20.42.3); and

d) enqueLTR() (20.42.4).

 

20.41 Linktrace Responder variables

The following variables are local to the Linktrace Responder:

a) nPendingLTRs (20.41.1);

b) LTMreceived (20.41.2); and

c) LTMPDU (20.41.3).

 

 

 

20.39 MEP Linktrace Initiator receive procedures

The following procedure is local to the MEP Linktrace Initiator receive state machine:

a) ProcessLTR() (20.39.1).

 

20.37 MEP Linktrace Initiator procedures

The following procedure is local to the MEP Linktrace Initiator:

a) xmitLTM() (20.37.1).

 

20.39 MEP Linktrace Initiator receive procedures

The following procedure is local to the MEP Linktrace Initiator receive state machine:

a) ProcessLTR() (20.39.1).

 

#############################################################


dot1agCfmMepUpNotification
dot1agCfmMepDownNotification
dot1agConnectivityCheckConfigureFailNotification
dot1agConnectivityCheckLoopNotification
dot1agCrosscheckMEPUnknownNotification
dot1agCrosscheckMEPMissingNotification
dot1agCrosscheckMAUpNotification

 

1, dot1agCfmMepUpNotification
   //配置完成後即可收到 dot1agCfmMepUpNotification和dot1agCrosscheckMAUpNotification; 或也可參照 7 dot1agCrosscheckMAUpNotification;
con
no span
no b g
int vl 1
ip add 192.168.1.17 255.0.0.0
exit

int e 1/1-26
no sw br
no sw mu
no sw un
no sw gvrp
exit

snmp-server host 192.168.1.8 public ver 2c
snmp-server enable traps ethernet cfm cc
snmp-server enable traps ethernet cfm crosscheck

ethernet cfm enable
ethernet cfm domain index 1 name md1 level 1 mip-creation explicit
ma index 1 name ma1 vlan 1 mip-creation explicit
mep crosscheck mpid 4094 ma ma1
exit

int eth  1/11
ethernet cfm port-enable
ethernet cfm mep mpid 2 ma ma1


oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 4094 ma index 1    
oam remote 5 cfm enable       

exit

   

 

2, dot1agCfmMepDownNotification
     // 參考 6 dot1agCrosscheckMEPMissingNotification

 

3, dot1agConnectivityCheckConfigureFailNotification
   // cfg error, 使dut收到的ccm包中帶的mep id等於自身端口的mep id即可, 所以使用下面配置就能發出dot1agConnectivityCheckConfigureFailNotification

con
no span
no b g
int vl 1
ip add 192.168.1.17 255.0.0.0
exit

int e 1/1-26
no sw br
no sw mu
no sw un
no sw gvrp
exit

snmp-server host 192.168.1.8 public ver 2c
snmp-server enable traps ethernet cfm cc
snmp-server enable traps ethernet cfm crosscheck

ethernet cfm enable
ethernet cfm domain index 1 name md1 level 1 mip-creation explicit
ma index 1 name ma1 vlan 1 mip-creation explicit
exit

int eth  1/11
ethernet cfm port-enable
ethernet cfm mep mpid 4094 ma ma1

oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 4094 ma index 1    
oam remote 5 cfm enable       

exit

 

4, dot1agConnectivityCheckLoopNotification

  // 此trap爲收到自己發出的ccm時發送, 但是因爲RD在1528中加入安全規則,將source mac屬於自己端口mac的數據包丟失掉,所以數據包無法進入CFM 狀態機,無法發送此trap;

5, dot1agCrosscheckMEPUnknownNotification 
  //配置完成後即可收到 dot1agCrosscheckMEPUnknownNotification;

con
no span
no b g
int vl 1
ip add 192.168.1.17 255.0.0.0
exit

int e 1/1-26
no sw br
no sw mu
no sw un
no sw gvrp
exit

snmp-server host 192.168.1.8 public ver 2c
snmp-server enable traps ethernet cfm cc
snmp-server enable traps ethernet cfm crosscheck

ethernet cfm enable
ethernet cfm domain index 1 name md1 level 1 mip-creation explicit
ma index 1 name ma1 vlan 1 mip-creation explicit
mep crosscheck mpid 4094 ma ma1
exit

int eth  1/11
ethernet cfm port-enable
ethernet cfm mep mpid 2 ma ma1


oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 1 ma index 1 up     
oam remote 5 cfm enable       

exit


6, dot1agCrosscheckMEPMissingNotification
 // 配置完成後, 等待發出dot1agCfmMepUpNotification 和 dot1agCrosscheckMAUpNotification 後,拔掉CO和CPE間 VDSL port 11的線路, 即可看到 dot1agCrosscheckMEPMissingNotification和dot1agCfmMepDownNotification

con
no span
no b g
int vl 1
ip add 192.168.1.17 255.0.0.0
exit

int e 1/1-26
no sw br
no sw mu
no sw un
no sw gvrp
exit

snmp-server host 192.168.1.8 public ver 2c
snmp-server enable traps ethernet cfm cc
snmp-server enable traps ethernet cfm crosscheck

ethernet cfm enable
ethernet cfm domain index 1 name md1 level 1 mip-creation explicit
ma index 1 name ma1 vlan 1 mip-creation explicit
mep crosscheck mpid 4094 ma ma1
mep crosscheck mpid 4093 ma ma1
exit

int eth  1/11
ethernet cfm port-enable
ethernet cfm mep mpid 2 ma ma1

oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 4094 ma index 1    
oam remote 5 cfm enable       

exit


int eth 1/12
ethernet cfm port-enable
ethernet cfm mep mpid 3 ma ma1

oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 4093 ma index 1    
oam remote 5 cfm enable

ex

 

7, dot1agCrosscheckMAUpNotification
//配置完成後即可收到 dot1agCfmMepUpNotification和dot1agCrosscheckMAUpNotification

con
no span
no b g
int vl 1
ip add 192.168.1.17 255.0.0.0
exit

int e 1/1-26
no sw br
no sw mu
no sw un
no sw gvrp
exit

snmp-server host 192.168.1.8 public ver 2c
snmp-server enable traps ethernet cfm cc
snmp-server enable traps ethernet cfm crosscheck

ethernet cfm enable
ethernet cfm domain index 1 name md1 level 1 mip-creation explicit
ma index 1 name ma1 vlan 1 mip-creation explicit
mep crosscheck mpid 4094 ma ma1
mep crosscheck mpid 4093 ma ma1
exit

int eth  1/11
ethernet cfm port-enable
ethernet cfm mep mpid 2 ma ma1

oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 4094 ma index 1    
oam remote 5 cfm enable       

exit


int eth 1/12
ethernet cfm port-enable
ethernet cfm mep mpid 3 ma ma1

oam remote cfm enable       
oam remote cfm domain index 1 name md1 level 1     
oam remote cfm ma index 1 name ma1 md index 1 vlan 1 interval 4 
oam remote 5 cfm mep mepid 4093 ma index 1    
oam remote 5 cfm enable

ex
 

#########

 


ASV1528 's trap defintion,

Syntax Description 
                mep-up (option) Generates a trap when a new remote maintenance end point (MEP) has been discovered and learned by the device or when a change occurs in the port state of a previously discovered remote MEP.
 mep-down (option) Generates a trap when a device has lost connectivity with a remote MEP or when connectivity from a previously learned remote MEP is restored after interruption.
 config (option) Generates a trap when a CFM misconfiguration exists in the network
 loop (option) Generates a trap when a forwarding loop exists in the network.


Syntax Description

 mep-unknown
 (Optional) Generates a trap when an unexpected (unconfigured) MEP comes up. One trap is generated per remote MEP.
 mep-missing
 (Optional) Generates a trap when the cross-check enable timer expires and no CCMs were received from an expected (configured) MEP. One trap is generated per remote MEP.
 ma-up
 (Optional) Generates a trap when all remote MEPs belonging to a MA come up.

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章