QOS Sample config

!

class-map match-all voip

match protocol rtp audio — enables NBAR and automatically selects IP-UDP-RTP audio traffic

class-map match-all bulk1

match access-group 1 —- matches access-list 1

class-map match-any bulk2

match source-address mac 0001.0002.0003

match destination-address mac 0001.0002.0003

!

policy-map input1

class voip

set dscp ef

class bulk1

set ip dscp af11

bandwidth 1000 —  Minimum gurantee bw to 1000 kbps

random-detect cos-based —- wred based on cos  field

police cir 8000 bc 1000 be 1500

conform-action transmit

exceed-action drop

class bulk2

set ip dscp af31

!

interface FastEthernet2/0

service-policy input input1 —- apply it on the input

!

class-map match-all voip1

match ip dscp ef

class-map match-all bulk1-0

match ip dscp af11

class-map match-all bulk2-o

match ip dscp af31

!

policy-map output1

class voip1

priority 10000 —- Configuring strict priority

compress header ip rtp   –— header compression

class bulk1-0

bandwidth percent 10

random-detect dscp-based

random-detect dscp 10 30 50 20 — set min threshold(30), max threshold(50) and MPD (20) for DSCP value 10

class bulk2-o

bandwidth percent 30 —- 30% of interface bandwidth

shape peak 10000

class class-default

fair-queue —- enables WFQ on default class

random-detect dscp-based

random-detect exponential-weighting-constant 10 —- set “n” value in wred calculation

queue-limit 32768 — number of packets in this queue

!

interface FastEthernet2/1

service-policy output output1

!

interface Multilink1 — for MLP (MultiLink PPP) – LFI configuration

ip address 1.1.1.1 255.255.255.0

ppp multilink

ppp multilink interleave — enable interleaving

ppp multilink group 1

ppp multilink fragment delay 10 — configure max. delay.

!

interface Serial1/0

no ip address

encapsulation ppp

ppp multilink

ppp multilink group 1

!

(config-if)#mls qos trust cos — trust all cos values incoming to this port.

!

(config-if)#mls qos trust dscp — trust all dscp values incoming to this port.

!

(config-if)#mls qos trust device cisco-phone — trust all cos values incoming to this port only when IP phone is detected.

!

(config)#wrr-queue cos-map 1 0 1 2 — Weighted round-robin. maps cos value 0,1,2 to queue_id 1

!

(config)#wrr-queue bandwidth 5 10 25 0 — allocates weight to each queue. “0” implies queue_4 is strict priority.

!

map-class frame-relay fr1 —- Frame Relay LFI Using FRF.12

frame-relay cir 96000

frame-relay bc 960

frame-relay holdq 2

frame-relay fragment 20   — configure fragment size in bytes.

frame-relay fecn-adapt

frame-relay fair-queue

service-policy output out1

!

interface Serial1/1

bandwidth 128

no ip address

encapsulation frame-relay

no  shutdown

clock rate 128000

frame-relay traffic-shaping  –— Enable FRTS

!

interface Serial1/1.1 point-to-point

ip address 2.2.2.2 255.255.255.0

frame-relay class fr1 — apply frame-relay map to inteface

frame-relay interface-dlci 101 IETF

!

route-map qppb permit 10 —- For QPPB

match community 2

set ip precedence flash

!

router bgp 1

no synchronization

table-map qppb — this command makes the route-map matched routes to install in routing table with IP precedence

!

interface FastEthernet2/0

bgp-policy source ip-prec-map

!

<when autoqos command is configured on an interface>

(config-if)#auto qos voip trust

<below policy map was automatically generated and applied>

#show policy-map AutoQoS-Policy-Trust

Policy Map AutoQoS-Policy-Trust

Class AutoQoS-VoIP-RTP-Trust

priority 70 (%)

Class AutoQoS-VoIP-Control-Trust

bandwidth 5 (%)

Class class-default

fair-queue

#show class-map AutoQoS-VoIP-RTP-Trust

Class Map match-any AutoQoS-VoIP-RTP-Trust (id 7)

Match ip  dscp ef (46)

#show class-map AutoQoS-VoIP-Control-Trust

Class Map match-any AutoQoS-VoIP-Control-Trust (id 8)

Match ip  dscp cs3 (24)

Match ip  dscp af31 (26)

!

<Various options of police/shape command and its effect>

police 8000;

cir 8000 bps, bc 1500 bytes

conformed 0 packets, 0 bytes; actions:

transmit

exceeded 0 packets, 0 bytes; actions:

drop

police 8000 bc 1000 be 1000

cir 8000 bps, bc 1000 bytes

conformed 0 packets, 0 bytes; actions:

transmit

exceeded 0 packets, 0 bytes; actions:

drop

police 8000 bc 1000 pir 8000 be 1000 conform-action transmit exceed-action set-dscp-transmit cs4

cir 8000 bps, bc 1000 bytes

pir 8000 bps, be 1000 bytes

conformed 0 packets, 0 bytes; actions:

transmit

exceeded 0 packets, 0 bytes; actions:

set-dscp-transmit cs4

violated 0 packets, 0 bytes; actions:

set-dscp-transmit cs4

police 10000 2000 3000 conform-action set-qos-transmit 3

cir 10000 bps, bc 2000 bytes

conformed 0 packets, 0 bytes; actions:

set-qos-transmit 3

exceeded 0 packets, 0 bytes; actions:

drop

police 15000 bc 1000 pir 30000 conform-action drop

cir 15000 bps, bc 1000 bytes

pir 30000 bps, be 1500 bytes

conformed 0 packets, 0 bytes; actions:

drop

exceeded 0 packets, 0 bytes; actions:

drop

violated 0 packets, 0 bytes; actions:

drop

Advertisements
This entry was posted in QOS. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s