1. 程式人生 > >MPLS 除錯筆記(一)

MPLS 除錯筆記(一)

標籤 PUSH ,檢視相關表項狀態

(ETH---> MPLS)

BCM.0> dump VLAN_XLATE

VLAN_XLATE.ipipe0[304]: <VLAN_ID=0x15,VALID=1,TGID=0xb,TAG_ACTION_PROFILE_PTR=0,T=0,SOURCE_VP=1,RPE=0,PRI=0,PORT_NUM=0xb,OVID=0x15,OTAG                                                              =0x15,OLD_VLAN_ID=0x15,NEW_VLAN_ID=0,NEW_OVID=0,NEW_IVID=0,MPLS_ACTION=1

,MODULE_ID=0,L3_IIF=1,KEY_ZERO_1=0,KEY_TYPE=4,KEY=0x5400b,IVID=                                                              0,ITAG=0x15,INCOMING_VIDS=0x15,GLP=0xb,EVEN_PARITY=1,DUMMY=1,DISABLE_VLAN_CHECKS=1,DATA=0x10000005>

BCM.0>

BCM.0>

BCM.0> dump SOURCE_VP 1

SOURCE_VP.ipipe0[1]: <VFI=2,USE_INNER_PRI=0,TRUST_OUTER_DOT1P=0,TRUST_DOT1P_PTR=0,TPID_ENABLE=0,SRC_PORT=0xb

,SRC_MODID=0,SD_TAG_VFI_ENA                                                              NTRY_TYPE=2,DVP=2,CML_FLAGS_NEW=0,CML_FLAGS_MOVE=0,CLASS_ID=0>

BCM.0>

BCM.0> dump ING_DVP_TABLE 2

ING_DVP_TABLE.ipipe0[2]: <NEXT_HOP_INDEX=4>

BCM.0> dump ING_L3_next_hop 4

ING_L3_NEXT_HOP.ipipe0[4]: <VLAN_ID=0xfff,TGID=0xc,

T=0,PORT_NUM=0xc,MTU_SIZE=0x3fff,MODULE_ID=0,L3_OIF=0x1fff,EVEN_PARITY=1,ENTRY_TYPE=                                                              2,ENTRY_INFO_UPPER=3,DVP_RES_INFO=0x7f,DROP=0,COPY_TO_CPU=0>

BCM.0> dump EGR_L3_NEXT_HOP 4

EGR_L3_NEXT_HOP.epipe0[4]: <MPLS:VC_AND_SWAP_INDEX=1,MPLS:UUC_DROP=0,MPLS:UMC_DROP=0,MPLS:RESERVED_2=0,MPLS:RESERVED_1=0,MPLS:PW_INIT_N                                                              UM=1,MPLS:MAC_DA_PROFILE_INDEX=0,MPLS:INTF_NUM=2,MPLS:HG_MODIFY_ENABLE=0,MPLS:HG_MC_DST_PORT_NUM=0,MPLS:HG_MC_DST_MODID=0,MPLS:HG_LEARN                                                              _OVERRIDE=1,MPLS:HG_L3_OVERRIDE=0,MPLS:HG_HDR_SEL=1,MPLS:HG_ADD_SYS_RSVD_VID=0,MPLS:DVP_IS_NETWORK_PORT=1,MPLS:DVP=2,MPLS:BC_DROP=0,EVE                                                        N_PARITY=1,ENTRY_TYPE=1,>

BCM.0> dump EGR_MAC_DA_PROFILE 0

EGR_MAC_DA_PROFILE.epipe0[0]: <MAC_ADDRESS=2>

BCM.0> dump EGR_MPLS_VC_AND_SWAP_LABEL_TABLE 1

EGR_MPLS_VC_AND_SWAP_LABEL_TABLE.epipe0[1]: <UPDATE_PW_INIT_COUNTERS=1,SD_TAG_VID=0,SD_TAG_TPID_INDEX=0,SD_TAG_NEW_PRI=0,SD_TAG_NEW_CFI                                                              =0,SD_TAG_DOT1P_PRI_SELECT=0,SD_TAG_DOT1P_MAPPING_PTR=0,SD_TAG_ACTION_IF_PRESENT=0,SD_TAG_ACTION_IF_NOT_PRESENT=0,NEW_PRI=0,NEW_CFI=0,M                                                              PLS_TTL=0x10,MPLS_LABEL_ACTION=1,MPLS_LABEL=0x666,MPLS_EXP_SELECT=0,MPLS_EXP_MAPPING_PTR=0,MPLS_EXP=0,EVEN_PARITY=1,CW_INSERT_FLAG=0>

