l2vpn在不配置rewrite时,跟Type 5一样,没有添加dummy VLAN,详细看“bgp-ldp-vlan-cos5-type4.pcapng”
bridge group
bridge-domain
transport-mode vlan passthrough
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.
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
!
!
!
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 <<<
!
!
!
!
!
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)
------------ ------------------------------ -----------------------------
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
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 |