Content

| 8.3 |  | Classification at the Access Layer |
| 8.3.8 |  | Using an IP ACL to define the DSCP or precedence |

Using the Modular QoS Command Line Interface (MQC) it is possible to classify traffic based on its IP or TCP properties. In the following example traffic is classified using an IP access-list.

For instance, in order to prevent large FTP downloads from disrupting more critical services, the network administrator tags all FTP packets entering an access-layer switch with either a low IP Precedence of zero, or a low DSCP of zero, so that the traffic can be subjected to QoS policies within the network. In this case, an IP ACL is used to identify the packets:

> Switch(config)#ip access-list extended 100
> Switch(config-ext-nacl)#permit tcp any any eq ftp

Using the Modular QoS CLI (MQC) command class-map, a class can be defined, in this case it is called “reducedservice”, for traffic that does not require high levels of QoS. Traffic is classified as “reducedservice” if it is permitted by the access list.

> Switch(config)#class-map reducedservice
> Switch(config-cmap)#match access-group 100

The MQC command policy-map is used to set the DSCP to 0 (zero) for this class of traffic.

> Switch(config)#policy-map inbound-accesslayer
> Switch(config-pmap)#class reducedservice
> Switch(config-pmap-c)#set ip dscp 0

Alternatively the IP precedence can be set using the following policy-map.

> Switch(config)#policy-map inbound-accesslayer
> Switch(config-pmap)#class reducedservice
> Switch(config-pmap-c)#set ip precedence 0

> Note: Both the Catalyst 2950 and the Catalyst 3550 support the setting of the DSCP. However, only the Catalyst 3550 supports the setting of Precedence. This is not a serious problem as the IP Precedence field forms the first three bits of the DSCP. Therefore, by choosing and setting the appropriate DSCP value, the IP Precedence can still be set.

Now that the action to be taken on FTP packets is defined, the only remaining step is to tell the switch which interfaces to apply the policy to. In this case, the policy will be applied to all the interfaces, so that QoS will be maintained regardless of the interface an FTP source may be connected to.

> Switch(config)#interface range fastethernet 0/1 - 24
> Switch(config-if-range)#service-policy input inbound-accesslayer