Quality of Service, Part III

Introduction

 

This month we continue looking at Quality of Service (QoS) in Cisco devices.

This article looks at

  • Traffic Shaping
  • Policy Routing
  • QoS Policy Propagation via BGP (QPPB)

Traffic Shaping

 

About Traffic Shaping

Traffic Shaping comes in two forms: Generic Traffic Shaping and Frame Relay Traffic Shaping.

Traffic Shaping allows you to control how fast packets are sent out an interface, any interface. You might want to do this to avoid congestion either locally or elsewhere in your network, for example if you have a network with different access rates or if you are restricting some traffic to a fraction of the available bandwidth. For example, if one end of the link in a Frame Relay network is 256 Kbps and the other end of the link is only 128 Kbps, sending packets at 256 Kbps at the very least causes congestion. Somewhere.

You can traffic shape all traffic on an interface, or use an access list to specify certain traffic. On Frame Relay interfaces, additional per-virtual-circuit features are available with Frame Relay Traffic Shaping.

Traffic shaping is not supported with optimum, distributed, or flow switching. If you enable traffic shaping, all interfaces will revert to fast switching.

 

Configuring Generic Traffic Shaping

 

The former command traffic shapes all traffic on an interface. The latter uses an access-list to specify which traffic is to be traffic shaped.

bit-rate: Bit rate that traffic is shaped to in bits per second.

burst-size: Sustained number of bits that can be transmitted per interval. The default is the bit-rate divided by 8.

excess-burst-size: Maximum number of bits that can exceed the burst size in the first interval in a congestion event. The default is equal to the burst-size.

The measurement interval is calculated by dividing the burst-size (if non-zero) by the bit rate. If the burst-size is zero, the excess-burst-size is used (if non-zero).

For Frame Relay, you can use:

This command uses the configured bit rate as a lower bound, with the bit rate specified by the traffic-shape rate command as the upper bound for bandwidth. The actual rate that the traffic is shaped to lies between those two rates. It should be configured at both ends of the link because it also configures the devices to reflect forward explicit congestion notifications (FECN’s) as BECN’s, enabling the faster end of the link to adjust to congestion at the other end.

 

Relevant EXEC Commands

 

 

Sample Configuration

 

Frame Relay Traffic Shaping

 

The Frame Relay traffic shaping allows

  • rate enforcement per PVC or SVC
  • dynamic traffic throttling in response to BECN packets
  • custom or priority queuing per virtual circuit

The intent is to allow guaranteed bandwidth for each type of traffic. The queuing features let us prioritize per-circuit, and the rate enforcement makes sure that we won’t have a burst on one virtual circuit denying access line bandwidth to the others.

 


Policy Routing

About Policy Routing

Policy routing is the name given to use of a route map on packets to influence the routing decision. The routing next hop or output interface can be chosen based on inbound interface, source, or type of traffic. The IP precedence can also be set by the route map.

If you’re choosing outbound interface or next hop in response to destination, then you’re doing normal routing, subject to some policy perhaps. Policy routing in the Cisco world refers specifically to routing based on source or other traffic characteristics, other than destination. Since this may have performance impact, use it only where needed and appropriate.

Policy routing has performance impact: it is process or fast switched. It is therefore suitable for setting precedence at low speed edge routers, but not elsewhere.

 

Configuring Policy Routing

To specify use of a route-map for policy routing on an interface, configure:

The route map blocks then are defined using:

Route-map match conditions used for policy routing can match either packet length or an IP extended access list.

To match the Layer 3 length of the packet, use:

To match IP sources and destinations based on standard or extended access list(s):

The route-map block’s set conditions can specify precedence value, next-hop for IP routing, or output interface.

To set the precedence value in the IP header:

To specify the next hop to which to route the packet (it need not be adjacent):

To specify the output interface(s) for the packet:

To specify the default route next hop for use when there is no explicit route:

To specify the default output interface(s) for use when there is no explicit route:

Fast-switched policy routing supports all of the match commands and most of the set commands, except for the set ip default command and some use of the set interface command. The set interface command is supported only over point-to-point links, unless a route-cache entry exists using the same interface specified in the set interface command in the route map.

When process switching policy routing, the routing table is used to check output interface sanity. During fast switching, if the packet matches, the software blindly forwards the packet to the specified interface. To configure fast-switched policy routing on an interface:

Packets generated by the router are not normally policy-routed. To enable local policy routing of such packets, specify the route map to use. This is a global configuration mode command.

Related EXEC Commands

 

Sample Configuration

 

The following example provides two sources with equal access to two different service providers. Packets arriving on serial interface 1 from 1.1.1.1 are sent to the next hop 3.3.3.3 if there is no explicit route for the packet’s destination. Packets arriving from 2.2.2.2 are sent to the next hop 4.4.4.4 there is no explicit route for the packet’s destination. All other packets for which the router has no explicit route to the destination are discarded.


QoS Policy Propagation via BGP (QPPB)

 

About QPPB

QoS Policy Propagation via BGP (QPPB) allows you to classify packets based on access lists, BGP community lists, and BGP AS paths. The classification can then set either IP precedence (a global tagging scheme), or internal QoS group identifier (internal to the router). The BGP community can also contain both AS and IP precedence information — see the second example below. After classification, other QoS features such as CAR and WRED can then be used to enforce business policy.

Note that this allows you to set up a policy at one BGP speaking router, and propagate that to other routers via BGP. Hence the name. This means that at the service provider router connecting to a site, a policy can be set up so that inbound traffic elsewhere is classified into the right class of service (IP Precedence bits). This can then interact with Tag Switching, or MPLS.

If you set the QoS group ID, it can then be used for rate-limiting or WFQ based on QoS group ID. This expands on the classes of service provided by the 8 IP precedence values.

If you use IP precedence, it can now be set based on source or destination address.

Configuring QPPB

Configuring QPPB—ToS

Configuring QPPB—QoS groups

Relevant EXEC Commands

 

Sample Configuration

 

Configuring QPPB on an interface:

Configuring BGP to set QoS groups:

Configuring BGP to set TOS bits (precedence):