BCM.0> dump EGR_L3_INTF 2

EGR_L3_INTF.epipe0[2]: <VID=0x17,TUNNEL_INDEX=1,TTL_THRESHOLD=0,RESERVED=0,OVID=0x17,MPLS_TUNNEL_INDEX=4,MAC_ADDRESS=0x1616,L2_SWITCH=0,IVID_VALID=0,IVID=0,EVEN_PARITY=1>

BCM.0>

BCM.0> dump EGR_IP_TUNNEL_MPLS 4  ????沒看到通道標籤

EGR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MPLS_LABEL_2=0,MPLS_LABEL_1=0,MPLS_LABEL_0=0x555,MPLS_EXP_SELECT_3=0,MPLS_EXP_SELECT_2=0,MPLS_EXP_SELECT_1=0,MPLS_EXP_SELECT_0=2,MPLS_EXP_MAPPING_PTR_3=0,MPLS_EXP_MAPPING_PTR_2=0,MPLS_EXP_MAPPING_PTR_1=0,MPLS_EXP_MAPPING_PTR_0=0,MPLS_EXP_3=0,MPLS_EXP_2=0,MPLS_EXP_1=0,MPLS_EXP_0=0,MPLS_ENTRY_3=0,MPLS_ENTRY_2=0,MPLS_ENTRY_1=0,MPLS_ENTRY_0=0x1000900555,EVEN_PARITY=1,ENTRY_TYPE=3>

mpls報文-------->>>>>>>>>>>>>>以太報文

標籤 Pop ,檢視相關表項狀態

0x888 和0x777分別為輸入通道標籤和VC標籤

各個表的狀態

BCM.0> dump MPLS_ENTRY

MPLS_ENTRY.ipipe0[2536]: <VINTF_CTR_IDX=0x1001,VALID=1,V6_ENABLE=1,V4_ENABLE=1,USE_VINTF_CTR_IDX=0,TRUST_OUTER_DOT1P_PTR=0x3e,TGID=0,T=0,SOURCE_VP=0,RESE                         RVED_0=0,PW_TERM_NUM_VALID=1,PW_TERM_NUM=1,PORT_NUM=0,NEXT_HOP_INDEX=0,NEW_PRI=0,MPLS_LABEL=0x888,MPLS_ACTION_IF_NOT_BOS=1(POP),MPLS_ACTION_IF_BOS=2(L3 VPN&lookup l3_iif valid               ),MODULE_ID                         =0,L3_IIF=0,KEY_TYPE=0,KEY=0x2220000,EXP_MAPPING_PTR=0,EVEN_PARITY=0,ECMP_PTR=0,DECAP_USE_TTL=1,DECAP_USE_EXP_FOR_PRI=0,DECAP_USE_EXP_FOR_INNER=0,DATA=0x                         800fc0000008a,CW_CHECK_CTRL=0>

【沒有根據這個表索引任何東西】

MPLS_ENTRY.ipipe0[3576]: <VINTF_CTR_IDX=0x1000,VALID=1,V6_ENABLE=1,V4_ENABLE=1,USE_VINTF_CTR_IDX=0,TRUST_OUTER_DOT1P_PTR=0x3e,TGID=0,T=0,SOURCE_VP=2,RESE                         RVED_0=0,PW_TERM_NUM_VALID=1,PW_TERM_NUM=0,PORT_NUM=0,NEXT_HOP_INDEX=2,NEW_PRI=0,MPLS_LABEL=0x777,MPLS_ACTION_IF_NOT_BOS=0,MPLS_ACTION_IF_BOS=1,MODULE_ID                         =0,L3_IIF=2,KEY_TYPE=0,KEY=0x1ddc000,EXP_MAPPING_PTR=0,EVEN_PARITY=0,ECMP_PTR=2,DECAP_USE_TTL=0,DECAP_USE_EXP_FOR_PRI=0,DECAP_USE_EXP_FOR_INNER=0,DATA=0x                         8007c00100001,CW_CHECK_CTRL=0>

