OcNOS-SP : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : EVPN MPLS E-TREE Configuration : Configuring MPLS EVPN
Configuring MPLS EVPN
Topology
Figure 25-1 shows the topology used to show how to configure MPLS EVPN.
Figure 25-1: MPLS EVPN configuration
PE1
 
#configure terminal
Enter configuration mode.
(config)#int lo
Enter interface mode for loopback.
(config-if)#ip address 101.1.1.1/32 secondary
Configure IP address on loopback
(config-if)#exit
Exit interface mode
(config)#mac vrf vrfred
Configure MAC VRF
(config-vrf)#rd 101:1
Configure RD for the MAC VRF
(config-vrf)#route-target export 101:1
Configure export RT for the MAC VRF
(config-vrf)#route-target import 102:1
Configure import RT for the MAC VRF
(config-vrf)#route-target import 103:1
Configure import RT for the MAC VRF
(config-vrf)#exit
Exit VRF mode.
(config)#evpn mpls enable
Enable the evpn mpls.
(config)#evpn mpls vtep-ip-global 101.1.1.1
Configure VTEP-IP-global.
(config)#evpn mpls id 1000
Configure MPLS EVID.
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred
Configure host-reachability with VRF association.
(config-if)#interface xe6.2
Configure sub-interface to create access-circuit.
(config-if)#switchport
Make the sub-interface a Layer 2 interface
(config-if)#encapsulation dot1q 2
Configure the encapsulation required.
(config-if)#map vpn-id 1000
Map interface to ethernet virtual network identifier.
(config-if)#exit
Exit interface mode.
(config)#router rsvp
Enable RSVP in the PE
(config)#interface xe5
Enter interface mode for the network side interface.
(config-if)#ip address 10.1.1.1/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-rsvp
Enable RSVP.
(config-if)#exit
Exit interface mode
(config)#rsvp-trunk t1_PE2
Configure RSVP trunk.
(config-trunk)#from 101.1.1.1
Assign the source loopback address to the RSVP trunk
(config-trunk)#to 102.1.1.1
Assign the source loopback address to the to the RSVP trunk
(config-trunk)#exit
Exit RSVP trunk mode.
(config)#rsvp-trunk t1_PE3
Configure RSVP trunk.
(config-trunk)#from 101.1.1.1
Assign the source loopback address to the RSVP trunk
(config-trunk)#to 103.1.1.1
Assign the source loopback address to the to the RSVP trunk
(config-trunk)#exit
Exit RSVP trunk mode.
(config)#router ospf 1
Enter OSPF router mode
(config-router)#ospf router-id 101.1.1.1
Configure router-id.
(config-router)#network 101.1.1.1/32 area 0.0.0.0
Advertise the loopback address in area 0.
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise the network address in area 0
(config-router)#exit
Exit OSPF router mode.
(config)#router bgp 1
Enter BGP router mode
(config-router)#neighbor 102.1.1.1 remote-as 1
Advertise the neighbor in BGP process with the remote-as number
(config-router)#neighbor 102.1.1.1 update-source lo
Configure the update-source for the neighbor
(config-router)#neighbor 103.1.1.1 remote-as 1
Advertise the neighbor in BGP process with the remote-as number
(config-router)#neighbor 103.1.1.1 update-source lo
Configure the update-source for the neighbor
(config-router)#address-family l2vpn evpn
Enter EVPN address family mode
(config-router-af)#neighbor 102.1.1.1 activate
Activate the neighbor
(config-router-af)#neighbor 103.1.1.1 activate
Activate the neighbor
(config-router-af)#exit-address-family
Exit address family mode.
(config-router)#exit
Exit the router mode
(config)#commit
Commit the transaction.
(config)#exit
Exit the config mode.
P1
 
