Note that you will be able to stage all configuration on XRd, but you cannot commit input policies on an interface on XRd. You will need to change the node type to XRv9K if you’d like to do this.
Before you begin, know that this is a very extensive lab which covers many different aspects of QoS in an MPLS network. I'd suggest really taking your time on this lab.
The service provider’s goals for QoS are the following:
Use RDM and make 100M available on all links for real-time traffic (CT1)
Use the following TE class definitions:
TE-Class 0 = CT1 priority 0
TE-Class 1 = CT1 priority 1
TE-Class 2 = CT0 priority 2
TE-Class 3 = CT0 priority 3
The service provider’s voice servers are located behind XR8. Configure CSR1-3 to have a TE tunnel with XR8. Each TE tunnel must reserve 25M bandwidth using TE-class 0. These three tunnels should be bidirectional.
Ensure real-time traffic uses these tunnels by using CBTS/PBTS
All non-EXP5 traffic between CSR1-3 and XR8 should use IGP bestpath.
Use a queuing policy in the core as follows:
Real time traffic (EXP5) should get priority and be policed to a rate of 20% link bandwidth
Priority traffic (EXP3 and EXP4) should receive 40% of remaining link bandwidth, use WRED, and fair-queuing
Network control traffic (EXP6) should be guaranteed 5% of remaining link bandwidth
BE traffic (EXP0) should received 55% of remaining link bandwidth and use WRED
Configure policing/shaping ingress/egress on the PEs towards the CEs as follows:
Each PE should police traffic received from the customer with a CIR of 100Mbps and a PIR of 120Mbps. Excess traffic should be marked down to EXP0.
Voice traffic (EF) should be marked with EXP5
Priority traffic (AF3X, AF4X, and CS6) should be marked with EX4
All other traffic should be marked with EXP0.
Each PE should shape traffic outbound to the customer based on the SP marking. The shaping policy should use the core queuing policy. Shape overall to 100M.
Configure shaping egress on the CEs towards the PEs as follows:
Each CE should shape traffic to 100Mbps as follows:
Voice traffic (EF) should get priority and be policed to 25Mbps
AF31-AF33 traffic should get 15% bandwidth and use WRED with a 50 msec queue-limit
Start dropping AF33 traffic up to 20% once the queue gets to 30 msec full
Start dropping AF32 traffic up to 20% once the queue gets to 35 msec full
Start dropping AF31 traffic up to 20% once the queue gets to 40 msec full
AF41-AF43 traffic should get 10% bandwidth and use WRED with a 30 msec queue-limit
Start dropping AF43 traffic up to 20% once the queue gets to 20 msec full
Start dropping AF42 traffic up to 20% once the queue gets to 22 msec full
Start dropping AF41 traffic up to 20% once the queue gets to 25 msec full
CS6 traffic should get 5% bandwidth
BE traffic should use fair-queuing
Answer
MPLS-TE with DS-TE
#All XR routers
router isis 1
address-family ipv4 unicast
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
!
!
mpls traffic-eng
ds-te mode ietf
ds-te te-classes
te-class 0 class-type 1 priority 0
te-class 1 class-type 1 priority 1
te-class 2 class-type 0 priority 2
te-class 3 class-type 0 priority 3
te-class 4 unused
te-class 5 unused
te-class 6 unused
te-class 7 unused
#CSR1-3
mpls traffic-eng tunnels
mpls traffic-eng ds-te mode ietf
mpls traffic-eng ds-te te-classes
te-class 0 class-type 1 priority 0
te-class 1 class-type 1 priority 1
te-class 2 class-type 0 priority 2
te-class 3 class-type 0 priority 3
te-class 4 unused
te-class 5 unused
te-class 6 unused
te-class 7 unused
!
router isis 1
mpls traffic-eng level-2
mpls traffic-eng router-id Lo0
## Enabling MPLS-TE on interfaces and allocating BW
#CSR1
int GigabitEthernet2.3111
mpls traffic-eng tunnels
ip rsvp bandwidth rdm bc0 1000000 bc1 100000
#CSR2
int GigabitEthernet2.3112
mpls traffic-eng tunnels
ip rsvp bandwidth rdm bc0 1000000 bc1 100000
#CSR3
int GigabitEthernet2.3133
mpls traffic-eng tunnels
ip rsvp bandwidth rdm bc0 1000000 bc1 100000
int GigabitEthernet2.3143
mpls traffic-eng tunnels
ip rsvp bandwidth rdm bc0 1000000 bc1 100000
#XR1
mpls traffic-eng
int GigabitEthernet0/0/0/0.3012
int GigabitEthernet0/0/0/0.3013
int GigabitEthernet0/0/0/0.3111
int GigabitEthernet0/0/0/0.3112
int GigabitEthernet0/0/0/0.3211
rsvp
int GigabitEthernet0/0/0/0.3012
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3013
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3111
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3112
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3211
bandwidth rdm bc0 1 g bc1 100 m
#XR2
mpls traffic-eng
int GigabitEthernet0/0/0/0.3012
int GigabitEthernet0/0/0/0.3024
int GigabitEthernet0/0/0/0.3222
rsvp
int GigabitEthernet0/0/0/0.3012
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3024
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3222
bandwidth rdm bc0 1 g bc1 100 m
#XR3
mpls traffic-eng
int GigabitEthernet0/0/0/0.3013
int GigabitEthernet0/0/0/0.3034
int GigabitEthernet0/0/0/0.3133
int GigabitEthernet0/0/0/0.3134
rsvp
int GigabitEthernet0/0/0/0.3013
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3034
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3133
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3134
bandwidth rdm bc0 1 g bc1 100 m
#XR4
mpls traffic-eng
int GigabitEthernet0/0/0/0.3024
int GigabitEthernet0/0/0/0.3034
int GigabitEthernet0/0/0/0.3143
int GigabitEthernet0/0/0/0.3144
rsvp
int GigabitEthernet0/0/0/0.3024
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3034
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3143
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3144
bandwidth rdm bc0 1 g bc1 100 m
#XR8
mpls traffic-eng
int GigabitEthernet0/0/0/0.3134
int GigabitEthernet0/0/0/0.3144
rsvp
int GigabitEthernet0/0/0/0.3134
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3144
bandwidth rdm bc0 1 g bc1 100 m
Core Queuing Policy
#IOS-XR
class-map REAL_TIME
match mpls exp top 5
class-map PRIORITY
match mpls exp top 3 4
class-map CONTROL
match mpls exp top 6
!
policy-map CORE_QUEUING
class REAL_TIME
priority
police rate percent 20
class PRIORITY
bandwidth remaining percent 40
random-detect exp 3 1000 1500
random-detect exp 4 1200 1500
class CONTROL
bandwidth remaining percent 5
class class-default
bandwidth remaining percent 55
random-detect exp 0 500 1000
#XR1
int GigabitEthernet0/0/0/0.3012
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3013
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3111
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3112
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3211
service-policy output CORE_QUEUING
#XR2
int GigabitEthernet0/0/0/0.3012
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3024
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3222
service-policy output CORE_QUEUING
#XR3
int GigabitEthernet0/0/0/0.3013
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3034
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3133
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3134
service-policy output CORE_QUEUING
#XR4
int GigabitEthernet0/0/0/0.3024
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3034
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3143
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3144
service-policy output CORE_QUEUING
#XR8
int GigabitEthernet0/0/0/0.3134
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3144
service-policy output CORE_QUEUING
#IOS-XE
class-map REAL_TIME
match mpls exp top 5
class-map PRIORITY
match mpls exp top 3 4
class-map CONTROL
match mpls exp top 6
!
policy-map CORE_QUEUING
class REAL_TIME
priority percent 20
class PRIORITY
bandwidth remaining percent 40
random-detect precedence-based
class CONTROL
bandwidth remaining percent 5
class class-default
bandwidth remaining percent 55
random-detect precedence-based
!
policy-map CORE_QUEUING_PARENT
class class-default
shape average 1 g
service-policy CORE_QUEUING
#CSR1
int GigabitEthernet2.3111
service-policy output CORE_QUEUING_PARENT
#CSR2
int GigabitEthernet2.3112
service-policy output CORE_QUEUING_PARENT
#CSR3
int GigabitEthernet2.3133
service-policy output CORE_QUEUING_PARENT
int GigabitEthernet2.3143
service-policy output CORE_QUEUING_PARENT
PE to CE policing/shaping
#IOS-XE
class-map DSCP_EF
match dscp ef
class-map match-any DSCP_AF3_AF4_CS6
match dscp af31 af32 af33
match dscp af41 af42 af43
match dscp cs6
!
policy-map CE_INGRESS_MARKING
class DSCP_EF
set mpls exp imposition 5
class DSCP_AF3_AF4_CS6
set mpls exp imposition 4
class class-default
set mpls exp imposition 0
!
policy-map CE_INGRESS_POLICE
class class-default
service-policy CE_INGRESS_MARKING
police cir 100 m pir 120 m
conform-action transmit
exceed-action set-mpls-exp-imposition-transmit 0
violate-action drop
!
!
!
class-map EXP5
match mpls exp top 5
class-map EXP3
match mpls exp top 3
class-map EXP4
match mpls exp top 4
class-map CONTROL
match mpls exp top 6
class-map QOS5
match qos-group 5
class-map QOS3
match qos-group 3
class-map QOS6
match qos-group 6
class-map QOS0
match qos-group 0
!
policy-map EXP_TO_QOS_GROUP
class EXP5
set qos-group 5
class EXP3
set qos-group 3
set discard-class 3
class EXP4
set qos-group 3
set discard-class 4
class CONTROL
set qos-group 6
class class-default
set qos-group 0
set discard-class 0
!
policy-map CE_EGRESS_QUEUING
class QOS5
priority percent 20
class QOS3
bandwidth remaining percent 40
random-detect discard-class-based
class QOS6
bandwidth remaining percent 5
class QOS0
bandwidth remaining percent 55
random-detect discard-class-based
!
policy-map CE_EGRESS_QUEUING_PARENT
class class-default
shape average 100 m
service-policy CE_EGRESS_QUEUING
!
!
#CSR1
int GigabitEthernet2.3111
service-policy input EXP_TO_QOS_GROUP
int GigabitEthernet2.3311
service-policy input CE_INGRESS_POLICE
service-policy output CE_EGRESS_QUEUING_PARENT
#CSR2
int GigabitEthernet2.3112
service-policy input EXP_TO_QOS_GROUP
int GigabitEthernet2.3322
service-policy input CE_INGRESS_POLICE
service-policy output CE_EGRESS_QUEUING_PARENT
#CSR3
int GigabitEthernet2.3133
service-policy input EXP_TO_QOS_GROUP
int GigabitEthernet2.3143
service-policy input EXP_TO_QOS_GROUP
int GigabitEthernet2.3333
service-policy input CE_INGRESS_POLICE
service-policy output CE_EGRESS_QUEUING_PARENT
#XR8
class-map DSCP_EF
match dscp ef
class-map match-any DSCP_AF3_AF4_CS6
match dscp af31 af32 af33
match dscp af41 af42 af43
match dscp cs3
!
policy-map CE_INGRESS_MARKING
class DSCP_EF
set mpls exp imposition 5
class DSCP_AF3_AF4_CS6
set mpls exp imposition 4
class class-default
set mpls exp imposition 0
!
policy-map CE_INGRESS_POLICE
class class-default
service-policy CE_INGRESS_MARKING
police rate 100 mbps peak-rate 120 mbps
conform-action transmit
exceed-action set mpls experimental imposition 0
violate-action drop
!
!
!
class-map EXP5
match mpls exp top 5
class-map EXP3
match mpls exp top 3
class-map EXP4
match mpls exp top 4
class-map CONTROL
match mpls exp top 6
class-map QOS5
match qos-group 5
class-map QOS3
match qos-group 3
class-map QOS6
match qos-group 6
class-map QOS0
match qos-group 0
!
policy-map EXP_TO_QOS_GROUP
class EXP4
set qos-group 5
class EXP3
set qos-group 3
set discard-class 3
class EXP4
set qos-group 3
set discard-class 4
class CONTROL
set qos-group 6
class class-default
set qos-group 0
!
policy-map CE_EGRESS_QUEUING
class QOS5
priority
police percent 20
class QOS3
bandwidth remaining percent 40
random-detect discard-class 3 1000 1500
random-detect discard-class 4 1200 1500
class QOS6
bandwidth remaining percent 5
class QOS0
bandwidth remaining percent 55
random-detect default
!
policy-map CE_EGRESS_QUEUING_PARENT
class class-default
shape average 100 m
service-policy CE_EGRESS_QUEUING
int GigabitEthernet0/0/0/0.3344
service-policy input CE_INGRESS_POLICE
service-policy output CE_EGRESS_QUEUING_PARENT
int GigabitEthernet0/0/0/0.3144
service-policy input EXP_TO_QOS_GROUP
int GigabitEthernet0/0/0/0.3134
service-policy input EXP_TO_QOS_GROUP
CE to PE shaping
class-map EF
match dscp ef
class-map AF3
match dscp af31 af32 af33
class-map AF4
match dscp af41 af42 af43
class-map CS6
match dscp cs6
!
policy-map QUEUING
class EF
priority 25000
class AF3
bandwidth percent 15
queue-limit 50 ms
random-detect dscp-based
random-detect dscp af33 30 ms 50 ms 5
random-detect dscp af32 35 ms 50 ms 5
random-detect dscp af32 40 ms 50 ms 5
class AF4
bandwidth percent 10
queue-limit 30 ms
random-detect dscp-based
random-detect dscp af43 20 ms 30 ms 5
random-detect dscp af42 22 ms 30 ms 5
random-detect dscp af41 25 ms 30 ms 5
class CS6
bandwidth percent 5
class class-default
fair-queue
!
policy-map 100M_SHAPE
class class-default
shape average 100 m
service-policy QUEUING
#CSR5
int GigabitEthernet2.3311
service-policy output 100M_SHAPE
#CSR6
int GigabitEthernet2.3322
service-policy output 100M_SHAPE
#CSR7
int GigabitEthernet2.3333
service-policy output 100M_SHAPE
#CSR4
int GigabitEthernet2.3344
service-policy output 100M_SHAPE
#CSR1, 2, 3
mpls traffic-eng signalling advertise explicit-null
mpls traffic-eng signalling interpret explicit-null verbatim ! Not strictly necessary in this case
mpls ldp explicit-null
#XR8
mpls traffic-eng
signalling advertise explicit-null
!
mpls ldp
address-family ipv4
label
local
advertise
explicit-null
Explanation
High-Level Overview
This extensive lab uses multiple technologies to achieve a comprehensive MPLS core QoS design. The core uses DiffServ for QoS in the data plane, and MPLS-TE with DS-TE for accomodating bandwidth reservations on a DiffServ-aware basis in the control plane. Traffic is selected to be forwarded down the TE tunnels via the EXP value. By using these separate tools - DS-TE, CBTS/PBTS, and DiffServ QoS, we can produce a unified QoS solution.
Additionally there is some complexity at the PE-CE edge. The CEs implement outbound shaping in order to ensure they do not burst above the PE’s ingress policer. The PEs mark traffic into one of four queues which are identified in the core based on EXP value. The MPLS DiffServ mode is “pipe mode,” in which the SP’s marking is not translated into the customer’s tunneled marking, and the egress PE makes a queuing decision based on the EXP marking. For this to work we should turn off PHP (by advertising expnull via LDP and MPLS-TE), and we must translate incoming EXP values to QoS group values, because the EXP value is lost when doing queuing outbound towards the CE.
MPLS-TE
This lab uses MPLS-TE with DS-TE in RDM mode (the default). First we must enable MPLS-TE for IOS-XE and IOS-XR. We also specify our own TE-class definition. Make sure to mark TE-classes 4 through 7 as unused. If you forget to do this for a class for which the router has a default definition, it will be used in addition to your custom defintions.
Next we allocate bandwidth for each interface using the RDM model. In this model, BC0 can use any unused bandwidth from BC1. For this reason we simply specify BC0 as the total bandwidth and BC1 as its own bandwidth. In our custom TE-Class definitions, we prevent BC0 from being able to ever preempt BC1 tunnels. Class-type 0 can only use priorities 2 and 3, while class-type 1 is always priority 0 or 1.
#CSR1
int GigabitEthernet1.3111
mpls traffic-eng tunnels
ip rsvp bandwidth rdm bc0 1000000 bc1 100000
#XR1
mpls traffic-eng
int GigabitEthernet0/0/0/0.3012
int GigabitEthernet0/0/0/0.3013
int GigabitEthernet0/0/0/0.3111
int GigabitEthernet0/0/0/0.3112
int GigabitEthernet0/0/0/0.3211
rsvp
int GigabitEthernet0/0/0/0.3012
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3013
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3111
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3112
bandwidth rdm bc0 1 g bc1 100 m
int GigabitEthernet0/0/0/0.3211
bandwidth rdm bc0 1 g bc1 100 m
We then define our TE tunnel interfaces. In this lab we are pretending that all voice traffic is traversing XR8, as if there is a media server behind this PE. So we only need to build TE LSPs between all PEs and XR8. We are asked to ensure that EXP5 traffic uses this LSP which we can accomplish by using CBTS/PBTS. Since we need to use autoroute announce on this TE LSP, the only way to ensure that all other traffic uses the IGP path is to build a second tunnel for “exp default” that simply uses the IGP metric for the optimization of the LSP.
#CSR1
interface Tunnel0
description TE_CLASS0_EXP5
ip unnumbered Loopback0
tunnel mode mpls traffic-eng
tunnel destination 10.0.0.8
tunnel mpls traffic-eng priority 0 0
tunnel mpls traffic-eng bandwidth 25000 class-type 1
tunnel mpls traffic-eng path-option 1 dynamic
tunnel mpls traffic-eng exp 5 ! This tunnel is only used for EXP5 traffic
!
interface Tunnel1
description DEFAULT
ip unnumbered Loopback0
tunnel mode mpls traffic-eng
tunnel destination 10.0.0.8
tunnel mpls traffic-eng priority 3 3
tunnel mpls traffic-eng path-option 1 dynamic
tunnel mpls traffic-eng path-selection metric igp ! This tunnel is built using the IGP metric
tunnel mpls traffic-eng exp default ! This tunnel carries everything besides EXP5 traffic
!
interface Tunnel100 ! This tunnel is used as the master tunnel for the EXP bundle
description CBTS_MASTER_TUN
ip unnumbered Loopback0
tunnel mode mpls traffic-eng
tunnel destination 10.0.0.8
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng exp-bundle master
tunnel mpls traffic-eng exp-bundle member Tunnel0
tunnel mpls traffic-eng exp-bundle member Tunnel1
On XR8 we create two tunnels per each of the three PEs. One tunnel uses EXP5 and one tunnel uses the default EXP. On IOS-XR we don’t need to use a master EXP bundle tunnel like we do on IOS-XE.
Remember to configure MPLS-TE exp-null and LDP exp-null to ensure that we don’t lose the EXP value on the penultimate hop. This is needed in Pipe mode so that the egress PE performs egress queuing based on the MPLS EXP QoS and not the customer’s QoS marking.
#CSR1, 2, 3
mpls traffic-eng signalling advertise explicit-null
mpls traffic-eng signalling interpret explicit-null verbatim ! Not strictly necessary in this case
mpls ldp explicit-null
#XR8
mpls traffic-eng
signalling advertise explicit-null
!
mpls ldp
address-family ipv4
label
local
advertise
explicit-null
CE outbound shaping
We’ll now look at the CE’s outbound shaping policies. The CE should make sure to shape to the rate that the PE is policing to minimize packet loss due to policer drops. Additionally, the CE can prioritize certain classes of traffic by giving them gauranteed bandwidth or priority.
class-map EF
match dscp ef
class-map AF3
match dscp af31 af32 af33
class-map AF4
match dscp af41 af42 af43
class-map CS6
match dscp cs6
!
policy-map QUEUING
class EF
priority 25000
class AF3
bandwidth percent 15
queue-limit 50 ms
random-detect dscp-based
random-detect dscp af33 30 ms 50 ms 5
random-detect dscp af32 35 ms 50 ms 5
random-detect dscp af32 40 ms 50 ms 5
class AF4
bandwidth percent 10
queue-limit 30 ms
random-detect dscp-based
random-detect dscp af43 20 ms 30 ms 5
random-detect dscp af42 22 ms 30 ms 5
random-detect dscp af41 25 ms 30 ms 5
class CS6
bandwidth percent 5
class class-default
fair-queue
!
policy-map 100M_SHAPE
class class-default
shape average 100 m
service-policy QUEUING
#CSR5
int gi2.3311
service-policy output 100M_SHAPE
Above, we give EF priority that is policed at 25Mbps during congestion. We give AF3 and AF4 minimium bandwidth guarantees and use WRED for congestion avoidance. The queue for these classes is set based on a msec value. This will be converted to a bytes count based on the bandwidth of the parent policy or parent interface. This is also the case for the custom WRED parameters for which we specify thresholds in time values as well.
PE inbound policing/marking
The PEs do two actions upon ingress from the CEs: police at the CIR/PIR and mark the EXP value.
The PEs use a CIR of 100mbps and PIR of 120mbps. Traffic that is excess is marked down to EXP0. All conforming traffic is marked based on the customer’s DSCP marking. Perhaps there is an accounting mechanism to account for priority/real-time traffic and charge above a certain threshold for this to discourage customers from marking all their traffic as priority.
#IOS-XE
class-map DSCP_EF
match dscp ef
class-map match-any DSCP_AF3_AF4_CS6
match dscp af31 af32 af33
match dscp af41 af42 af43
match dscp cs3
!
policy-map CE_INGRESS_MARKING
class DSCP_EF
set mpls exp imposition 5
class DSCP_AF3_AF4_CS6
set mpls exp imposition 4
class class-default
set mpls exp imposition 0
!
policy-map CE_INGRESS_POLICE
class class-default
service-policy CE_INGRESS_MARKING
police cir 100 m pir 120 m
conform-action transmit
exceed-action set-mpls-exp-imposition-transmit 0
violate-action drop
#CSR1
int GigabitEtherne2.3311
service-policy input CE_INGRESS_POLICE
#XR8
class-map DSCP_EF
match dscp ef
class-map match-any DSCP_AF3_AF4_CS6
match dscp af31 af32 af33
match dscp af41 af42 af43
match dscp cs3
!
policy-map CE_INGRESS_MARKING
class DSCP_EF
set mpls exp imposition 5
class DSCP_AF3_AF4_CS6
set mpls exp imposition 4
class class-default
set mpls exp imposition 0
!
policy-map CE_INGRESS_POLICE
class class-default
service-policy CE_INGRESS_MARKING
police rate 100 mbps peak-rate 120 mbps
conform-action transmit
exceed-action set mpls experimental imposition 0
violate-action drop
int GigabitEthernet0/0/0/0.3344
service-policy input CE_INGRESS_POLICE
PE outbound queuing to the CE
The PEs are using pipe mode, so they must translate the EXP marking ingress from the core to an internal QoS-group marking. Additionally we want to do WRED, so we set a discard-class marking as well.
#IOS-XE
class-map EXP5
match mpls exp top 5
class-map EXP3
match mpls exp top 3
class-map EXP4
match mpls exp top 4
class-map CONTROL
match mpls exp top 6
!
policy-map EXP_TO_QOS_GROUP
class EXP5
set qos-group 5
class EXP3
set qos-group 3
set discard-class 3
class EXP4
set qos-group 3
set discard-class 4
class CONTROL
set qos-group 6
class class-default
set qos-group 0
set discard-class 0
#CSR1
int GigabitEthernet2.3111
service-policy input EXP_TO_QOS_GROUP
#XR8
class-map EXP5
match mpls exp top 5
class-map EXP3
match mpls exp top 3
class-map EXP4
match mpls exp top 4
class-map CONTROL
match mpls exp top 6
!
policy-map EXP_TO_QOS_GROUP
class EXP4
set qos-group 5
class EXP3
set qos-group 3
set discard-class 3
class EXP4
set qos-group 3
set discard-class 4
class CONTROL
set qos-group 6
class class-default
set qos-group 0
int GigabitEthernet0/0/0/0.3144
service-policy input EXP_TO_QOS_GROUP
int GigabitEthernet0/0/0/0.3134
service-policy input EXP_TO_QOS_GROUP
Next we can use our core policy for outbound queuing to the CE, but we use QoS group values instead of EXP values. We also use discard-class values for WRED instead of EXP.
#IOS-XE
class-map QOS5
match qos-group 5
class-map QOS3
match qos-group 3
class-map QOS6
match qos-group 6
class-map QOS0
match qos-group 0
!
policy-map CE_EGRESS_QUEUING
class QOS5
priority percent 20
class QOS3
bandwidth remaining percent 40
random-detect discard-class-based
class QOS6
bandwidth remaining percent 5
class QOS0
bandwidth remaining percent 55
random-detect discard-class-based
!
policy-map CE_EGRESS_QUEUING_PARENT
class class-default
shape average 100 m
service-policy CE_EGRESS_QUEUING
!
!
#CSR1
int GigabitEthernet2.3311
service-policy output CE_EGRESS_QUEUING_PARENT
#XR8
class-map QOS5
match qos-group 5
class-map QOS3
match qos-group 3
class-map QOS6
match qos-group 6
class-map QOS0
match qos-group 0
!
policy-map CE_EGRESS_QUEUING
class QOS5
priority
police percent 20
class QOS3
bandwidth remaining percent 40
random-detect discard-class 3 1000 1500
random-detect discard-class 4 1200 1500
class QOS6
bandwidth remaining percent 5
class QOS0
bandwidth remaining percent 55
random-detect default
!
policy-map CE_EGRESS_QUEUING_PARENT
class class-default
shape average 100 m
service-policy CE_EGRESS_QUEUING
int GigabitEthernet0/0/0/0.3344
service-policy output CE_EGRESS_QUEUING_PARENT
Core QoS Policy
Lastly, we look at the MPLS core QoS DiffServ policy. We police priority traffic to 20% of link bandwidth, which in this lab will always be 200M. This provides oversubscription for priority traffic, since we are doing a 100M reservation for CT1 on every link. This gives us a buffer to ensure that we are unlikely to drop priority traffic. This is how we align the data plane QoS policy with the DS-TE control plane reservations.
We also have a few other classes: a “priority” class is for high priority data traffic. We give it a large percent of gauranteed bandwidth and use WRED for congestion management. Control traffic is generally network control/signalling traffic and is guaranteed 5 percent bandwidth.
This queuing policy is applied outbound to every core interface.
#IOS-XR
class-map REAL_TIME
match mpls exp top 5
class-map PRIORITY
match mpls exp top 3 4
class-map CONTROL
match mpls exp top 6
!
policy-map CORE_QUEUING
class REAL_TIME
priority
police rate percent 20
class PRIORITY
bandwidth remaining percent 40
random-detect exp 3 1000 1500
random-detect exp 4 1200 1500
class CONTROL
bandwidth remaining percent 5
class class-default
bandwidth remaining percent 55
random-detect exp 0 500 1000
#XR1
int GigabitEthernet0/0/0/0.3012
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3013
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3111
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3112
service-policy output CORE_QUEUING
int GigabitEthernet0/0/0/0.3211
service-policy output CORE_QUEUING
#IOS-XE
class-map REAL_TIME
match mpls exp top 5
class-map PRIORITY
match mpls exp top 3 4
class-map CONTROL
match mpls exp top 6
!
policy-map CORE_QUEUING
class REAL_TIME
priority percent 20
class PRIORITY
bandwidth remaining percent 40
random-detect precedence-based
class CONTROL
bandwidth remaining percent 5
class class-default
bandwidth remaining percent 55
random-detect precedence-based
!
policy-map CORE_QUEUING_PARENT
class class-default
shape average 1 g
service-policy CORE_QUEUING
#CSR1
int GigabitEthernet2.3111
service-policy output CORE_QUEUING_PARENT