BCM.0> dump SOURCE_VP  2

SOURCE_VP.ipipe0[2]: <VFI=1,USE_INNER_PRI=0,TRUST_OUTER_DOT1P=0,TRUST_DOT1P_PTR=0,TPID_ENABLE=0,SRC_PORT=0xc,SRC_MODID=0,SD_TAG_VFI_ENABLE=0,SD_TAG_MODE=0,RESERVED0=0,NETWORK_PORT=1,EVEN_PARITY=1,ENTRY_TYPE=2,DVP=1,CML_FLAGS_NEW=0,CML_FLAGS_MOVE=0,CLASS_ID=0>

BCM.0>

BCM.0>

BCM.0>

BCM.0>

BCM.0> dump  ING_DVP_TABLE 1

ING_DVP_TABLE.ipipe0[1]: <NEXT_HOP_INDEX=3>

BCM.0>

BCM.0>

BCM.0> dump ING_L3_NEXT_HOP 3

ING_L3_NEXT_HOP.ipipe0[3]: <VLAN_ID=0xfff,TGID=0xb,T=0,PORT_NUM=0xb,MTU_SIZE=0x3fff,MODULE_ID=0,L3_OIF=0x1fff,EVEN_PARITY=0,ENTRY_TYPE=2,ENTRY_INFO_UPPER=3,DVP_RES_INFO=0x7f,DROP=0,COPY_TO_CPU=0>

BCM.0>

BCM.0>

BCM.0>

BCM.0>

BCM.0> dump EGR_L3_NEXT_HOP 3

EGR_L3_NEXT_HOP.epipe0[3]: <SD_TAG_VID=0,SD_TAG_TPID_INDEX=0,SD_TAG_ACTION_IF_PRESENT=0,SD_TAG_ACTION_IF_NOT_PRESENT=0,SD_TAG:UUC_DROP=0,SD_TAG:UMC_DROP=0,SD_TAG:SD_TAG_VID=0,SD_TAG:SD_TAG_TPID_INDEX=0,SD_TAG:SD_TAG_DOT1P_PRI_SELECT=0,SD_TAG:SD_TAG_DOT1P_MAPPING_PTR=0,SD_TAG:SD_TAG_ACTION_IF_PRESENT=0,SD_TAG:SD_TAG_ACTION_IF_NOT_PRESENT=0,SD_TAG:RESERVED_3=0,SD_TAG:RESERVED_2=0,SD_TAG:RESERVED_1=0,SD_TAG:RESERVED=0,SD_TAG:NEW_PRI=0,SD_TAG:NEW_CFI=0,SD_TAG:HG_MODIFY_ENABLE=0,SD_TAG:HG_MC_DST_PORT_NUM=0,SD_TAG:HG_MC_DST_MODID=0,SD_TAG:HG_LEARN_OVERRIDE=1,SD_TAG:HG_L3_OVERRIDE=0,SD_TAG:HG_HDR_SEL=1,SD_TAG:HG_ADD_SYS_RSVD_VID=0,SD_TAG:DVP_IS_NETWORK_PORT=0,SD_TAG:DVP=1,SD_TAG:BC_DROP=0,EVEN_PARITY=0,ENTRY_TYPE=2,>

 標籤SWAP,查看錶項狀態

檢視MPLS 相關表的狀態(函式執行成功後)

BCM.0> dump MPLS_ENTRY