#configure terminal
Enter configuration mode.
(config)#int lo
Enter interface mode for loopback.
(config)#router rsvp
Configure RSVP.
(config)#interface xe4
Enter interface mode for the network side interface.
(config-if)#ip address 30.1.1.1/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-ldp ipv4
Enable LDP.
(config)#interface xe6
Enter interface mode for the network side interface.
(config-if)#ip address 10.1.1.2/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-ldp ipv4
Enable LDP.
(config)#interface xe7
Enter interface mode for the network side interface.
(config-if)#ip address 20.1.1.1/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-ldp ipv4
Enable LDP.
(config-if)#exit
Exit interface mode
(config)#interface xe74
Enter interface mode for the network side interface.
(config-if)#ip address 30.1.1.1/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-rsvp
Enable RSVP.
(config-if)#exit
Exit interface mode
(config)#router ospf 1
Enter OSPF router mode
(config-router)#ospf router-id 101.1.1.1
Configure router-id.
(config-router)#network 7.7.7.7/32 area 0.0.0.0
Advertise the loopback address in area 0.
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise the network address in area 0
(config-router)#network 20.1.1.0/24 area 0.0.0.0
Advertise the network address in area 0
(config-router)#network 30.1.1.0/24 area 0.0.0.0
Advertise the network address in area 0
(config-router)#exit
Exit the transaction
(config)#commit
Commit candidate configuration to be running configuration
(config)#exit
Exit the config mode
PE2
 
#configure terminal
Enter configuration mode.
(config)#interface lo
Enter interface mode for loopback.
(config-if)#ip address 102.1.1.1/32 secondary
Configure IP address on loopback
(config-if)#exit
Exit interface mode
(config)#mac vrf vrfred
Configure MAC VRF
(config-vrf)#rd 102:1
Configure RD for the MAC VRF
(config-vrf)#route-target import 101:1
Configure import RT for the MAC VRF
(config-vrf)#route-target export 102:1
Configure export RT for the MAC VRF
(config-vrf)#exit
Exit VRF mode
(config)#evpn mpls enable
Enable evpn mpls.
(config)#evpn mpls vtep-ip-global 102.1.1.1
Configure VTEP-IP-global.
(config)#evpn mpls id 1000
Configure MPLS EVID.
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred
Configure host-reachability with VRF association.
(config-if)#interface xe6.2
Configure sub-interface to create access-circuit.
(config-if)#switchport
Make the sub-interface a Layer 2 interface
(config-if)#encapsulation dot1q 2
Configure the encapsulation required.
(config-if)#access-if-evpn
Enter access mode for EVPN MPLS ID configuration
(config-if)#map vpn-id 1000
Map interface to Ethernet virtual network identifier.
(config-if)#exit
Exit interface mode.
(config)#router ldp
Enable LDP in the PE.
(config-router)#router-id 102.1.1.1
Set the router ID to IP address 102.1.1.1.
config-router)#transport-address ipv4 102.1.1.1
Set the IPv4 transport address for the label space.
(config)#interface xe5
Enter interface mode for the network side interface.
(config-if)#ip address 20.1.1.2/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-ldp ipv4
Enable LDP.
(config-if)#exit
Exit interface mode
(config)#rsvp-trunk t1_PE1 ipv4
Configure RSVP trunk.
(config-trunk)#from 102.1.1.1
Assign the source loopback address to the to the RSVP trunk
(config-trunk)#to 101.1.1.1
Assign the destination loopback address to the RSVP trunk
(config-trunk)#exit
Exit RSVP trunk mode.
(config)#router ospf 1
Enter OSPF router mode
(config-router)#ospf router-id 102.1.1.1
Configure router-id.
(config-router)#network 102.1.1.1/32 area 0.0.0.0
Advertise the loopback address in area 0.
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise the network address in area 0
(config-router)#exit
Exit OSPF router mode.
(config)#router bgp 1
Enter BGP router mode
(config-router)#neighbor 101.1.1.1 remote-as 1
Advertise the neighbor in BGP process with the remote-as number
(config-router)#neighbor 101.1.1.1 update-source lo
Configure the update-source for the neighbor
(config-router)#address-family l2vpn evpn
Enter EVPN address family mode
(config-router-af)#neighbor 101.1.1.1 activate
Activate the neighbor
(config-router-af)#exit-address-family
Exit address family mode.
(config-router)#exit
Exit the router mode
(config)#commit
Commit candidate configuration to be running configuration
(config)#exit
Exit the config mode
PE3
 
