The topology that depicts the configuration and implementation of Uniform and Short Pipe modes is shown in Figure 13-13. The network consists of two CE routers, CE1-A and CE2-A, belonging to Customer A’s VPN (VPNA). The SP network consists of two PE routers, PE1-AS1 and PE2-AS1, connected to CE1-A and CE2-A, respectively. OSPF PE to CE has been implemented on these routers, and it is assumed that the VPN has been configured prior to implementing the QoS parameters. Only the configurations pertaining to QoS have been depicted for brevity.
The traffic profile from the traffic generator consists of three simultaneous streams, each with different IP Precedence values, as shown in Figure 13-13. Each traffic generator port sends packets at an aggregate rate of 1 Mbps and each stream consists of 100,000 packets for an aggregate of 300,000 packets generated per port on the traffic generator. The CE routers, upon receiving this traffic, either police or perform CBWFQ-LLQ and forward the packets to their attached PE routers. The PE routers classify ingress packets from the CE routers based on their associated IP Precedence values. Upon classification, the PE router then marks each IP packet with a corresponding MPLS EXP value on egress to map QoS in the IP domain to MPLS QoS. All changes (re-marking) in the core from a MPLS EXP perspective are propagated in the label stack and into the IP packet in Uniform mode operation. In Pipe Mode operation, all packets are handled on ingress similar to Uniform mode, but changes in QoS are implemented in the core and not propagated into the IP packet on the egress from PE to CE. Therefore, in Short Pipe mode operation, the MPLS domain QoS changes are not propagated upward to the IP QoS domain.
The traffic generator generates five streams between the same set of IP addresses from 172.16.3.2 to 172.16.4.2, each stream with different IP Precedence values attached to the IP packet.
The following steps outline the configurations on the appropriate routers to implement Uniform mode QoS implementation with MPLS:
Step 1. | CE router configuration—CE routers, CE1-A and CE2-A, accept traffic from the traffic generator ports directly connected to them and implement QoS functionality based on the class of traffic for each of the five streams. CBWFQ with LLQ is implemented on the CE routers egress to the PE routers. The CE router, therefore, requires the configuration of a class map for each class to identify the characteristics of the class. In addition, each CE router also requires the definition of a QoS policy to be associated with these classes by configuration of a policy map. Finally, the configured policy map is applied to the interface connecting the CE to the PE routers using the service-policy command. Configuration of the CE Router CE1-A is shown in Example 13-1. In LLQ, the Precedence 5 (EF) traffic is given strict priority by the implementation of the priority command for the class precedence5. Note that in the configuration shown in Example 13-1, bandwidth not associated to any of the classes will be applied to best-effort traffic or non-marked (IP Precedence) traffic. Example 13-1. CE1-A Configuration
| |
Step 2. | PE routers—IP to MPLS domain configuration—On the PE routers, packets are received with different IP Precedence values from the attached CE routers. Therefore, the PE routers can map or assign class based on ingress packet IP Precedence. A class map is configured on the PE routers to match packets based on IP Precedence of 5, 3, and 1, and a policy map is configured for a QoS action of setting the MPLS EXP bits mapping to ingress IP Precedence. Depending on the version of IOS and platform in use, the action can be either set mpls experimental topmost or the set mpls experimental imposition. However, note that to use the set mpls experimental imposition command, the service policy should be applied on input and, therefore, must be associated to the PE-CE interface on PE routers. While using the set mpls experimental topmost command, the policy can be applied on the ingress interface into the MPLS domain (PE to P router interface). Example 13-2 outlines the configuration of PE Router PE1-AS1. The configuration is broken down into ingress (from CE) actions and egress (to P) actions as well as classification, marking, and QoS operations. Example 13-2. PE1-AS1 IP2MPLS Condition Configuration
| |
Step 3. | P router—MPLS EXP rewrite—To demonstrate Uniform mode operation, the P1-AS1 router is configured to rewrite the MPLS EXP bit to 1 for all traffic coming in with EXP value of 3. This is done using a class map matching all packets with MPLS EXP bit value of 3 (as marked by the PE routers) and rewriting the same with the use of a policy map. Because QoS from CE1 to CE2 is being demonstrated with these examples, the service policy is implemented on the ingress interface from PE1-AS1 to P1-AS1 where the MPLS EXP bits match and QoS group setting is performed. On egress to PE2, the QoS group is matched and is mapped to the topmost label EXP value on the egress labeled packets. Example 13-3 outlines the configuration of P1-AS1 router. Example 13-3. P1-AS1 MPLS2MPLS Condition Configuration
| |
Step 4. | PE router configuration—MPLS to IP domain—In Uniform mode operation, when the packet transits the MPLS domain into the IP domain, the EXP value of the top-most label is propagated into the IP domain from the MPLS domain and is written as the IP Precedence value of the IP packet. A class map is configured matching all packets with MPLS EXP of 5 and 1. A corresponding policy map is configured to configure qos-group value of the packet to the corresponding IP Precedence value. This is applied on the ingress from P1-AS1 to PE2-AS1. A class map matching the QoS group is then configured, and a policy map is configured to mark the IP Precedence value to the QoS group value. This policy map is then applied on egress from PE2-AS1 to CE2-A. Example 13-4 outlines the MPLS to IP domain configuration on the PE Router PE2-AS1. Example 13-4. PE2-AS1 MPLS2IP Condition Configuration
| |
Step 5. | Verification of Uniform Mode Operation—Example 13-5 outlines the show commands as performed on the different routers in the path from CE1-A to CE2-A via the MPLS domain. A total number of 100,000 packets per class (individual IP Precedence values) are transmitted via the network prior to performing the verification. A truncated output has been performed for all routers in the path for brevity. However, the actual classes that are mapped on each router are shown in Example 13-5. Example 13-5. Verification of Uniform Mode
|
Note that on PE2-AS1 ingress and egress interfaces, the number of packets matching the MPLS EXP value of 1 is twice the number of packets matching the MPLS EXP value of 5 due to the rewrite of EXP value performed at P1-AS1. This verifies that in the implementation of Uniform mode, the MPLS EXP values are copied back onto the IP packet IP Precedence values as they traverse the MPLS domain back into the IP domain of the customer. To further verify Uniform mode implementation, a generic service policy is configured on the CE2 ingress interface, and, upon verification, it is evident that the IP Precedence value has been rewritten based on the MPLS EXP bit rewrite in the MPLS domain. The configuration of CE2 is shown in Example 13-6.
class-map match-all precedence1 match ip precedence 1 class-map match-all precedence5 match ip precedence 5 ! policy-map verify class precedence5 police 10000000 1000000 1000000 conform-action transmit exceed-action drop class precedence1 police 10000000 1000000 1000000 conform-action transmit exceed-action drop interface POS1/0/0 ip address 172.16.2.1 255.255.255.0 service-policy input verify __________________________________________________________________________ CE2-A#show policy-map interface pos1/0/0 in | include packets 100000 packets, 5000000 bytes--------------class precedence5 conformed 100000 packets, 5000000 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop 200000 packets, 10000000 bytes--------------class precedence1 conformed 100000 packets, 5000000 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop 0 packets, 0 bytes 0 packets, 0 bytes |
Note that all the previous configurations depicted unidirectional QoS with the implementation of QoS and Uniform mode downstream toward 172.16.4.2 from 172.16.3.2. In real-world networks, QoS is bidirectional between a set of devices, networks, or customer sites. The configurations to implement the QoS for traffic flowing downstream to 172.16.3.2 can be easily derived by mirroring the configurations illustrated earlier in Example 13-1 through Example 13-5. Example 13-7 through Example 13-10 illustrate the complete configurations for all devices for bidirectional QoS.
class-map match-all precedence5 match ip precedence 5 class-map match-all precedence3 match ip precedence 3 class-map match-all precedence1 match ip precedence 1 ! policy-map CEQoS class precedence5 priority class precedence3 bandwidth percent 30 random-detect class precedence1 bandwidth percent 20 ! class-map match-all precedence1 match ip precedence 1 class-map match-all precedence5 match ip precedence 5 ! policy-map verify class precedence5 police 10000000 1000000 1000000 conform-action transmit exceed-action drop class precedence1 police 10000000 1000000 1000000 conform-action transmit exceed-action drop ! interface pos 1/1/0 service-policy output CEQoS service-policy input verify |
! PE1-AS1 configuration class-map match-all qosgroup50 match qos-group 50 class-map match-all qosgroup10 match qos-group 10 ! class-map match-all qosgroup3 match qos-group 3 class-map match-all qosgroup1 match qos-group 1 class-map match-all qosgroup5 match qos-group 5 ! class-map match-all precedence1 match ip precedence 1 class-map match-all precedence3 match ip precedence 3 class-map match-all precedence5 match ip precedence 5 ! class-map match-all mplsexp5 match mpls experimental 5 class-map match-all mplsexp1 match mpls experimental 1 ! policy-map ip2mplsin class precedence5 set qos-group 5 class precedence3 set qos-group 3 class precedence1 set qos-group 1 ! policy-map mpls2ipin class mplsexp5 set qos-group 50 class mplsexp1 set qos-group 10 ! policy-map mpls2ipout class qosgroup50 set precedence 5 class qosgroup10 set precedence 1 ! policy-map ip2mplsout class qosgroup5 set mpls experimental topmost 5 priority class qosgroup3 set mpls experimental topmost 3 bandwidth 10000 random-detect class qosgroup1 set mpls experimental topmost 1 bandwidth 10000 random-detect ! interface POS0/0 description connection to P1 service-policy input mpls2ipin service-policy output ip2mplsout ! interface POS0/1 ip vrf forwarding VPNA service-policy input ip2mplsin service-policy output mpls2ipout ! _________________________________________________________________________ ! PE2-AS1 configuration class-map match-all qosgroup30 match qos-group 30 class-map match-all qosgroup10 match qos-group 10 class-map match-all qosgroup50 match qos-group 50 ! class-map match-all qosgroup1 match qos-group 1 class-map match-all qosgroup5 match qos-group 5 ! class-map match-all precedence1 match ip precedence 1 class-map match-all precedence3 match ip precedence 3 class-map match-all precedence5 match ip precedence 5 ! class-map match-all mplsexp5 match mpls experimental 5 class-map match-all mplsexp1 match mpls experimental 1 ! policy-map ip2mplsin class precedence5 set qos-group 50 class precedence3 set qos-group 30 class precedence1 set qos-group 10 policy-map mpls2ipin class mplsexp5 set qos-group 5 class mplsexp1 set qos-group 1 policy-map mpls2ipout class qosgroup5 set precedence 5 class qosgroup1 set precedence 1 policy-map ip2mplsout class qosgroup50 set mpls experimental topmost 5 priority class qosgroup30 set mpls experimental topmost 3 bandwidth 10000 random-detect class qosgroup10 set mpls experimental topmost 1 bandwidth 10000 random-detect ! interface POS0/0 description connection to P1 service-policy input mpls2ipin service-policy output ip2mplsout ! interface POS0/1 ip vrf forwarding VPNA service-policy input ip2mplsin service-policy output mpls2ipout |
class-map match-all qosgroup2 match qos-group 2 class-map match-all qosgroup3 match qos-group 3 class-map match-all qosgroup1 match qos-group 1 ! class-map match-any mplsexp3 match mpls experimental 3 ! policy-map mpls2mplsin class mplsexp3 set qos-group 3 ! policy-map mpls2mplsout class qosgroup3 set mpls experimental topmost 1 ! interface POS0/0 description connection to PE1-AS1 ip address 10.10.10.2 255.255.255.252 service-policy input mpls2mplsin service-policy output mpls2mplsout ! interface POS0/1 description connection to PE2-AS1 service-policy input mpls2mplsin service-policy output mpls2mplsout |
class-map match-all precedence5 match ip precedence 5 class-map match-all precedence3 match ip precedence 3 class-map match-all precedence1 match ip precedence 1 policy-map CEQoS class precedence5 priority class precedence3 bandwidth percent 30 random-detect class precedence1 bandwidth percent 20 class-map match-all precedence1 match ip precedence 1 class-map match-all precedence5 match ip precedence 5 ! policy-map verify class precedence5 police 10000000 1000000 1000000 conform-action transmit exceed-action drop class precedence1 police 10000000 1000000 1000000 conform-action transmit exceed-action drop ! interface pos 1/1/0 service-policy output CEQoS service-policy input verify |
Short Pipe mode is implemented the same as Uniform mode except on the egress MPLS2IP condition. In Short Pipe mode, the label EXP value is not copied back onto the IP packet Precedence or DSCP values in the egress MPLS2IP condition. Therefore, in comparison to the Uniform mode configurations shown in the prior section, the only changes in configuration will have to be on Routers PE1-AS1 and PE2-AS1 where the MPLS EXP bit rewrite in the core is not propagated back into the IP packet IP Precedence values. Consequently, in Short Pipe mode, the configuration of the PE1-AS1 and PE2-AS1 routers will not involve any IP Precedence rewrite based on ingress MPLS EXP bit values from the MPLS to the IP domain. Example 13-11 outlines the configurations of Routers PE1-AS1 and PE2-AS1 for the implementation of Short Pipe mode. Note the absence of the mpls2ipin and mpls2ipout policies mapping the ingress MPLS EXP values to egress IP Precedence values in comparison to Example 13-8 for PE1-AS1 and PE2-AS1. Only QoS-related configurations have been shown for brevity.
! PE1-AS1 configuration class-map match-all qosgroup3 match qos-group 3 class-map match-all qosgroup1 match qos-group 1 class-map match-all qosgroup5 match qos-group 5 ! class-map match-all precedence1 match ip precedence 1 class-map match-all precedence3 match ip precedence 3 class-map match-all precedence5 match ip precedence 5 ! policy-map ip2mplsin class precedence5 set qos-group 5 class precedence3 set qos-group 3 class precedence1 set qos-group 1 ! policy-map ip2mplsout class qosgroup5 set mpls experimental topmost 5 priority class qosgroup3 set mpls experimental topmost 3 bandwidth 10000 random-detect class qosgroup1 set mpls experimental topmost 1 bandwidth 10000 random-detect ! interface POS0/0 description connection to P1 service-policy output ip2mplsout ! interface POS0/1 ip vrf forwarding VPNA service-policy input ip2mplsin _________________________________________________________________________ ! PE2-AS1 configuration class-map match-all qosgroup30 match qos-group 30 class-map match-all qosgroup10 match qos-group 10 class-map match-all qosgroup50 match qos-group 50 ! class-map match-all precedence1 match ip precedence 1 class-map match-all precedence3 match ip precedence 3 class-map match-all precedence5 match ip precedence 5 ! policy-map ip2mplsin class precedence5 set qos-group 50 class precedence3 set qos-group 30 class precedence1 set qos-group 10 policy-map ip2mplsout class qosgroup50 set mpls experimental topmost 5 priority class qosgroup30 set mpls experimental topmost 3 bandwidth 10000 random-detect class qosgroup10 set mpls experimental topmost 1 bandwidth 10000 random-detect ! interface POS0/0 description connection to P1 service-policy output ip2mplsout ! interface POS0/1 ip vrf forwarding VPNA service-policy input ip2mplsin |
As seen in the configurations for the PE routers, the only difference in the implementation of Short Pipe mode and Uniform mode is that on egress from the PE to CE routers, any changes in the MPLS EXP bits as the packets traverse the core are not propagated back into the IP header precedence bits. This mode is implemented if the QoS implemented by the SP is required to be independent of the customer’s QoS policy. The IP packet PHB or QoS implementation on the router as the packet undergoes an MPLS2IP condition is based on the resulting IP packet’s DSCP/IP Precedence value. Short Pipe and Pipe modes are different only on the basis of what criteria are used to implement the egress QoS PHB from the PE to the CE.