How to sniffer Dummy VLAN on L2VPN ?

什么是dummy vlan?

由于EVC平台在入端口可以通过rewrite命令剥离VLAN tag,这样导致在PW中没有任何tag,在Type 4时会有问题,两边VLAN的QOS无法传递给对端,所以就有了这个所谓的dummy vlan,它不是一个真正的VLAN,他只是传递一些QOS字段并且占一个位。那么dummy VLAN长什么样?其实大鹏之前的文章里已经详细介绍了EVC的各种行为,我这里只是介绍抓dummy VLAN的“心路历程”以及dummy VLAN的“样子”~

测试Topology:

起始测试环境为VPLS BGP auto discovery + LDP Sig,在76的入向抓包
dummy-vlan-topology

测试步骤

1. 默认Type 5,在CE1 ping 带cos 5,ASR9k-1在AC上不配置rewrite,透传的VLAN是否带着802.1p?根据抓包信息,正常带着802.1p,详细看“bgp-ldp-vlan-cos5.pcapng”;另外有个疑问,既然type 5支持VLAN透传,为什么还要Type 4?答案请看文章结束部分

dummy-vlan-01
2. 通过下面方式,把VPLS从Type 5 改成Type 4,抓包确认802.1p

l2vpn
 bridge group 
  bridge-domain 
   transport-mode vlan passthrough

在不配置rewrite时,跟Type 5一样,没有添加dummy VLAN,详细看“bgp-ldp-vlan-cos5-type4.pcapng”
dummy-vlan-02
3. 加上rewrite,看能否看到这个dummy vlan
根据抓包信息,也不行,仍然没有dummy vlan,详细看”bgp-ldp-vlan-cos5-type4-rewrite.pcapng”,不是说加了rewrite和Type 4,就会加上dummy VLAN tag么?结果为什么没有?
dummy-vlan-03
4. 经过查找,发现自己忽略了一个问题,这个问题我以前总结过。。。看来什么不用都会忘记呀:
http://www.zhaocs.info/asr9k-me3750-pw.html

In case of Type 4 pseudowire (Ethernet VLAN), if you strip off the tag with rewrite you’ll
be left without any tags. To facilitate this we add so-called ‘dummy tag‘.
‘transport-mode vlan passthrough‘ is special version of Type 4 PW, which doesn’t insert dummy tag. So, in this case in order to keep original dot1q tag, we should not use ‘rewrite’ command.

5. 好吧,加了passthrough的Type 4比较特殊,配置后是不会加dummy VLAN的,那不加passthrough试试?!另外听说martini的可以,那就先试试martini的吧,很遗憾,改成martini后,尝试下还是不行,没有dummy VLAN:

RP/0/RSP0/CPU0:ASR9001-1(config-if)#do sh run l2vpn
Mon Dec  2 11:53:22.423 UTC
l2vpn
 router-id 1.1.1.1
 bridge group test
  bridge-domain vpls1
   transport-mode vlan passthrough
   interface GigabitEthernet0/0/0/0.20
   !
   vfi test-v
    neighbor 3.3.3.3 pw-id 100
    !
   !
  !

6. 不加“passthrough”试试,root cause跳出来了。。。其实文档里有写的,只是没仔细看
VPLS只支持passthrough的Type 4,所以在IOX VPLS的场景下,是不会加这个dummy VLAN tag的

RP/0/RSP0/CPU0:ASR9001-1(config-l2vpn-bg-bd-vfi-pw)#show configuration 
Mon Dec  2 11:56:14.071 UTC
Building configuration...
!! IOS XR Configuration 5.1.0
l2vpn
 pw-class test
  encapsulation mpls
   transport-mode vlan
  !
 !
 bridge group test
  bridge-domain vpls1
   no transport-mode
   vfi test-v
    neighbor 3.3.3.3 pw-id 100
     pw-class test
    !
   !
  !
 !
!
end

RP/0/RSP0/CPU0:ASR9001-1(config-l2vpn-bg-bd-vfi-pw)#commit
Mon Dec  2 11:56:16.766 UTC

% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed' from this session to view the errors
RP/0/RSP0/CPU0:ASR9001-1(config-l2vpn-bg-bd-vfi-pw)#show configuration failed 
Mon Dec  2 11:56:20.391 UTC
!! SEMANTIC ERRORS: This configuration was rejected by 
!! the system due to semantic errors. The individual 
!! errors with each failed configuration command can be 
!! found below.

l2vpn
 bridge group test
  bridge-domain vpls1
   vfi test-v
    neighbor 3.3.3.3 pw-id 100
     pw-class test
!!% Invalid argument: Only ethernet/vlan passthrough transport mode is supported in VPLS
    !
   !
  !
 !
!

继续抓包

由于时间关系,当时没有改成EoMPLS,所以暂时放弃了,以上实验发生在2013-12-2日
时间匆匆,一转眼到了2014-12-25日,这回正好处理9k L2vpn load balance的问题,乱序可以通过CW(control word)来解决,那么如果有dummy VLAN是不是也可以解决?没有见过dummy VLAN的包,所以毕竟不知道dummy VLAN到底插在什么位置,既然是路由器自己加的,是否可以插在2层头前,最底层label的后面,那么就可以代替CW解决乱序了?想知道!

看来是躲不了了,继续寻找dummy VLAN,拓扑结构类似,地址都一样,只不过设备和端口变了,起始测试环境为EoMPLS+Type 5,两边VLAN不一致,9k-1是VLAN20,9k-2是VLAN10,抓包在9k-1的出口。配好FAT label和CW,抓包,发现能抓到 FAT label和CW(话说label多了看着比较爽呀,如果再加几个VLAN,那么就更好看了~嘿嘿),但仍然没有Dummy VLAN,因为VPLS默认是Type 5,详细配置看“eompls-config.cfg”,详细抓包看“eompls-fat-cw.pcapng”
dummy-vlan-04

    Flow Label flags configured (Tx=1,Rx=1), negotiated (Tx=1,Rx=1) <<<
    PW Status TLV in use
      MPLS         Local                          Remote                        
      ------------ ------------------------------ -----------------------------
      Label        16013                          16012                         
      Group ID     0xe000100                      0x10000600                    
      Interface    TenGigE0/5/0/1.20              TenGigE0/6/1/1.1              
      MTU          1500                           1500                          
      Control word enabled                        enabled   <<<                  
      PW type      Ethernet                       Ethernet  <<<                 
      VCCV CV type 0x2                            0x2                           
                   (LSP ping verification)        (LSP ping verification)       
      VCCV CC type 0x7                            0x7                           
                   (control word)                 (control word)                
                   (router alert label)           (router alert label)          
                   (TTL expiry)                   (TTL expiry)                  
      ------------ ------------------------------ -----------------------------

7. 改Type 4,在pw-class里加如下信息,重新建立,清CE ARP,抓包,ping测试,不同tos ping~~哦了,这回终于抓到了dummy VLAN!可惜的是这个VLAN不在L2 Header和底层Label之间,而是跟原始VLAN同一个地方,所以不能解决乱序问题,但dummy VLAN会传递优先级,详细看“eompls-fat-cw-dummy.pcapng”
dummy-vlan-05
展开图:
dummy-vlan-07

l2vpn
 pw-class CW
  encapsulation mpls
   transport-mode vlan <<<
  !
 !
!
RP/0/RSP0/CPU0:ASR9010-1#sh l2vpn xconnect detail 
Wed Dec 24 12:44:45.275 UTC

