Vous êtes sur la page 1sur 7

CHAPTER 11: MPLS and QoS

DiffServ with MPLS packets:

Three EXP bits in MPLS header are used for QoS.


If the LSP uses these three bits for QoS, it is called an E-LSP, indicating the
LSR will use EXP bits to schedule the packet and decide on the drop
precedence.
The LSR needs only to look at EXP bits of top label to determine how to treat
this packet.

Default MPLS QoS behaviour in Cisco IOS:


MPLS QoS Rule 1:

By default, the IP precedence bits (or first three bits of DSCP field) of IP header
are copied to the EXP bits of all imposed labels at the ingress LSR.

The default behaviour in Cisco IOS is to copy the IP precedence value to EXP bits
when an IP packet arrives at the ingress LSR. If six bits of DSCP field are used, only
first three bits are copied to the EXP bits of the label.

MPLS QoS Rule 2:

By default, the EXP bits of the incoming label are copied onto the swapped
outgoing label and to any label pushed onto that packet.

Forwarding a label in disposition mode means that the label is popped. When the
router forwards a labelled packet and then issues a POP, the EXP bits are not copied
onto any of the exposed label or to the IP Precedence field (or DSCP field) of the IP
header if the packet becomes unlabeled. Hence, the EXP bits of the newly exposed
label remain unchanged.

MPLS QoS Rule 3:

By default, the EXP bits are not copied to the EXP bits of the newly exposed
label when the incoming label is popped.

MPLS QoS Rule 4:

By default, the EXP bits are not copied to the IP precedence or DSCP field of the
IP header when the incoming label is popped and the packet becomes unlabeled.
MPLS QoS Rule 5:

When you change the EXP bits through manual configuration (using MQC), the
value of the EXP bits in the labels other than the top label, the swapped label, or
the imposed labels and the IP precedence bits or DSCP bits in the IP header
remain unchanged.

Only the top label receives the new manually configured EXP value. The labels
underneath the top label in the label stack do not receive the new EXP value.

Hence, according to Rule 4 & 5, the QoS value of the IP packet can be transported
through the MPLS network without change.

EXP bits Imposition:

If an IP packet arrives at the Ingress LSR, its IP Precedence (or first 3 bits of DSCP
field) is copied to the EXP bits of the label/s.

EXP bits Swapping and Swap + Impose:

If a labeled packet arrives at the LSR, the EXP bits of incoming top label are copied
on to the swapped or newly pushed label/s.

EXP bits Disposition:

If a labeled packet arrives at the LSR and if the top label (or label stack) is popped,
then the EXP bits are not copied to the newly exposed label, or to IP Precedence (or
DSCP bits) of the IP header
DiffServ Tunnelling Models:

The IETF has defined three models to tunnel DiffServ information.


The Tunnelled DiffServ information is the QoS of the labelled packets or the
precedence/DSCP of the IP packets coming into the ingress LSR of the MPLS
network.
The LSP DiffServ information is the QoS (the value of EXP bits) of the MPLS
packets transported on the LSP from the ingress LSR to the egress LSR.
The Tunnelled DiffServ information is the QoS information that needs to get
across the MPLS network transparently.

Pipe Model:

1. On the ingress LSR, the LSP DiffServ information is NOT necessarily (but
might be) derived from the Tunnelled DiffServ information.
2. On P routers, the outgoing LSP DiffServ information is derived from the
incoming LSP DiffServ information.
3. On the egress LSR, the forwarding treatment of the packet is based on the LSP
DiffServ information, and the LSP DiffServ information is NOT propagated
to the Tunnelled DiffServ information.

Short Pipe Model:

1. On the ingress LSR, the LSP DiffServ information is NOT necessarily (but
might be) derived from the Tunnelled DiffServ information.
2. On P routers, the outgoing LSP DiffServ information is derived from the
incoming LSP DiffServ information.
3. On the egress LSR, the forwarding treatment of the packet is based on the
Tunnelled DiffServ information, and the LSP DiffServ information is NOT
propagated to the Tunnelled DiffServ information.

Uniform Model:

