In this post i would like to demonstrate the Class-Based Tunnel Selection feature.
In class-based tunnel selection, we will select an MPLS TE tunnel based on the incomming Precedence bit in the data.
For example, IP Prec 5 goes to TE Tunnel 1, whereas IP Prec 3 goes to TE Tunnel 2.
This sort of thing would be very useful for the SP if SLA’s are offered based on the incomming data. Think of voice for example. IP Prec 5 marked traffic would be voice and as it enters the SP network it automatically gets sent down the appropriate tunnel.
For the example, i will be using the topology shown in Figure 1.
The entire L2 VPN has been setup already so we will just focus on the TE Tunnels.
Figure 1 outlines a typical SP network, with a customer using its L3 VPN service.
The end result is that we want to differentiate the tunnel selection based on what traffic enters PE-1 from CE-1 going to CE-2.
I will be using 3 IP Prec values:
0 = Best Effort
3 = High priority Data
5 = Voice
We will need their decimal values when we issue ICMP Pings from CE-1 to CE-2, so here they are:
0 = 0 = 0
3 = 011 000 00 = 96
5 = 101 000 00 = 160
I will be using 3 Tunnels originating from PE-1 terminating at PE-2.
These tunnels will be used to carry traffic with the 3 different IP Precedence values.
Tunnel 1 will go from PE-1 to P1 to PE-2.
Tunnel 2 will go from PE-1 to P2 to P3 to PE-2.
Tunnel 3 will go from PE-1 to P4 to PE-2.
Note that Tunnel 1 will carry IP Prec 0, but also all the other unassigned values (1, 2, 4, 6 and 7).
This tunnel layout can be seen in Figure 2
On top of that i will be using Tunnel100 to be the “master” of the other three.
This tunnel will control which Tunnel member will be used for the forwarding.
Remember that TE tunnels are unidirectional. That means that the traffic engineering we are doing
here is only from PE-1 to PE-2, not from PE-2 to PE-1.
In the real world you would ofcourse do it both ways.
Lets take a look at the tunnel definitions on PE-1:
And then the “main” tunnel:
We can issue the command: “show mpls traffic-eng exp” to verify our tunnel setup on PE-1:
Everything looks as we expected. Tunnel 1 handles every but Prec 3 and 5.
Tunnel 2 handles Prec 3 and Tunnel 3 handles Prec 5.
We can verify on CE-1 and CE-2 that we are seeing the routes we expect through the L3 VPN.
on CE-1:
and on CE-2:
We can verify that our data forwarding works, by enabling “debug mpls pack” on P1, P2 and P4.
When we ping from CE-1 to CE-2 (using loopbacks), with the value 0, we expect to see traffic going through P1:
On CE-1:
At the same time on P1:
If we then perform the same ping from CE-1, but with the IP Prec value of 3 (96 decimal), we expect the traffic to be on P2 instead:
on CE-1:
And sure enough, on P2:
Finally, lets verify with IP Prec 5 (160 decimal), we want to see the traffic hit P4:
on P4:
Excellent! – So depending on how the traffic is marked comming from our customer, we will use different TE tunnels to forward the data through our SP core.
Thats all i had for now. Take care!