MPLS_ENTRY.ipipe0[976]: <VINTF_CTR_IDX=0x1000,VALID=1,V6_ENABLE=1,V4_ENABLE=1,USE_VINTF_CTR_IDX=0,TRUST_OUTER_DOT1P_PTR=0x3e,TGID=0,T=0,SOURCE_VP=3,RESERVED_0=0,PW_TERM_NUM_VALID=1,PW_TERM_NUM=0,PORT_NUM=0,NEXT_HOP_INDEX=3,NEW_PRI=0,MPLS_LABEL=0x12345,MPLS_ACTION_IF_NOT_BOS=3,MPLS_ACTION_IF_BOS=3(這裡兩個3是非常好理解的,swap ),MODULE_ID=0,L3_IIF=3,KEY_TYPE=0,KEY=0x48d14000,EXP_MAPPING_PTR=0,EVEN_PARITY=1,ECMP_PTR=3,DECAP_USE_TTL=1,DECAP_USE_EXP_FOR_PRI=0,DECAP_USE_EXP_FOR_INNER=0,DATA=0x8007c0018009b,CW_CHECK_CTRL=0>

BCM.0>

注意這裡Entry只有一個,只有通道標籤的Entry,這裡很好的消除了我之前的疑問,PW是沒有entry 的,手冊上也只有一個Entry

BCM.0> dump ING_L3_NEXT_HOP 3

ING_L3_NEXT_HOP.ipipe0[3]: <VLAN_ID=0x17,TGID=0xc,T=0,PORT_NUM=0xc,MTU_SIZE=0x17(??????這個size ),MODULE_ID=0,L3_OIF=0x17,EVEN_PARITY=1,ENTRY_TYPE=1,ENTRY_INFO_UPPER=0,DVP_RES_INFO=0x17,DROP=0,COPY_TO_CPU=0>

BCM.0> dump EGR_L3_NEXT_HOP 3

EGR_L3_NEXT_HOP.epipe0[3]: <MPLS:VC_AND_SWAP_INDEX=0x801,MPLS:UUC_DROP=0,MPLS:UMC_DROP=0,MPLS:RESERVED_2=0,MPLS:RESERVED_1=0,MPLS:PW_INIT_NUM=1,MPLS:MAC_DA_PROFILE_INDEX=1,MPLS:INTF_NUM=3,MPLS:HG_MODIFY_ENABLE=1,MPLS:HG_MC_DST_PORT_NUM=0,MPLS:HG_MC_DST_MODID=0,MPLS:HG_LEARN_OVERRIDE=0,MPLS:HG_L3_OVERRIDE=1,MPLS:HG_HDR_SEL=0,MPLS:HG_ADD_SYS_RSVD_VID=0,MPLS:DVP_IS_NETWORK_PORT=0,MPLS:DVP=0,MPLS:BC_DROP=0,EVEN_PARITY=0,ENTRY_TYPE=1,>

BCM.0> dump EGR_MAC_DA_PROFILE 1

EGR_MAC_DA_PROFILE.epipe0[1]: <MAC_ADDRESS=3> 【目的MAC地址】

BCM.0> dump EGR_MPLS_VC_AND_SWAP_LABEL_TABLE 0x801

EGR_MPLS_VC_AND_SWAP_LABEL_TABLE.epipe0[2049]: <UPDATE_PW_INIT_COUNTERS=0,SD_TAG_VID=0,SD_TAG_TPID_INDEX=0,SD_TAG_NEW_PRI=0,SD_TAG_NEW_CFI=0,SD_TAG_DOT1P_PRI_SELECT=0,SD_TAG_DOT1P_MAPPING_PTR=0,SD_TAG_ACTION_IF_PRESENT=0,SD_TAG_ACTION_IF_NOT_PRESENT=0,NEW_PRI=0,NEW_CFI=0,MPLS_TTL=0(?????????),MPLS_LABEL_ACTION=2,MPLS_LABEL=0xabcde,MPLS_EXP_SELECT=0,MPLS_EXP_MAPPING_PTR=0,MPLS_EXP=0,EVEN_PARITY=0,CW_INSERT_FLAG=0>

BCM.0>

BCM.0>

BCM.0> dump EGR_L3_INTF 3

EGR_L3_INTF.epipe0[3]: <VID=0x17,TUNNEL_INDEX=1,TTL_THRESHOLD=0,RESERVED=0,OVID=0x17,MPLS_TUNNEL_INDEX=4,MAC_ADDRESS=0x21

[源MAC地址],L2_SWITCH=0,IVID_VALID=0,IVID=0,EVEN_PARITY=1>

本地MAC,目的VLAN