#configure terminal
Enter configuration mode.
(config)#interface lo
Enter interface mode for loopback.
(config-if)#ip address 103.1.1.1/32 secondary
Configure IP address on loopback
(config-if)#exit
Exit interface mode
(config)#mac vrf vrfred
Configure MAC VRF
(config-vrf)#rd 103:1
Configure RD for the MAC VRF
(config-vrf)#route-target import 101:1
Configure import RT for the MAC VRF
(config-vrf)#route-target export 103:1
Configure export RT for the MAC VRF
(config-vrf)#exit
Exit VRF mode
(config)#evpn mpls enable
Enable evpn mpls.
(config)#evpn mpls vtep-ip-global 103.1.1.1
Configure VTEP-IP-global.
(config)#evpn mpls id 1000
Configure MPLS EVID.
(config-evpn-mpls)#host-reachability-protocol evpn-bgp vrfred
Configure host-reachability with VRF association.
(config-if)#interface xe3.2
Configure sub-interface to create access-circuit.
(config-if)#switchport
Make the sub-interface a Layer 2 interface
(config-if)#encapsulation dot1q 2
Configure the encapsulation required.
(config-if)#access-if-evpn
Enter access mode for EVPN MPLS ID configuration.
(config-if)#map vpn-id 1000
Map interface to Ethernet virtual network identifier.
(config-if)#exit
Exit interface mode.
(config)#router ldp
Enable LDP in the PE.
(config-router)#router-id 103.1.1.1
Set the router ID for IP address 103.1.1.1
(config-router)#transport-address ipv4 103.1.1.1
Set the IPv4 transport address for the label space.
(config)#interface xe4
Enter interface mode for the network side interface.
(config-if)#ip address 30.1.1.2/24
Configure IP address on the network interface
(config-if)#label-switching
Enable label-switching.
(config-if)#enable-ldp ipv4
Enable LDP.
(config-if)#exit
Exit interface mode
(config)#rsvp-trunk t1_PE1 ipv4
Configure RSVP trunk.
(config-trunk)#from 103.1.1.1
Assign the source loopback address to the to the RSVP trunk
(config-trunk)#to 101.1.1.1
Assign the destination loopback address to the RSVP trunk
(config-trunk)#exit
Exit RSVP trunk mode.
(config)#router ospf 1
Enter OSPF router mode
(config-router)#ospf router-id 103.1.1.1
Configure router-id.
(config-router)#network 103.1.1.1/32 area 0.0.0.0
Advertise the loopback address in area 0.
(config-router)#network 30.1.1.0/24 area 0.0.0.0
Advertise the network address in area 0
(config-router)#exit
Exit OSPF router mode.
(config)#router bgp 1
Enter BGP router mode
(config-router)#neighbor 101.1.1.1 remote-as 1
Advertise the neighbor in BGP process with the remote-as number
(config-router)#neighbor 101.1.1.1 update-source lo
Configure the update-source for the neighbor
(config-router)#address-family l2vpn evpn
Enter EVPN address family mode
(config-router-af)#neighbor 101.1.1.1 activate
Activate the neighbor
(config-router-af)#exit
Exit the transaction
(config-router)#exit
Exit the router mode
(config)#commit
Commit candidate configuration to be running configuration
(config)#exit
Exit the config mode
Validation
PE1
PE1#show ldp session
Peer IP Address IF Name My Role State KeepAlive UpTime
7.7.7.7 xe2 Active OPERATIONAL 30 04:32:22
 
#show evpn mpls tunnel
EVPN-MPLS Network tunnel Entries
Source Destination Status Up/Down Update evpn-id
===================================================================================
101.1.1.1 103.1.1.1 Installed 02:08:11 02:08:11 1000
101.1.1.1 102.1.1.1 Installed 02:08:10 02:08:10 1000
 
Total number of entries are 2
 
#show bgp l2vpn evpn
 
BGP table version is 4, local router ID is 101.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
[EVPN route type]:[ESI]:[VNID]:[relevent route informantion]
1 - Ethernet Auto-discovery Route
2 - MAC/IP Route
3 - Inclusive Multicast Route
4 - Ethernet Segment Route
5 - Prefix Route
 
Network Next Hop Metric LocPrf Weight Path Peer Encap
 
