Basic's of L2VPN and Its Features
Basic's of L2VPN and Its Features
Basic's of L2VPN and Its Features
Pavan Chaudhari
CCIE 37281
1. Session I
Layer 2 VPN Motivation and Overview
VPWS Reference Model
2. Session II
VPLS Reference Model
PE Auto-Discovery
3. Session III
H-VPLS
VPLS Multihoming
AGENDA
Advanced Topics - FAT
eVPN
4. Session IV
Migration from VPWS to eVPN
Migration from VPLS to eVPN
eVPN-Vxlan
Key Takeaway from the session-I ( L2VPN )
L2VPN –
Extending the L2 Broadcast domain across the IP or MPLS network.
EFP –
interface TenGigE0/0/0/16.100 l2transport
encapsulation <default/dort1q/untagged>
dot1q - single vlan -- multiple vlan , exact , secondary-vlan
Vlan-range -- multiple vlan , exact , secondary-vlan
rewrite ingress tag <pop/push/translate> <vlan-numbers> symmetric
VPWS/AToM/EoMPLS/E-LINE -
No MAC address learning performed on PE router.
Ethernet Pusedowire – Ethernet port based ( type-5 ) /vlan-based ( type-4)
Bydefault PW-Type is Ethernet.
If you are defining MTU manually on pseudowire take mtu difference between IOS and IOS-XR into consideration.
IOS - mtu is IPHeader + data ( default is 1500 )
IOS-XR – mtu is Ethernet-Header + IPHeader + data ( default is 1514 )
CDP :- # IOS-XE to pass CDP/STP frames
Router(config)#interface gigabitEthernet 1
Router(config-if)#service instance 1 ethernet
Router(config-if-srv)#l2protocol forward ?
cdp Cisco Discovery Protocol
dot1x Dot1x Protocol
dtp Dynamic Trunking Protocol
elmi ELMI Protocol
esmc ESMC Protocol
lacp LACP Protocol
lldp Link Layer Discovery Protocol
pagp Port Aggregation Protocol
ptppd PTP Peer Delay Protocol
stp Spanning Tree Protocol
udld UDLD Protocol
vtp Vlan Trunking Protocol
<cr> <cr>
CDP :- # IOS-XR to pass CDP/STP frames
https://www.cisco.com/c/en/us/support/docs/routers/asr-9000-series-aggregation-services-
routers/116453-technote-ios-xr-l2vpn-00.html#anc27
interface TenGigE0/1/1/2
cdp
!
interface TenGigE0/1/1/2.100
ipv4 address 162.1.1.2 255.255.255.0
encapsulation dot1q 100
!
MULTIPOINT
SERVICES
© 2010 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
Multipoint Service :-
With only two interfaces in a point-to-point cross connect, an L2VPN switch takes everything received on
side and forwards it on the other side.
When there are more than two interfaces in a bridge-domain, an Ethernet switch has to make a switching
decision in order to determine where to forward frames based on their destination MAC address. The switch
does MAC learning based on the source MAC address of the frames that it receives and builds a
mac-address-table.
A bridge-domain is basically one broadcast domain where broadcasts and multicast frames are flooded. One
mac-address-table is associated with each bridge-domain (unless MAC learning is disabled manually by
configuration, which is very rare). This usually corresponds to one IPv4 or IPv6 subnet where all hosts in the
bridge-domain are directly connected.
BRIDGE DOMAIN :- WHAT IS BD ?
Router will act as a switch and will pass BUM traffic to all
interface and pass known Unicast to port from where he
learned MAC address
LOCAL SWITCHING USING BRIDGE DOMAIN
interface GigabitEthernet0/1/0/38.2 l2transport interface GigabitEthernet0/1/0/3.2 l2transport
encapsulation dot1q 2 encapsulation dot1q 2
rewrite ingress tag pop 1 symmetric PE1 rewrite ingress tag pop 1 symmetric
G0/1/0/39.2 G0/1/0/38.2 G0/1/0/3.2 G0/1.2
R2 10.1.1.2 /24 R3
10.1.1.1 /24
R1
Te0/2/0/4.2
The MAC learning is executed in hardware by the linecards each time a frame is received in the bridge-domain.
There is also a software cache of the mac-address-table, but this software table cannot be updated continuously in
order to match the hardware entries. When the show command is entered in recent code, it tries to resynchronize
the software table with the hardware table. After a maximum of 15 seconds, it prints the current state of the software
mac-address-table, even if the resynchronization is not complete (for example, if the table is large). Use the l2vpn
resynchronize forwarding mac-address-table command in order to resynchronize the software and
hardware tables manually.
Count /Block packet using L3-ACL/L2-ACL on Attachment ckt :-
1. If customer complains about specific service not working over the L2VPN then we
can either configure L2 or L3 ACL to match customer IP/MAC.
2. If we need to block any particular packet from reaching out to remote side.
E.g one site is running PVST and other site is running MST. Using ACL I can
block the BPDU’s on attachment ckt/EFP.
Count packet using L3 ACL on Attachment ckt :-
If customer complains about specific customer then we can either configure L2 or L3
ACL to match customer IP/MAC.
interface GigabitEthernet0/1/0/38.2 l2transport
ipv4 access-list L2VPN-TEST
encapsulation dot1q 2
10 permit icmp host 10.1.1.1 host 10.1.1.2 echo
rewrite ingress tag pop 1 symmetric
20 permit icmp host 10.1.1.2 host 10.1.1.1 echo-reply
ipv4 access-group L2VPN-TEST ingress hardware-count
30 permit any any
ipv4 access-group L2VPN-TEST egress hardware-count
• With IRB, if the host want to go outside of the bridge domain, they can be L3 routed via BVI
interface to the other L3 interfaces.
BVI Key points to remember :-
• Only one BVI can be configured in any bridge domain.
The same BVI can not be configured in multiple bridge domains.
• A BVI is associated with a single bridge domain and represents the link between the bridging and
the routing domains on the router ( bridge between L2-domain and L3-domain ).
• A BVI follows traditional interface VLAN rules. It will not come up unless there is an active
attachment circuit in the same bridge domain that it is bound to.
!
!
Remote router :-
RP/0/RSP0/CPU0:router-5#ping 10.1.1.1
!!!!!
• All packets from a host on a bridged interface go to the BVI if the destination MAC address matches the BVI MAC address. Otherwise, the
packets are bridged.
QUIZ :-
Q-1 Do we support VLAN tagging on BVI interfaces ?
1. Yes
2. No
Q-2 which command is used to remove single the VLAN tag and passed the untagged
frame to BVI ?
© 2010 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
Virtual Private VLAN Service :- is a Layer 2 service that interconnects multiple sites
and emulates a LAN or VLAN across an MPLS or IP network.
VPLS provides the ability to combine bridge-domains at multiple sites into one large bridge-domain through
MPLS PWs using VFI.
VFI creates the bridging domain among all ACs and PWs. Packets received on one attachment circuit are
switched to other attachment circuits or PWs based on the destination MAC address.
When a packet is received on a PW, it has an MPLS label. The MPLS label is used to select the bridge domain
associated with the PW. The packet is forwarded to one of the attachment circuits depending on the destination
MAC address.
Note :- packet received on a PW is not forwarded back to another PW because split-horizon is enabled by default
on the VFI. The reason for this is that there is a full mesh PW between PE routers of an emulated LAN.
When a packet is received on a PW and the destination MAC address is not known, then
the packet is forwarded to all attachment circuits. The same is true if either a broadcast or
multicast packet is received on a PW.
Split horizon rule -- A full mesh of PWs is required in order to ensure that each host can receive traffic from all
other hosts. The consequence is that a VPLS PE does not forward a frame received on a VPLS PW over its
other VPLS PWs to avoid loop , because core MPLS is not running spanning-tree.
Split Horizon on VPLS – we need full mesh of pseudowires
frame is received from Core
• don’t forward back to core
• Forward it to edge or attachment ckt.
VPLS CONFIGURATION interface TenGigE0/0/0/16.100 l2transport
interface GigabitEthernet0/0/0/16.100 l2transport encapsulation dot1q 100
encapsulation dot1q 100 rewrite ingress tag pop 1 symmetric
rewrite ingress tag pop 1 symmetric
190.225.250.50 19.1.1.1
G0/1 Te 0/0/0/16.100
CE1 G0/0/0/16.100 MPLS G0/1 CE3
PE1 PE3
l2vpn
bridge group VPLS-TEST l2vpn
33.20.2.92 bridge group VPLS-TEST
bridge-domain L2VPN
interface GigabitEthernet0/0/0/16.100 bridge-domain L2VPN
PE2 interface TenGigE0/0/0/16.100
!
G 0/0/1/11.100 !
vfi L2VPN-VFI
neighbor 19.1.1.1 pw-id 999 vfi L2VPN-VFI
! neighbor 33.20.2.92 pw-id 999
neighbor 33.20.2.92 pw-id 999 CE2 !
neighbor 190.225.250.50 pw-id 999
l2vpn
bridge group VPLS-TEST
bridge-domain L2VPN
interface GigabitEthernet0/0/1/11.100 l2transport
interface GigabitEthernet0/0/1/11.100 encapsulation dot1q 100
! rewrite ingress tag pop 1 symmetric
vfi L2VPN-VFI
neighbor 19.1.1.1 pw-id 999
!
neighbor 190.225.250.50 pw-id 999
Once we commit the config we will see full mesh of pseudowire
RP/0/RSP0/CPU0:ASR9001-I#show l2vpn bridge-domain group VPLS-TEST brief
Mon Jul 10 11:13:31.660 EDT
Legend: pp = Partially Programmed.
Bridge Group:Bridge-Domain Name ID State Num ACs/up Num PWs/up
-------------------------------- ----- -------------- ------------ -------------
VPLS-TEST:L2VPN 5 up 1/1 2/2
1. For redundancy
2. For faster convergence
3. Due to split-horizon which is enabled by default on the VFI.
4. frame received on one pseudowire will never be forwarded to other pseudowires.
Sample VPLS Configuration :- IOS-XR , IOS-XE and Nexus
feature evc
feature mpls l2vpn
!
interface Ethernet2/1
# IOS-XE service instance 1 ethernet
encapsulation dot1q 100
#IOS-XR
!
interface GigabitEthernet 0/0/2 l2vpn vfi context foo
interface GigabitEthernet0/0/0/16.100 service instance 100 ethernet vpn id 100
l2transport
encapsulation dot1q 100
encapsulation dot1q 100 member Pseudowire12
! member Pseudowire13
rewrite ingress tag pop 1 symmetric
!
! l2vpn vfi context VPLS-A interface Pseudowire12
l2vpn vpn id 100 encapsulation mpls
bridge group VPLS-TEST member 1.1.1.1 encapsulation mpls neighbor 10.2.2.2 100
bridge-domain L2VPN
member 2.2.2.2 encapsulation mpls !
interface GigabitEthernet0/0/0/16.100
! interface Pseudowire13
!
encapsulation mpls
vfi L2VPN-VFI bridge-domain 100 neighbor 10.3.3.3 100
neighbor 1.1.1.1 pw-id 100 member vfi VPLS-A !
neighbor 2.2.2.2 pw-id 100
member GigabitEthernet0/0/2 service-instance 100 bridge-domain 100
! member vfi foo
member Ethernet2/1 service instance 1
VPLS AUTO-DISCOVERY
AND SIGNALING ( KOMPELA )
Autodiscovery and Signaling :-
When you add a new VPLS PE to the network, configure the PE in order to have a PW to all existing PEs in each of
its local bridge-domains. All existing PEs must then be reconfigured in order to have a PW to the new PE because
all PEs must be fully meshed. This might become an operational challenge as the number of Pseudowires and
bridge-domains increase.
One solution is to have PEs discover other PEs automatically through BGP.
Manual configuration changes add operational costs and increase the chance of network mis-configuration.
VPLS Auto Discovery eliminates the need to manually provision a VPLS neighbor. VPLS auto discovery
automatically detects when new PEs are added or removed from the VPLS domain.
In order to discover other PEs through BGP, each PE is configured for the vpls-vpws address-family and
advertises in BGP the bridge-domains in which they want to participate. Once the other PEs that are part of
the same bridge-domain are discovered, a PW is established to each of them. BGP is the protocol used for this
autodiscovery.
There are two options for the signaling of the PW to the autodiscovered PEs: BGP and LDP.
• There are two primary functions of the VPLS control plane:
VPLS Autodiscovery :- A means for a PE to learn which remote PEs are members of a
given bridge domain.
VPLS Signalling - A means for a PE to learn the pseudowire label expected by a given
remote PE for a given VPLS.
Both of these functions are accomplished with a single BGP Update advertisement in
case of BGP signaling.
BGP needs to distribute NLRI for the VPLS bridge domain with the PE as the BGP next-
hop and appropriate VE-ID.
Additionally, the VPLS is associated with one or more BGP export Route Targets (RTs)
that are also distributed (along with NLRI). VPLS SAFI NLRI uses AFI = 25 and SAFI =
65.
VPLS CONFIGURATION – BGP SIGNALING l2vpn
bridge group BG_100
router bgp 65000 bridge-domain BD_100
Vpn-id and the route-target are the same on the different PEs for each bridge-domain, but each PE has a
address-family l2vpn vpls-vpws interface Bundle-Ether100.100
unique Virtual Edge ID (VE-ID).
!
Each PE discovers the other PEs in the VPN through BGP and uses BGP to signal !the PWs.
neighbor x.x.x.x vfi VFI_100
update-source loopback0
interface Bundle-Ether100.100 l2transport vpn-id 100 #should be same
encapsulation dot1q 100 remote-as 65000 autodiscovery bgp
rewrite ingress tag pop 1 symmetric address-family l2vpn vpls-vpws rd 100:2
! route-target 100:100
signaling-protocol bgp
ve-id 1 # should be unique
!
RP/0/RSP0/CPU0:ASR9001-D#show bgp l2vpn vpls summary
BGP router identifier 10.37.30.29, local AS number 65000
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 51
BGP NSR Initial initsync version 32 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
10.0.0.1 10.0.0.3
G0/1 MPLS G0/1/0/3
CE1 G0/0/0/1 G0/1 CE3
PE1 PE3
l2vpn l2vpn
bridge group customer1 bridge group customer1
bridge-domain VLAN2 bridge-domain VLAN2
interface GigabitEthernet0/0/0/1.2 interface GigabitEthernet0/1/0/3.2
! !
vfi TAC vfi TAC
vpn-id 3 vpn-id 3
autodiscovery bgp autodiscovery bgp
rd auto rd auto
route-target 0.0.0.1:13 route-target 0.0.0.1:13
signaling-protocol ldp signaling-protocol ldp
vpls-id 65000:1 vpls-id 65000:3
! !
router bgp 65000 router bgp 65000
address-family l2vpn vpls-vpws address-family l2vpn vpls-vpws
! !
neighbor 10.0.0.3 neighbor 10.0.0.1
address-family l2vpn vpls-vpws address-family l2vpn vpls-vpws
A PE router advertises an identifier through BGP for each VPLS instance.
This identifier is unique within the VPLS instance and acts like a VPLS ID.
The identifier enables the PE router, receiving the BGP advertisement, to identify the VPLS associated
with the advertisement, and import it to the correct VPLS instance.
In this manner, for each VPLS, a PE router learns which other PE routers are members of the VPLS.
A full mesh of PWs means that the number of PWs might become very high as the number of PEs grows, so
this might introduce scalability issues.
Note :- split horizon will be disabled on pseudowire ( xconnect ) between N-PE and U-PE but if U-PE is
multihoming to N-PE’s then we need to enable the split horizon on U-PE.
H-VPLS :-
interface TengigE0/1/0/5.2 l2transport
H-VPLS (HIERARCHICAL-VPLS)
encapsulation dot1q 2
rewrite ingress tag pop 1 symmetric
10.0.0.15 10.0.0.2 10.0.0.16
10.0.0.1
MPLS
MPLS
CE1 U-PE1 MPLS U-PE2 CE3
N-PE1 N-PE2
l2vpn
l2vpn
xconnect group customer1
xconnect group customer1
p2p VLAN2
p2p VLAN2
interface TengigE0/1/0/5.2
interface TengigE0/0/0/0.2
neighbor 10.0.0.1 pw-id 15
neighbor 10.0.0.2 pw-id 16
l2vpn
bridge group customer1 l2vpn
bridge-domain VLAN2 bridge group customer1
neighbor 10.0.0.15 pw-id 15 bridge-domain VLAN2
vfi customer1-VLAN2 neighbor 10.0.0.16 pw-id 16
neighbor 10.0.0.2 pw-id 2 vfi customer1-VLAN2
neighbor 10.0.0.3 pw-id 2 neighbor 10.0.0.1 pw-id 2
neighbor 10.0.0.4 pw-id 2 neighbor 10.0.0.3 pw-id 2
neighbor 10.0.0.4 pw-id 2
H-VPLS (HIERARCHICAL-VPLS)
https://techzone.cisco.com/t5/ASR-9000/Whitepaper-for-VPLS-
Multihoming-solution-using-MC-LAG-on-ASR9k/ta-p/1593684
VPLS CONFIGURATION
router–bgp
BGP
65000 SIGNALING
l2vpn
bridge group BG_100
address-family l2vpn vpls-vpws
bridge-domain
Vpn-id and the route-target are the same on the different PEs for each bridge-domain, but each PEBD_100
has a
!
unique Virtual Edge ID (VE-ID). interface Bundle-Ether100.100
neighbor x.x.x.x
Each PE discovers the other PEs in the VPN through BGP and uses BGP to signal !the PWs.
update-source loopback0
vfi VFI_100
remote-as 65000
interface Bundle-Ether100.100 l2transport vpn-id 100 #should be same
encapsulation dot1q 100 address-family l2vpn vpls-vpws
autodiscovery bgp
rewrite ingress tag pop 1 symmetric !
rd 100:2
route-target 100:100
signaling-protocol bgp
ve-id 1 # should be unique
!
redundancy
iccp
group 100
mlacp node 1
mlacp system mac 0111.0111.0111
mlacp system priority 1
member
interface Bundle-Ether100 neighbor 159.159.159.2
ipv4 address 162.1.1.1 255.255.255.0 !
backbone
no shutdown interface GigabitEthernet0/0/0/10
!
!
!
CHALLENGES WITH VPLS CONFIGURATION
1) traffic loop for multihoming solution
2) duplicate traffic on multihoming CE-1 from remote-PE-3
3) forwarding table inconsistency on remote-PE(PE3) once received frame from PE1 and PE2.
VPLS ADVANCE
FEATURES
Features Enhancement
Traffic Storm Control :- In an L2 broadcast domain, there is the risk that a host might misbehave and send a
high rate of broadcast or multicast frames that must be flooded everywhere in the bridge-domain. Another risk is
creation of an L2 loop (that is not broken by spanning tree), which results in broadcasts and multicasts packets
looping. A high rate of broadcasts and multicasts packets impacts the performance of the hosts in the broadcast
domains.
Traffic storm control is not supported on a bundle AC interfaces or VFI PWs, but is supported on non-bundle ACs
and access PWs.
l2vpn
bridge group customer1
bridge-domain engineering
interface GigabitEthernet0/1/0/3.2
storm-control unknown-unicast pps 10000
storm-control multicast pps 10000
storm-control broadcast pps 1000
!
neighbor 10.0.0.15 pw-id 15
storm-control unknown-unicast pps 10000
storm-control multicast pps 10000
storm-control broadcast pps 1000
!
vfi customer1-engineering
neighbor 10.0.0.10 pw-id 2
!
neighbor 10.0.0.12 pw-id 2
!
RP/0/RSP0/CPU0:router2#sh l2vpn bridge-domain bd-name engineering det
Legend: pp = Partially Programmed.
Bridge group: customer1, bridge-domain: engineering, id: 5, state: up,
<snip………..>
ACs: 1 (1 up), VFIs: 1, PWs: 5 (5 up), PBBs: 0 (0 up)
List of ACs:
AC: GigabitEthernet0/1/0/3.2, state is up
<snip…………..>
Storm Control:
Broadcast: enabled(1000)
Multicast: enabled(10000)
Unknown unicast: enabled(10000)
Static MAC addresses:
Statistics:
packets: received 251295, sent 3555258
bytes: received 18590814, sent 317984884
Storm control drop counters:
packets: broadcast 0, multicast 0, unknown unicast 0
bytes: broadcast 0, multicast 0, unknown unicast 0
Dynamic ARP inspection drop counters:
packets: 0, bytes: 0
IP source guard drop counters:
packets: 0, bytes: 0
<snip>
MAC Moves :- constant MAC moves often indicate network instability, such as
severe instability during an L2 loop. The MAC address security feature lets you
report MAC moves and take corrective actions such as shutting down an offending
port.
l2vpn
bridge group customer1
bridge-domain engineering
mac
secure
action none
logging
!
!
For L3VPN -- If the data immediately after the bottom label starts with 0x4 or 0x6, an MPLS P router assumes that
there is an IPv4 or IPv6 packet inside the MPLS packet and tries to loadbalance based on a hash of the source and
destination IPv4 or IPv6 addresses extracted from the frame.
L2VPN – load balancing happens on bottom label, All traffic from one PW follows the same path,
so out-of-order packets do not occur, but this might lead to congestion on some links in case of high bandwidth PWs.
Once Flow lable is configure both PE will agree on it while negotiating the session.
With the FAT PW feature, the ingress L2VPN PE inserts one bottom MPLS label per src-dst-mac or per src-dst-ip.
The MPLS core routers (between the PEs) does hashing based on bottom label ( FAT)
This generally provides much better bandwidth utilization in the core unless a PW carries only a small number of
src-dst-mac or src-dst-ip conversations.
The traffic from one PW is loadbalanced over multiple paths in the core when available.
Application traffic does not suffer from out-of-order packets because all traffic from the same source (MAC or IP)
to the same destination (MAC or IP) follows the same path.
E.g. – customer may complain that bundle is not doing load balancing ( one particular link is carrying very high
traffic compare to other links ). Reason may be one particular L2VPN is carrying very high traffic and based on
bottom label hash it will stick to one particular link. , Soln is FAT label.
RP/0/RSP0/CPU0:ASR9001-I(config-l2vpn-pwc-mpls)#load-balancing flow ?
l2vpn both Insert/Discard Flow label on transmit/recceive
pw-class fat-pw code Flow label TLV code
receive Discard Flow label on receive
encapsulation mpls transmit Insert Flow label on transmit
control-word RP/0/RSP0/CPU0:ASR9001-I(config)#l2vpn load-balancing flow ?
load-balancing src-dst-ip Use source and destination IP addresses for hashing
src-dst-mac Use source and destination MAC addresses for hashing
flow-label both
!
!
!
bridge group customer1
bridge-domain engineering
vfi customer1-engineering
neighbor 10.0.0.11 pw-id 2
pw-class fat-pw