Group VLAN20, XC V20, state is up; Interworking none
  AC: TenGigE0/5/0/1.20, state is up
    Type VLAN; Num Ranges: 1
    VLAN ranges: [20, 20]
    MTU 1500; XC ID 0x1c40002; interworking none
    Statistics:
      packets: received 45, sent 43
      bytes: received 5020, sent 4750
      drops: illegal VLAN 0, illegal length 0
  PW: neighbor 3.3.3.3, PW ID 1, state is up ( established )
    PW class CW, XC ID 0xc0000003
    Encapsulation MPLS, protocol LDP
    Source address 1.1.1.1
    PW type Ethernet VLAN, control word enabled, interworking none
    PW backup disable delay 0 sec
    Sequencing not set
    Flow Label flags configured (Tx=1,Rx=1), negotiated (Tx=1,Rx=1)

    PW Status TLV in use
      MPLS         Local                          Remote                        
      ------------ ------------------------------ -----------------------------
      Label        16013                          16012                         
      Group ID     0xe000100                      0x10000600                    
      Interface    TenGigE0/5/0/1.20              TenGigE0/6/1/1.1              
      MTU          1500                           1500                          
      Control word enabled                        enabled                       
      PW type      Ethernet VLAN                  Ethernet VLAN   <<<              
      VCCV CV type 0x2                            0x2                           
                   (LSP ping verification)        (LSP ping verification)       
      VCCV CC type 0x7                            0x7                           
                   (control word)                 (control word)                
                   (router alert label)           (router alert label)          
                   (TTL expiry)                   (TTL expiry)                  
      ------------ ------------------------------ -----------------------------
    Incoming Status (PW Status TLV):
      Status code: 0x0 (Up) in Notification message
    Outgoing Status (PW Status TLV):
      Status code: 0x0 (Up) in Notification message
    MIB cpwVcIndex: 3221225475
    Create time: 24/12/2014 12:42:15 (00:02:28 ago)
    Last time status changed: 24/12/2014 12:43:20 (00:01:23 ago)
    Statistics:
      packets: received 43, sent 45
      bytes: received 4750, sent 5020

8. 为了验证传递优先级,在9k-2的出口ten0/6/1/1.1抓包,看看是否已经转换成VLAN10,并携带正确的优先级,详细看抓包文件“eompls-9k-2-out-vlan-pri.pcapng”
dummy-vlan-06
9. Ok,终于做完了,不过还有两个小问题,dummy VLAN传递802.1p,使两端的QOS完整,那么在IOX的VPLS中,不支持dummy VLAN,那如何保证客户自己的QOS属性?其实很简单,直接用rewrite 1to1置换就可以了;还有一个问题,就是在刚测试时提到的,既然Type 4和 Type 5都支持传递VLAN,为什么还需要Type 4?因为Type 5只能在两端VLAN相同的情况下工作,但实际不可能保证两端VLAN一致,所以肯定需要rewrite,那么这时只能通过Type 4来传递VLAN了

 

2015-11-30 更新,各平台下默认VC Type:

Type of Service

CRS-1 VC Type

C12000 VC Type

76000 VC Type

ASR9000 VC Type

VPWS—Port mode

Type 5

Type 5

Type 5

Type 5

VPWS—Vlan mode

Type 4

Type 4

Type 5

Type 5

VPLS—Port mode

Type 5

Type 5

Type 5

Type 5

VPLS—Vlan mode

Type 5

Type 5

Type 5

Type 5

本文出自 Frank's Blog

版权声明:


本文链接:How to sniffer Dummy VLAN on L2VPN ?
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接
你可以留言,或者trackback 从你的网站

No Responses to “How to sniffer Dummy VLAN on L2VPN ?”

  1. ASR 9K说道:

    麻烦请问下,在ASR 9K上默认是TYPE 5 指的是这条命令吗“transport-mode ethernet ”,若是76上开启了service instance 默认是TYPE5 还是 TYPE 4。还有TYPE 5作用在哪里?
    非常感谢!!!!!!!!!

  2. ASR 9K说道:

    MPLS VC type is Eth VLAN,以上这句话我是在76上看到的,是type4还是5啊?

  3. frank说道:

    76跟9k一样,默认都是type 5,我更新了各个平台默认VC的type,如果没有特殊需求,用type5就行了

留言哦

blonde teen swallows load.xxx videos