RD[101:1] VRF[vrfred]:
*> [2]:[0]:[1000]:[48,0000:1111:2222]:[32,10.0.1.1]:[640]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1000]:[48,0000:1111:2223]:[0]:[640]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1000]:[48,0000:1111:2224]:[0]:[640]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1000]:[48,0000:1111:3333]:[0]:[640]
101.1.1.1 0 100 32768 i ---------- MPLS
[7m--More--[27m * i [2]:[0]:[1000]:[48,0000:2222:1111]:[32,10.0.1.2]:[640]
102.1.1.1 0 100 0 i 102.1.1.1 MPLS
* i [2]:[0]:[1000]:[48,0000:3333:1111]:[0]:[640]
103.1.1.1 0 100 0 i 103.1.1.1 MPLS
*> [2]:[0]:[1000]:[48,b86a:97cd:6a43]:[0]:[640]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [3]:[1000]:[32,101.1.1.1]
101.1.1.1 0 100 32768 i ---------- MPLS
* i [3]:[1000]:[32,102.1.1.1]
102.1.1.1 0 100 0 i 102.1.1.1 MPLS
* i [3]:[1000]:[32,103.1.1.1]
103.1.1.1 0 100 0 i 103.1.1.1 MPLS
 
RD[102:1]
*>i [2]:[0]:[1000]:[48,0000:2222:1111]:[32,10.0.1.2]:[640]
102.1.1.1 0 100 0 i 102.1.1.1 MPLS
*>i [3]:[1000]:[32,102.1.1.1]
102.1.1.1 0 100 0 i 102.1.1.1 MPLS
 
RD[103:1]
*>i [2]:[0]:[1000]:[48,0000:3333:1111]:[0]:[640]
103.1.1.1 0 100 0 i 103.1.1.1 MPLS
*>i [3]:[1000]:[32,103.1.1.1]
[7m--More--[27m 103.1.1.1 0 100 0 i 103.1.1.1 MPLS
 
Total number of prefixes 14
 
#show evpn mpls nd-cache
MPLS-EVPN ND-CACHE Information
===========================
EVPN-ID Ip-Addr Mac-Addr Type
_____________________________________________________________________________
1 1001::1 0000.0000.1113 Static Local
Total number of entries are 1
 
#show evpn mpls arp-cache
MPLS-EVPN ARP-CACHE Information
===========================
EVPN-ID Ip-Addr Mac-Addr Type
______________________________________________________
1 11.11.11.1 0000.0000.1112 Static Local
PE2
PE2#show ldp session
Peer IP Address IF Name My Role State KeepAlive UpTime
7.7.7.7 eth3 Active OPERATIONAL 30 00:39:53
 
#show evpn mpls tunnel
EVPN-MPLS Network tunnel Entries
Source Destination Status Up/Down Update e
vpn-id
================================================================================
=========================
102.1.1.1 101.1.1.1 Installed 00:00:55 00:00:55 1000
Total number of entries are 1
 
#show bgp l2vpn evpn vrf vrfred
BGP table version is 1, local router ID is 0.0.0.0
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
[EVPN route type]:[ESI]:[VNID]:[relevent route information]
1 - Ethernet Auto-discovery Route
2 - MAC/IP Route
3 - Inclusive Multicast Route
4 - Ethernet Segment Route
5 - Prefix Route
 
Network Next Hop Metric LocPrf Weight Path Peer Encap
*> [2]:[0]:[1]:[48,0000.0000.2221]:[0]:[1]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1]:[48,0000.0000.2222]:[32,12.12.12.1]:[1]
102.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1]:[48,0000.0000.2223]:[128,2001::1]:[1]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [3]:[1]:[32,102.1.1.1]
102.1.1.1 0 100 32768 i ---------- MPLS
* i [3]:[1]:[32,101.1.1.1]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
 
Total number of prefixes 5
 
#show bgp l2vpn evpn
BGP table version is 5, local router ID is 102.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
[EVPN route type]:[ESI]:[VNID]:[relevent route information]
1 - Ethernet Auto-discovery Route
2 - MAC/IP Route
3 - Inclusive Multicast Route
4 - Ethernet Segment Route
5 - Prefix Route
 
Network Next Hop Metric LocPrf Weight Path Peer Encap
 
RD[101:1] VRF[vrfred]:
*> [2]:[0]:[1]:[48,0000.0000.2221]:[0]:[1]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1]:[48,0000.0000.2222]:[32,12.12.12.1]:[1]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1]:[48,0000.0000.2223]:[128,2001::1]:[1]
102.1.1.1 0 100 32768 i ---------- MPLS
*> [3]:[1]:[32,102.1.1.1]
102.1.1.1 0 100 32768 i ---------- MPLS
* i [3]:[1]:[32,101.1.1.1]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
 