1. On the ingress LSR, the LSP DiffServ information MUST be derived from the
Tunnelled DiffServ information.
2. On P routers, the outgoing LSP DiffServ information is derived from the
incoming LSP DiffServ information.
3. On the egress LSR, the LSP DiffServ information MUST be propagated to the
Tunnelled DiffServ information.

Important Points:

By default, PHP is enabled in most MPLS networks. That means, the egress
LSR advertises Implicit Null label to its upstream LSR (aka PHP router).
In that case, the PHP router pops the label and hence the LSP DiffServ
information is lost.
To avoid this behaviour, the egress LSR should advertise Explicit Null label to
its upstream LSR. In this way, the EXP bits information is preserved and
never lost.
In MPLS VPN case, if the P router manipulates the EXP bits of the top label,
the EXP bits information in the bottom label (that was assigned at the ingress
LSR), is still preserved.

MQC Commands for MPLS QoS:


The following command sets the EXP bits in the topmost label-

set mpls experimental topmost <value>

This command can be used in an input or output service policy.

The following command sets the EXP bits in the pushed label/s-

set mpls experimental imposition <value>

This command can be used only in an input service policy.

The value is 0 to 7.

Label imposition:
Label Swapping:

Label Disposition:

MPLS QoS Uniform Model:

CE1 router: CE2 router:

interface Loopback 0 interface Loopback 0


ip address 11.1.1.1 255.255.255.255 ip address 12.1.1.1 255.255.255.255
ip ospf 42 area 0 ip ospf 42 area 0
! !
interface serial 0/0 interface serial 0/0
ip address 172.16.1.2 255.255.255.252 ip address 172.16.2.2 255.255.255.252
ip ospf 42 area 0 ip ospf 42 area 0
! !
class-map match-any TRAFFIC
match any
!
policy-map POLICY
class TRAFFIC
set ip precedence 5
!
PE1 router: PE4 router:

interface Loopback 0 interface Loopback 0


ip address 1.1.1.1 255.255.255.255 ip address 4.4.4.4 255.255.255.255
ip ospf 1 area 0 ip ospf 1 area 0
! !
mpls label protocol ldp mpls label protocol ldp
mpls ldp router-id Loopback 0 force mpls ldp router-id Loopback 0 force
! !
ip vrf CUST1 ip vrf CUST1
rd 1:1 rd 1:1
route-target both 1:1 route-target both 1:1
! !
interface serial 0/0 interface serial 0/0
ip vrf forwarding CUST1 ip vrf forwarding CUST1
ip address 172.16.1.1 255.255.255.252 ip address 172.16.2.1 255.255.255.252
ip ospf 42 area 0 ip ospf 42 area 0
service-policy input EXP_POLICY service-policy output QOSGROUP
! !
router bgp 100 interface fastethernet 0/0
neighbor 4.4.4.4 remote-as 100 ip address 10.2.2.2 255.255.255.252
neighbor 4.4.4.4 update-source Loopback 0 ip ospf 1 area 0
address-family vpnv4 mpls ip
neighbor 4.4.4.4 activate service-policy input EXP-to-IP
exit-address-family !
address-family ipv4 vrf CUST1 router bgp 100
redistribute ospf 42 vrf CUST1 metric 10 match neighbor 1.1.1.1 remote-as 100
internal neighbor 1.1.1.1 update-source Loopback 0
exit-address-family address-family vpnv4
! neighbor 1.1.1.1 activate
router ospf 42 vrf CUST1 exit-address-family
redistribute bgp 100 metric 10 subnets address-family ipv4 vrf CUST1
! redistribute ospf 42 vrf CUST1 metric 10 match
class-map match-any EXP_TRAFFIC internal
match ip precedence 5 exit-address-family
! !
policy-map EXP_POLICY router ospf 42 vrf CUST1
class EXP_TRAFFIC redistribute bgp 100 metric 10 subnets
set mpls experimental imposition 4 !
! class-map match-any EXP-to-IP
match mpls experimental topmost 4
!
policy-map EXP-to-IP
class EXP-to-IP
set qos-group mpls experimental topmost
!
class-map match-any QOSGROUP
match qos-group 4
!
policy-map QOSGROUP
class QOSGROUP
set ip precedence 4
!

Vous aimerez peut-être aussi