Configuring a QoS policy for layer 4 TCP/UDP traffic (Example)
The following example shows how to configure a rate limiting policy for TCP/UDP application streams and apply the policy on all inbound switch ports.
switch(config)# class ipv4 http switch(config-class)# match tcp any any eq 80 switch(config-class)# match tcp any any eq 443 switch(config-class)# match tcp any any eq 8080 switch(config-class)# exit switch(config)# class ipv4 kazaa switch(config-class)# match tcp any eq 1214 any switch(config-class)# match tcp any any eq 1214 switch(config-class)# exit switch(config)# class ipv4 gnutella switch(config-class)# match tcp any range 6346 6347 any switch(config-class)# match tcp any any range 6346 6347 switch(config-class)# match udp any range 6346 6347 any switch(config-class)# match udp any any range 6346 6347 switch(config-class)# exit switch(config)# policy qos PrioritizeSuspectTraffic switch(config-policy)# class ipv4 http action rate-limit kbps 7000 switch(config-policy)# class ipv4 kazaa action rate-limit kbps 3500 switch(config-policy)# class ipv4 gnutella action rate-limit kbps 3500 switch(config-policy)# exit switch(config)# interface all service-policy PrioritizeSuspectTraffic in