EVPN E-LAN Service Label Allocation
Load evpn.service.label.init.cfg
#IOS-XE (PE1-3, CE1,2,3,4)
config replace flash:evpn.service.label.init.cfg
#IOS-XR (P1-2)
configure
load evpn.service.label.init.cfg
commit replace
y

Configure EVPN E-LAN for CE1, CE2, CE3 and CE4. The CEs are already preconfigured with IP addresses. BGP is already preconfigured in the core. CE2 is singled homed to PE1. (CE2 Gi3 is shutdown).
Ensure that each CE MAC advertised by PE1 has a unique service label. (PE1 will advertise two MACs, one for CE1 and one for CE2. Each of these should have a separate service label in the type 2 routes).
Answer
#PE1
l2vpn evpn
replication-type ingress
mpls label mode per-ce
!
l2vpn evpn instance 100 vlan-based
!
int gi4
no ip address
no shut
service instance 1 eth
encap default
!
int gi5
no ip address
no shut
service instance 1 eth
encap default
exit
!
bridge-domain 100
member gi4 service-instance 1
member gi5 service-instance 1
member evpn-instance 100
#PE2, PE3
l2vpn evpn
replication-type ingress
!
l2vpn evpn instance 100 vlan-based
!
int gi4
no ip address
no shut
service instance 1 eth
encap default
exit
!
bridge-domain 100
member gi4 service-instance 1
member evpn-instance 100
Explanation
IOS-XE has two options for label allocation for EVPN. You can either do per-BD, which is the default, or per-CE. This lab tests your understanding of per-CE label allocation mode.
In per-BD mode, every MAC in the same BD is advertised with the same label in the type 2 routes. When the PE receives a frame with this label, the instruction is “do a forwarding lookup in the corresponding BD.”
By setting per-CE label allocation mode, all MACs learned via a given access circuit are assigned the same label. The instruction is now “forward out the AC” instead of “do a forwarding lookup,” so while this label mode consumes more labels, I believe it slightly optimizes forwarding latency.
Label allocation mode must be set globally.
l2vpn evpn
mpls label mode per-ce|per-bd
Label allocation modes of per-EVI or per-MAC are not supported.
Verification
Since PE1 is doing per-CE label allocation instead of per-BD, we can verify that we do not have a per-BD label for this EVI:

If we generate traffic from CE1 and CE2, we should see that PE1 advertises these two MACs with a unique service label:

This can also be verified with the below show command:

Last updated