RD[101:1]
*>i [3]:[1]:[32,101.1.1.1]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
 
#show evpn mpls nd-cache
MPLS-EVPN ND-CACHE Information
===========================
EVPN-ID Ip-Addr Mac-Addr Type
_____________________________________________________________________________
1 2001::1 0000.0000.2223 Static Local
Total number of entries are 1
 
#show evpn mpls arp-cache
MPLS-EVPN ARP-CACHE Information
===========================
EVPN-ID Ip-Addr Mac-Addr Type
______________________________________________________
1 12.12.12.1 0000.0000.2222 Static Local
PE3
PE3#show ip bgp summary
BGP router identifier 103.1.1.1, local AS number 1
BGP table version is 1
1 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
101.1.1.1 4 1 3022 3019 1 0 0 21:28:19 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE3#show evpn mpls tunnel
EVPN-MPLS Network tunnel Entries
Source Destination Status Up/Down Update evpn-id
===================================================================================
103.1.1.1 101.1.1.1 Installed 21:28:14 21:28:14 1000
 
Total number of entries are 1
 
#show bgp l2vpn evpn vrf vrfred
BGP table version is 1, local router ID is 0.0.0.0
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
[EVPN route type]:[ESI]:[VNID]:[relevent route information]
1 - Ethernet Auto-discovery Route
2 - MAC/IP Route
3 - Inclusive Multicast Route
4 - Ethernet Segment Route
5 - Prefix Route
 
Network Next Hop Metric LocPrf Weight Path Peer Encap
*> [2]:[0]:[1]:[48,0000.0000.2221]:[0]:[1]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1]:[48,0000.0000.2222]:[32,12.12.12.1]:[1]
103.1.1.1 0 100 32768 i ---------- MPLS
*> [2]:[0]:[1]:[48,0000.0000.2223]:[128,2001::1]:[1]
101.1.1.1 0 100 32768 i ---------- MPLS
*> [3]:[1]:[32,103.1.1.1]
103.1.1.1 0 100 32768 i ---------- MPLS
* i [3]:[1]:[32,101.1.1.1]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
 
Total number of prefixes 5
 
PE3#show bgp l2vpn evpn
BGP table version is 15, local router ID is 103.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
[EVPN route type]:[ESI]:[VNID]:[relevent route informantion]
1 - Ethernet Auto-discovery Route
2 - MAC/IP Route
3 - Inclusive Multicast Route
4 - Ethernet Segment Route
5 - Prefix Route
 
Network Next Hop Metric LocPrf Weight Path Peer Encap
 
RD[101:1]
*>i [2]:[0]:[1000]:[48,0000:1111:2222]:[32,10.0.1.1]:[640]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
*>i [2]:[0]:[1000]:[48,0000:1111:3333]:[0]:[640]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
*>i [3]:[1000]:[32,101.1.1.1]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
 
RD[103:1] VRF[vrfred]:
[7m--More--[27m * i [2]:[0]:[1000]:[48,0000:1111:2222]:[32,10.0.1.1]:[640]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
* i [2]:[0]:[1000]:[48,0000:1111:3333]:[0]:[640]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
*> [2]:[0]:[1000]:[48,0000:3333:1111]:[0]:[640]
103.1.1.1 0 100 32768 i ---------- MPLS
* i [3]:[1000]:[32,101.1.1.1]
101.1.1.1 0 100 0 i 101.1.1.1 MPLS
*> [3]:[1000]:[32,103.1.1.1]
103.1.1.1 0 100 32768 i ---------- MPLS
 
Total number of prefixes 8
 
#show evpn mpls nd-cache
MPLS-EVPN ND-CACHE Information
===========================
EVPN-ID Ip-Addr Mac-Addr Type
_____________________________________________________________________________
1 2001::1 0000.0000.2223 Static Local
Total number of entries are 1
 
#show evpn mpls arp-cache
MPLS-EVPN ARP-CACHE Information
===========================
EVPN-ID Ip-Addr Mac-Addr Type
______________________________________________________
1 12.12.12.1 0000.0000.2222 Static Local
Last modified date: 10/17/2023