enable
configure terminal!
Access List Example (You identify RTP Audio traffic)
ip access-list extended 105
permit udp any any eq 2048
permit udp any any eq 2050
permit udp any any eq 2052
permit udp any any eq 2054
permit udp any any eq 2056
permit udp any any eq 2058
permit udp any any eq 2060
permit udp any any eq 2062
permit udp any any eq 2064
permit udp any any eq 2066
permit udp any any eq 2068
permit udp any any eq 2070
permit udp any any eq 2072
permit udp any any eq 2074
permit udp any any eq 2076
permit udp any any eq 2078
access-list 105 remark *************** RTP Audio Traffic
****************
! Access List Example
(You identify Video and Other Priority Applications traffic)
ip access-list extended 104
permit tcp any any eq 22
permit tcp any any eq 23
permit tcp any any eq 389
permit tcp any any eq 443
permit tcp any any eq 1494
permit tcp any any eq 1503
permit tcp any any eq 2512
permit tcp any any eq 2513
permit tcp any any eq 2598
permit tcp any any eq 2897
permit tcp any any eq 3601
permit tcp any any eq 3603
permit tcp any any eq 3604
permit tcp any any eq 8080
permit tcp any any eq 8082
permit tcp any any eq 9001
permit tcp any any eq 9002
permit tcp any any eq 9005
permit tcp any any eq 27000
permit udp any any eq 161
permit udp any any eq 162
permit udp any any eq 1604
access-list 104 remark ******** Video and Priority Apps Traffic
*********
! Access List Example
(You identify VoIP Control traffic)
ip access-list extended 103
permit tcp any any eq 1039
permit tcp any any eq 1720
permit tcp any any eq 1731
permit tcp any any eq 2945
permit tcp any any eq 3230
permit tcp any any eq 3231
permit tcp any any eq 3232
permit tcp any any eq 3233
permit tcp any any eq 3234
permit tcp any any eq 3235
permit tcp any any eq 5010
permit tcp any any eq 5012
permit udp any any eq 1718
permit udp any any eq 1719
permit udp any any eq 3230
permit udp any any eq 3231
permit udp any any eq 3232
permit udp any any eq 3233
permit udp any any eq 3234
permit udp any any eq 3235
permit udp any any eq 5005
access-list 103 remark ************** VoIP Control Traffic
**************
! Class Map Examples
(Create traffic classes)
class-map match-all CM5-VoIP-RTP-Traffic
description *************** VoIP RTP Traffic Class Map ****************
match access-group 105
match ip dscp 46
exit
class-map match-all CM4-Video-and-Priority-Apps-Traffic
description ******** Video and Priority Apps Traffic Class Map ********
match access-group 104
match ip dscp 34
exit
class-map match-all CM3-VoIP-Control-Traffic
description ************* VoIP Control Traffic Class Map **************
match access-group 103
match ip dscp 26
exit
! Policy Map Example
(Create a QoS policy)
policy-map PM-Enterprise-Traffic
description **************** Enterprise Traffic Policy ****************
class CM5-VoIP-RTP-Traffic
set ip dscp 46
police 5000000 65536 exceed-action dscp 34
exit
class CM4-Video-and-Priority-Apps-Traffic
set ip dscp 34
police 2000000 65536 exceed-action dscp 0
exit
class CM3-VoIP-Control-Traffic
set ip dscp 26
police 1000000 65536 exceed-action dscp 34
exit
exit
! COS to DSCP Map Example (DSCP=COS:
0=0,
8=1,
16=2,
26=3,
34=4,
46=5,
48=6,
56=7)
mls qos map cos-dscp 0 8 16 26 34 46 48 56
! Weighted Round Robin
Example (Traffic shaping with 4 queues specifying COS)
wrr-queue bandwidth 20
20 80
0
wrr-queue cos-map 1 0 1 2
wrr-queue cos-map 2 4
wrr-queue cos-map 3 3 6 7
wrr-queue cos-map 4 5
! Interface Examples
(You apply a policy to specific interfaces)
interface FastEthernet0/1
description Connected to PC with IP
Phone or other VoIP Device
no ip address
no cdp enable
spanning-tree portfast
no logging event link-status
no snmp trap link-status
fair-queue
mls qos trust dscp
exit
interface FastEthernet0/24
description Connected to server or IP PBX gear
no ip address
cdp enable
logging event link-status
snmp trap link-status
fair-queue
speed 100
duplex full
mls qos trust dscp
service-policy input PM-Enterprise-Traffic
exit
interface GigabitEthernet0/1
description Uplink to core switch or other switch
no ip address
cdp enable
logging event link-status
snmp trap link-status
switchport mode trunk
switchport nonegotiate
mls qos trust dscp
service-policy input PM-Enterprise-Traffic
exit
! Quick
way to apply mls qos trust dscp to all interfaces in a range:
interface range fastEthernet 0/1 - 48
mls qos trust dscp
fair-queue
exit
interface range GigabitEthernet 0/1 - 2
mls qos trust dscp
exit
exit
wr |