Example: Configuring EVPN-VPWS over Transport Class Tunnels
Overview
In this example, we use a basic network topology to configure EVPN-VPWS over two RSVP-TE transport class tunnels between PE1 and PE2. We define two transport class and assign different tunnels to the transport class. We configure the devices with the following features:
-
EVPN-VPWS routing instance.
-
RSVP-TE tunnels using MPLS LSP and BGP.
-
Gold and bronze transport class.
-
Policy filters specifying separate communities for the gold and bronze transport class.
Requirements
-
Two MX series routers configured as a PE router
-
One MX series router configured as a route reflector
-
Junos OS Release 23.1R1 or later running on all devices.
Topology
Figure 1 shows a basic topology with 2 PE devices and a route reflector forwarding the routes between the PE devices. A pair of CE devices is connected to PE1 and PE2 respectively. PE1 and PE2 routes traffic from CE1 and CE2 over the gold tunnel and traffic from CE3 and CE4 over the bronze tunnel.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level. The configuration for PE1, PE2, and RR are as follows:
PE1
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description pe1-rr set interfaces ge-0/0/0 unit 0 family inet address 10.1.1.1/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 encapsulation flexible-ethernet-services set interfaces ge-0/0/2 unit 4 description pe1-ce1 set interfaces ge-0/0/2 unit 4 encapsulation vlan-ccc set interfaces ge-0/0/2 unit 4 vlan-id 300 set interfaces ge-0/0/2 unit 5 description pe1-ce3 set interfaces ge-0/0/2 unit 5 encapsulation vlan-ccc set interfaces ge-0/0/2 unit 5 vlan-id 301 set interfaces lo0 unit 0 family inet address 10.0.255.1/32 set interfaces lo0 unit 0 family iso address 49.0000.0010.0255.0001.00 set interfaces lo0 unit 0 family mpls set policy-options policy-statement vrf-export-evpnvpws term a then community add rt-evpnvpws set policy-options policy-statement vrf-export-evpnvpws term a then community add map2gold set policy-options policy-statement vrf-export-evpnvpws term a then accept set policy-options policy-statement vrf-export-evpnvpws term b then reject set policy-options policy-statement vrf-export-evpnvpws-2 term a then community add rt-evpnvpws-2 set policy-options policy-statement vrf-export-evpnvpws-2 term a then community add map2bronze set policy-options policy-statement vrf-export-evpnvpws-2 term a then accept set policy-options policy-statement vrf-export-evpnvpws-2 term b then reject set policy-options policy-statement vrf-import-evpnvpws term a from protocol bgp set policy-options policy-statement vrf-import-evpnvpws term a from community rt-evpnvpws set policy-options policy-statement vrf-import-evpnvpws term a then accept set policy-options policy-statement vrf-import-evpnvpws term b then reject set policy-options policy-statement vrf-import-evpnvpws-2 term a from protocol bgp set policy-options policy-statement vrf-import-evpnvpws-2 term a from community rt-evpnvpws-2 set policy-options policy-statement vrf-import-evpnvpws-2 term a then accept set policy-options policy-statement vrf-import-evpnvpws-2 term b then reject set policy-options community map2bronze members color:0:200 set policy-options community map2gold members color:0:100 set policy-options community rt-evpnvpws members target:200:1 set policy-options community rt-evpnvpws-2 members target:300:1 set routing-instances evpn-vpws instance-type evpn-vpws set routing-instances evpn-vpws protocols evpn interface ge-0/0/2.4 vpws-service-id local 102 set routing-instances evpn-vpws protocols evpn interface ge-0/0/2.4 vpws-service-id remote 201 set routing-instances evpn-vpws interface ge-0/0/2.4 set routing-instances evpn-vpws route-distinguisher 65000:1 set routing-instances evpn-vpws vrf-import vrf-import-evpnvpws set routing-instances evpn-vpws vrf-export vrf-export-evpnvpws set routing-instances evpn-vpws-2 instance-type evpn-vpws set routing-instances evpn-vpws-2 protocols evpn interface ge-0/0/2.5 vpws-service-id local 103 set routing-instances evpn-vpws-2 protocols evpn interface ge-0/0/2.5 vpws-service-id remote 301 set routing-instances evpn-vpws-2 interface ge-0/0/2.5 set routing-instances evpn-vpws-2 route-distinguisher 65000:2 set routing-instances evpn-vpws-2 vrf-import vrf-import-evpnvpws-2 set routing-instances evpn-vpws-2 vrf-export vrf-export-evpnvpws-2 set routing-options route-distinguisher-id 10.0.255.1 set routing-options resolution preserve-nexthop-hierarchy set routing-options router-id 10.0.255.1 set routing-options autonomous-system 65000 set routing-options transport-class auto-create set routing-options transport-class name gold color 100 set routing-options transport-class name bronze color 200 set protocols bgp group BGP_PEERs type internal set protocols bgp group BGP_PEERs local-address 10.0.255.1 set protocols bgp group BGP_PEERs family inet transport set protocols bgp group BGP_PEERs family evpn signaling set protocols bgp group BGP_PEERs neighbor 10.0.255.3 set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols mpls label-switched-path pe1-rr to 10.0.255.3 set protocols mpls label-switched-path pe1-pe2 to 10.0.255.2 set protocols mpls label-switched-path pe1-pe2-gold to 10.0.255.2 set protocols mpls label-switched-path pe1-pe2-gold transport-class gold set protocols mpls label-switched-path pe1-pe2-bronze to 10.0.255.2 set protocols mpls label-switched-path pe1-pe2-bronze transport-class bronze set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable
PE2
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description pe2-rr set interfaces ge-0/0/0 unit 0 family inet address 10.2.1.1/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/4 description pe2-ce2 set interfaces ge-0/0/4 vlan-tagging set interfaces ge-0/0/4 encapsulation flexible-ethernet-services set interfaces ge-0/0/4 unit 4 encapsulation vlan-ccc set interfaces ge-0/0/4 unit 4 vlan-id 300 set interfaces lo0 unit 0 family inet address 10.0.255.2/32 set interfaces lo0 unit 0 family iso address 49.0000.0010.0255.0002.00 set interfaces lo0 unit 0 family mpls set policy-options policy-statement vrf-export-evpnvpws term a then community add rt-evpnvpws set policy-options policy-statement vrf-export-evpnvpws term a then community add map2bronze set policy-options policy-statement vrf-export-evpnvpws term a then accept set policy-options policy-statement vrf-export-evpnvpws term b then reject set policy-options policy-statement vrf-import-evpnvpws term a from protocol bgp set policy-options policy-statement vrf-import-evpnvpws term a from community rt-evpnvpws set policy-options policy-statement vrf-import-evpnvpws term a then accept set policy-options policy-statement vrf-import-evpnvpws term b then reject set policy-options community map2bronze members color:0:200 set policy-options community map2gold members color:0:100 set policy-options community rt-evpnvpws members target:200:1 set routing-instances evpn-vpws instance-type evpn-vpws set routing-instances evpn-vpws protocols evpn interface ge-0/0/4.4 vpws-service-id local 201 set routing-instances evpn-vpws protocols evpn interface ge-0/0/4.4 vpws-service-id remote 102 set routing-instances evpn-vpws interface ge-0/0/4.4 set routing-instances evpn-vpws route-distinguisher 65000:1 set routing-instances evpn-vpws vrf-import vrf-import-evpnvpws set routing-instances evpn-vpws vrf-export vrf-export-evpnvpws set routing-options route-distinguisher-id 10.0.255.2 set routing-options resolution preserve-nexthop-hierarchy set routing-options router-id 10.0.255.2 set routing-options autonomous-system 65000 set routing-options transport-class auto-create set routing-options transport-class name gold color 100 set routing-options transport-class name bronze color 200 set protocols bgp group BGP_PEERs type internal set protocols bgp group BGP_PEERs local-address 10.0.255.2 set protocols bgp group BGP_PEERs family inet transport set protocols bgp group BGP_PEERs family evpn signaling set protocols bgp group BGP_PEERs neighbor 10.0.255.3 set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols mpls label-switched-path pe2-pe1-gold to 10.0.255.1 set protocols mpls label-switched-path pe2-pe1-gold transport-class gold set protocols mpls label-switched-path pe2-pe1 to 10.0.255.1 set protocols mpls label-switched-path pe2-pe1-bronze to 10.0.255.1 set protocols mpls label-switched-path pe2-pe1-bronze transport-class bronze set protocols mpls label-switched-path pe2-rr to 10.0.255.3 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable
RR
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description rr-pe1 set interfaces ge-0/0/0 unit 0 family inet address 10.1.1.2/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 description rr-pe2 set interfaces ge-0/0/2 unit 0 family inet address 10.2.1.2/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls set interfaces lo0 apply-groups-except global set interfaces lo0 unit 0 family inet address 10.0.255.3/32 set interfaces lo0 unit 0 family iso address 49.0000.0010.0255.0003.00 set interfaces lo0 unit 0 family mpls set policy-options policy-statement pplb then load-balance per-packet set routing-options route-distinguisher-id 10.0.255.3 set routing-options router-id 10.0.255.3 set routing-options autonomous-system 65000 set routing-options transport-class auto-create set protocols bgp group BGP_PEERs type internal set protocols bgp group BGP_PEERs local-address 10.0.255.3 set protocols bgp group BGP_PEERs family inet transport set protocols bgp group BGP_PEERs family evpn signaling set protocols bgp group BGP_PEERs cluster 10.0.255.3 set protocols bgp group BGP_PEERs neighbor 10.0.255.1 set protocols bgp group BGP_PEERs neighbor 10.0.255.2 set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols mpls label-switched-path rr-pe1 to 10.0.255.1 set protocols mpls label-switched-path rr-pe2 to 10.0.255.2 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable
Step-by-Step Procedure
To set up transport class tunnels on the PE device:
-
Configure the device to support enhanced IP and tunnel services.
[edit] set chassis network-services enhanced-ip
-
Configure the interfaces.
[edit] set interfaces ge-0/0/0 description pe1-rr set interfaces ge-0/0/0 unit 0 family inet address 10.1.1.1/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/2 vlan-tagging set interfaces ge-0/0/2 encapsulation flexible-ethernet-services set interfaces ge-0/0/2 unit 4 description pe1-ce1 set interfaces ge-0/0/2 unit 4 encapsulation vlan-ccc set interfaces ge-0/0/2 unit 4 vlan-id 300 set interfaces ge-0/0/2 unit 5 description pe1-ce3 set interfaces ge-0/0/2 unit 5 encapsulation vlan-ccc set interfaces ge-0/0/2 unit 5 vlan-id 301 set interfaces lo0 unit 0 family inet address 10.0.255.1/32 set interfaces lo0 unit 0 family iso address 49.0000.0010.0255.0001.00 set interfaces lo0 unit 0 family mpls
-
Define the gold and bronze transport class on PE1.
[edit] set routing-options transport-class auto-create set routing-options transport-class name gold color 100 set routing-options transport-class name bronze color 200
-
Configure the routing protocols and the routing options to support transport-tunnels. We are using RSVP-TE with MPLS LSP and BGP.
[edit] set protocols bgp group BGP_PEERs type internal set protocols bgp group BGP_PEERs local-address 10.0.255.1 set protocols bgp group BGP_PEERs family inet transport set protocols bgp group BGP_PEERs family evpn signaling set protocols bgp group BGP_PEERs neighbor 10.0.255.3 set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols mpls label-switched-path pe1-rr to 10.0.255.3 set protocols mpls label-switched-path pe1-pe2 to 10.0.255.2 set protocols mpls label-switched-path pe1-pe2-gold to 10.0.255.2 set protocols mpls label-switched-path pe1-pe2-gold transport-class gold set protocols mpls label-switched-path pe1-pe2-bronze to 10.0.255.2 set protocols mpls label-switched-path pe1-pe2-bronze transport-class bronze set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set routing-options route-distinguisher-id 10.0.255.1 set routing-options resolution preserve-nexthop-hierarchy set routing-options router-id 10.0.255.1 set routing-options autonomous-system 65000
-
Configure the policy to apply the EVPN routes to the transport tunnels. We use
vrf-export
to advertise the tunnel to the remote PE.[edit] set policy-options policy-statement vrf-export-evpnvpws term a then community add rt-evpnvpws set policy-options policy-statement vrf-export-evpnvpws term a then community add map2gold set policy-options policy-statement vrf-export-evpnvpws term a then accept set policy-options policy-statement vrf-export-evpnvpws term b then reject set policy-options policy-statement vrf-export-evpnvpws-2 term a then community add rt-evpnvpws-2 set policy-options policy-statement vrf-export-evpnvpws-2 term a then community add map2bronze set policy-options policy-statement vrf-export-evpnvpws-2 term a then accept set policy-options policy-statement vrf-export-evpnvpws-2 term b then reject set policy-options policy-statement vrf-import-evpnvpws term a from protocol bgp set policy-options policy-statement vrf-import-evpnvpws term a from community rt-evpnvpws set policy-options policy-statement vrf-import-evpnvpws term a then accept set policy-options policy-statement vrf-import-evpnvpws term b then reject set policy-options policy-statement vrf-import-evpnvpws-2 term a from protocol bgp set policy-options policy-statement vrf-import-evpnvpws-2 term a from community rt-evpnvpws-2 set policy-options policy-statement vrf-import-evpnvpws-2 term a then accept set policy-options policy-statement vrf-import-evpnvpws-2 term b then reject set policy-options community map2bronze members color:0:200 set policy-options community map2gold members color:0:100 set policy-options community rt-evpnvpws members target:200:1 set policy-options community rt-evpnvpws-2 members target:300:1
-
Configure the EVPN-VPWS routing instance that will be using the policy above.
[edit] set routing-instances evpn-vpws instance-type evpn-vpws set routing-instances evpn-vpws protocols evpn interface ge-0/0/2.4 vpws-service-id local 102 set routing-instances evpn-vpws protocols evpn interface ge-0/0/2.4 vpws-service-id remote 201 set routing-instances evpn-vpws interface ge-0/0/2.4 set routing-instances evpn-vpws route-distinguisher 65000:1 set routing-instances evpn-vpws vrf-import vrf-import-evpnvpws set routing-instances evpn-vpws vrf-export vrf-export-evpnvpws set routing-instances evpn-vpws-2 instance-type evpn-vpws set routing-instances evpn-vpws-2 protocols evpn interface ge-0/0/2.5 vpws-service-id local 103 set routing-instances evpn-vpws-2 protocols evpn interface ge-0/0/2.5 vpws-service-id remote 301 set routing-instances evpn-vpws-2 interface ge-0/0/2.5 set routing-instances evpn-vpws-2 route-distinguisher 65000:2 set routing-instances evpn-vpws-2 vrf-import vrf-import-evpnvpws-2 set routing-instances evpn-vpws-2 vrf-export vrf-export-evpnvpws-2
Verification
Confirm that the configuration is working properly.
Verifying the Packet Flow in the Tunnels
Purpose
Verify that the PE device routes packets on the RSVP LSP tunnel that is associated with the transport class.
Action
From operational mode on CE1, ping
CE2.
user@CE1> ping 172.16.0.2 count 10 rapid PING 172.16.0.2 (172.16.0.2): 56 data bytes !!!!!!!!!! --- 172.16.0.2 ping statistics --- 10 packets transmitted, 10 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.795/4.276/5.075/0.269 ms
From operational mode on CE3, ping
CE4.
user@CE3> ping 172.16.1.2 count 20 rapid PING 172.16.1.2 (172.16.1.2): 56 data bytes !!!!!!!!!!!!!!!!!!!! --- 172.16.1.2 ping statistics --- 20 packets transmitted, 20 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.631/4.380/7.976/0.608 ms
From operational mode on PE1, run the show mpls lsp statistics
command to display the LSP information.
user@PE1> show mpls lsp statistics Ingress LSP: 4 sessions To From State Packets Bytes LSPname 10.0.255.2 10.0.255.1 Up 0 0 pe1-pe2 10.0.255.2 10.0.255.1 Up 20 2040 pe1-pe2-bronze 10.0.255.2 10.0.255.1 Up 10 1020 pe1-pe2-gold 10.0.255.3 10.0.255.1 Up 0 0 pe1-rr
Meaning
The output shows that the ping was successful. The output from the
show mpls lsp statistics
command shows that packets were
routed to the bronze and gold tunnels.
Verify Configured Transport Tunnels
Purpose
Verify that the EVPN uses the configured transport tunnel.
Action
From operational mode on PE1, run the show route table mpls.0
protocol evpn
command to identify the LSP route.
user@PE1> show route table mpls.0 protocol evpn mpls.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 94 *[EVPN/7] 6d 01:07:24 > via ge-0/0/2.4, Pop 105 *[EVPN/7] 06:20:50 > via ge-0/0/2.5, Pop 106 *[EVPN/7] 06:17:47, remote-pe 10.0.255.2, routing-instance evpn-vpws-2, route-type Egress, vlan-id 301 > to 10.1.1.2 via ge-0/0/0.0, label-switched-path pe1-pe2-bronze 107 *[EVPN/7] 06:08:41, remote-pe 10.0.255.2, routing-instance evpn-vpws, route-type Egress, vlan-id 201 > to 10.1.1.2 via ge-0/0/0.0, label-switched-path pe1-pe2-gold ge-0/0/2.5 *[EVPN/7] 06:17:47, route-type Egress > to 10.1.1.2 via ge-0/0/0.0, label-switched-path pe1-pe2-bronze ge-0/0/2.4 *[EVPN/7] 06:08:41, route-type Egress > to 10.1.1.2 via ge-0/0/0.0, label-switched-path pe1-pe2-gold
From operational mode on PE1, run the show route table mpls.0 protocol
evpn label label-number extensive
command with the route
label number to display the transport class information.
user@PE1> show route table mpls.0 protocol evpn label 107 extensive mpls.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden) 107 (1 entry, 1 announced) TSI: KRT in-kernel 107 /52 -> {composite(554)} *EVPN Preference: 7 Next hop type: Indirect, Next hop index: 0 Transport class: gold Address: 0x7b406d4 Next-hop reference count: 5, key opaque handle: 0x0, non-key opaque handle: 0x0 Next hop type: Router, Next hop index: 549 Next hop: 10.1.1.2 via ge-0/0/0.0, selected Label-switched-path pe1-pe2-gold . . . regress@PE1> show route table mpls.0 protocol evpn label 106 extensive mpls.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden) 106 (1 entry, 1 announced) TSI: KRT in-kernel 106 /52 -> {composite(553)} *EVPN Preference: 7 Next hop type: Indirect, Next hop index: 0 Transport class: bronze Address: 0x7b40584 Next-hop reference count: 5, key opaque handle: 0x0, non-key opaque handle: 0x0 Next hop type: Router, Next hop index: 551 Next hop: 10.1.1.2 via ge-0/0/0.0, selected Label-switched-path pe1-pe2-bronze . . .
Meaning
The output from PE1 and PE2 shows that we are routing traffic from our EVPN VPWS routing instance through the gold and bronze tunnels.