Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Queuing help required 1

Status
Not open for further replies.
Joined
Mar 1, 2004
Messages
204
Location
GB
Hi All,

I shall try and word this question as best as I can:-

I need to set up a queuing strategy for the following:-

I need 5 seperate queue's each 100 Packets in size (MTU of 1500) this means 150K.

There are 5 precedence levels:- RLL, RHL, Flash, Priority and routine.

What is required is that when the data arrives at the interface (or goes out of an interface) the router scans the data (lets say it find it as Flash) and says "oh, I have to do this with it" and services 5 packets and then jumps back to the beginning to start the process again.

What would be the best way to achieve this?
Custom based queuing?
Weighted fair?

If so, how would I acheive it?

Thanks

 
Weighted fair is done automatically by router, so there is virtually nothing you can do in terms of customization. Custom queuing is fine, but it bases it works by giving each queue a percentage of bandwidth and then services the queues in round-robin fashion. I would suggest you take a look at CBWFQ or Priority queuing. I think you would be best suited with CBWFQ or maybe LLQ, which is CBWFQ with one priority queue added.

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
Thankyou for the quick response.

I have had a look at the Cisco site with reference to CBWFQ and LLC but am a little bit confused as to how to configure it all.

Any help would be greatly appreciated.

Thanks in advance
 
This is going to be loooong... OK I try this step by step and as easy as possible:

1) Define your traffic match characteristics, or class maps. You can use only one match command per class-map:

Router(config)# class-map CMAP-NAME
! match packets based on access-list number:
Router(config-cmap)# match access-group ACL-NUMBER
! or match packets based on incoming interface
Router(config-cmap)# match input-interface
! or match packets based on layer-3 protocol name
Router(config-cmap)# match protocol PROTOCOL
! or match based on IP DSCP value
Router(config-cmap)# match ip precedence TOS-VALUE

2) Now associate your match criteria, that is class-map, with a policy to create policy maps:
Router(config)# policy-map PMAP-NAME
Router(config-pmap)# class CMAP-NAME

2.1) You now policy your class maps. You can use:
give the matched traffic a percentage of bandwidth:
Router(config-pmap-c)# bandwidth BW-IN-KBPS | percent %%%

if router is expecting congestion, you can have packets from your class-map to be dropped according to more intelligent WRED, than tail-drop (normal operation), however WRED is usable oly with TCP traffic, which can recover from lost segments:
Router(config-pmap-c)# random-detect

you can specify how much packets a class-map' queue can hold at any time using (default is 64):
Router(config-pmap-c)# queue-limit NUMBER-OF-PACKETS

to configure LLQ (bandwidth, queue-limit and random-detect cannot be used with priority class-map) use:
Router(config-pmap-c)# priority BANDWIDTH-IN-KBPS

3) Finally you have to apply your config to interface:
Router(config)# interface TYPE NUMBER
Router(config-if)# service-policy input|output PMAP-NAME

And here you have LLQ example:

In this example, the class map called “IPPREC5” will evaluate all IPv4 packets entering FastEthernet interface 0/0 for a precedence value of 5. If the incoming IPv4 packet has been marked with the precedence value of 5, the packet will be treated as priority traffic and will be allocated with bandwidth of 50 kbps.

Router(config)# class-map IPPREC5
Router(config-cmap)# match ip precedence 5
Router(config)# exit
Router(config)# policy-map PRIO-50
Router(config-pmap)# class IPPREC5
Router(config-pmap-c)# priority 50
Router(config-pmap-c)# exit
Router(config-pmap)# exit
Router(config)# interface fa0/0
Router(config-if)# service-policy input PRIO-50

Another example from Cisco guide:

In the following example, three policy maps are defined:
cust1-classes
cust2-classes
cust-policy
Policy map cust1-classes have defined:
gold - use 50% of bandwidth
silver - use 20% of bandwidth
bronze - use 15% of bandwidth
Policy map cust2-classes have defined:
gold - use 30% of bandwidth
silver - use 15% of bandwidth
bronze - use 10% of bandwidth
The policy map cust-policy specifies average rate shaping of 384 kbps and assigns the service policy
called cust1-classes to the policy map called cust1-classes. The policy map called cust-policy specifies
peak rate shaping of 512 kbps and assigns the service policy called cust2-classes to the policy map called
cust2-classes.

