Tuesday, September 9, 2008

Random QoS Notes

I just thought I would post these few notes I did up on the QoS labs I have been doing the last few days.


MQC (Modular QoS CLI) - aka CPS
Classify - the traffic in question is classified with: Access-list, IP Prec, DSCP, CoS, MPLS EXP bits, Another Class-map, frame-relay DE bit, 802.1Q or ISL CoS/Priority Values, Input Interface, Source/Destination MAC, RTP, any packet or NBAR.

Policy-map - is configured, references the Class-map and applies a certain policy to the traffic that was classified.

Service-policy - policy-map is applied to an interface either in or outbound direction using the service-policy.


To verify CPS: sh policy-map interface
R2(config)#do sh policy-map int s1/0.23

Serial1/0.23

Service-policy output: TASK1

Class-map: TASK1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol telnet
QoS Set
precedence 1
Packets marked 0

After test telnet
Serial1/0.23

Service-policy output: TASK1

Class-map: TASK1 (match-all)
12 packets, 560 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol telnet
QoS Set
precedence 1
Packets marked 12


ip nbar port-map http tcp 1180

sh ip nbar port-map http
port-map http tcp 1180

TASK7 : Wording, Only one access-list should be configured to accomplish this task....does not mean only use access-lists to accomplish the task!!!




Priority Queuing - Interesting bit on using priority-list to prioritize http traffic

priority-list 1 protocol ip low list 100
priority-list 1 interface Loopback0 high
priority-list 1 protocol http medium
priority-list 1 protocol ip normal udp tftp
priority-list 1 default low

R1#debug priority
R1#telnet 131.1.12.2 80
Trying 131.1.12.2, 80 ... Open

*Mar 1 02:41:59.655: PQ: FastEthernet0/0: ip (defaulting) -> low
*Mar 1 02:41:59.659: PQ: FastEthernet0/0 output (Pk size/Q 60/3)
*Mar 1 02:41:59.663: PQ: FastEthernet0/0: ip (defaulting) -> low
*Mar 1 02:41:59.663: PQ: FastEthernet0/0 output (Pk size/Q 60/3)

I wonder why this doesn't work, maybe it is using nbar and it knows that the traffic is telnet? ---I think the http setting is that you can go within the http protocol and classify via specifics...

priority-list 1 protocol ip low list 100
priority-list 1 interface Loopback0 high
priority-list 1 protocol ip medium tcp 80
priority-list 1 protocol ip normal udp tftp
priority-list 1 default low

R1#telnet 131.1.12.2 80
Trying 131.1.12.2, 80 ... Open

*Mar 1 02:45:03.515: PQ: FastEthernet0/0: ip (tcp 80) -> medium
*Mar 1 02:45:03.515: PQ: FastEthernet0/0 output (Pk size/Q 60/1)
*Mar 1 02:45:03.523: PQ: FastEthernet0/0: ip (tcp 80) -> medium
*Mar 1 02:45:03.523: PQ: FastEthernet0/0 output (Pk size/Q 60/1)

Custom Queuing-

To apply to interface use custom-queue-list

To configure the bandwidth limits per queue, using 15000 as the base number for calculations
Queue-list 1 queue 1 byte-count 1500 for 10%

To match a url:
Match protocol http url blog.insomniacnetwork.com

1 comments:

Jason said...

I was confused by the failure of
priority-list 1 protocol http mediumtoo. I played around with NBAR and real http traffic and couldn't get it to work.
After checking the documentation I found it wasn't listed as a protocol-type so it would seem IOS was misleading us and it's not a supported configuration.
So end result you need to use,
priority-list 1 protocol ip medium tcp www OR
priority-list 1 protocol ip medium tcp 80Good to know I wasn't the only one who tried it.