To configure classes for cust1-classes, use the following commands:
Router(config)# policy-map cust1-classes
Router(config-pmap)# class gold
Router(config-pmap-c)# bandwidth percent 50
Router(config-pmap-c)# exit
Router(config-pmap)# class silver
Router(config-pmap-c)# bandwidth percent 20
Router(config-pmap-c)# exit
Router(config-pmap)# class bronze
Router(config-pmap-c)# bandwidth percent 15

To configure classes for cust2, use the following commands:
Router(config)# policy-map cust2-classes
Router(config-pmap)# class gold
Router(config-pmap-c)# bandwidth percent 30
Router(config-pmap-c)# exit
Router(config-pmap)# class silver
Router(config-pmap-c)# bandwidth percent 15
Router(config-pmap-c)# exit
Router(config-pmap)# class bronze
Router(config-pmap-c)# bandwidth percent 10

To define the customer policy with cust1-classes and cust2-classes and QoS features, use the following
commands:
Router(config)# policy-map cust-policy
Router(config-pmap)# class cust1
Router(config-pmap-c)# shape average 38400
Router(config-pmap-c)# service-policy cust1-classes
Router(config-pmap-c)# exit
Router(config-pmap)# class cust2
Router(config-pmap-c)# shape peak 51200
Router(config-pmap-c)# service-policy cust2-classes
Router(config-pmap-c)# exit
Router(config-pmap)# exit
Router(config)# exit
Router(config)# interface serial0/0
Router(config-if)# service out cust-policy

Hope this helps:)

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
That has helped loads. Thankyou very much for your time.

I have just 1 last question:-

Although 95% of my original question is now defined and I understand it, there is still 1 point I dont know how to configure:-

I need the CBWFQ queue length to be 100.
I need to service 5 packets from that queue (an example may be the low queue (using dscp)) and then start back at the high queue.
I am unsure of how to achieve this even with the very helpful info you have supplied.

Sorry, I know I am being a pain......

We are trying to emulate a bespoke system with cisco routers and I dont think we can achieve the 5 packet scenario required.

In other words, with any of the queuing methods how can you tell the router to only route 5 packets from a 100 packet queue?

Thanks for all
 
Well I think I can't quite think of any mechanism built in Cisco QoS, that will do what you need - I gues I am short on answer to this one. But rememeber, CBWFQ, PQ, WFQ, CQ, LLQ are all congestion management techniques, so it will not help you if there is no congestion on an interface:

During periods with light traffic, that is, when no congestion exists, packets are sent out the interface as
soon as they arrive. During periods of transmit congestion at the outgoing interface, packets arrive faster than the interface can send them. If you use congestion management features, packets accumulating at an interface are queued until the interface is free to send them; they are then scheduled for transmission according to their assigned priority and the queueing mechanism configured for the interface. The router determines the order of packet transmission by controlling which packets are placed in which queue and how queues are serviced with respect to each other.

Instead of trying to write more and more here, I think it will benefit you if you read this:


pages 124 and 126 contain nice tables sumarizing when you would like to use this or that queuing mechanisms. You will also find many nice configuration examples on queuing here. If you find the right answer, I would be glad, if you can share your solution. I know this guide is thick in pages, but it will be worth. QoS is one of more peculiar things of routing:)

Maybe specifically for you there is an answer in Custom Queueing - it will not do the exact thing you want, but it is pretty close I think. The point is, that you divide your traffic into different queues (up to 16 allowed) and specify for each queue how many bytes can go out at any given time before router moves into next queue. However emptying of queues is done on round-robin fashion - eg. if you have three queues, that is empty first one, than the second, third, go back to first, etc...


Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
Thnakyou very much for all the help.

Much appreciated.
 
No problem:)

Peter Mesjar
CCNP, A+ certified
pmesjar@centrum.sk

"The only true wisdom is in knowing you know nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top