how do Iset QOS on a 1720 Router by port number?

Unanswered Question
Aug 14th, 2007

Hi, I have 2 1720 routers connected via a point to point t1 and I need to set QOS for UDP ports 5004 and 5440-5445. I would like to just do it by the port number and avoid lists and all that. Is there a way to do this?



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Pavel Bykov Tue, 08/14/2007 - 13:18

To set QoS for port number you still have to do it by the mentioned "lists". I.E. Access Lists.

But it's easy.

access-list 150 permit udp any any eq 5004

access-list 150 permit udp any any range 5440 5445

class-map match-any XYZ

match access-group 150

policy-map SOMEQOS

class XYZ

priority percent 30

class class-default


interface serialx/x

service-policy output SOMEQOS

And you're done.

Hope this helps

roger200x Wed, 08/15/2007 - 03:48

Hey, the priority percent 30, what does that do and if I lower or raise it what will it do? Also, the XYZ... what is that? Am I supposed to put somethign there?

I know cisco routers, but I havent ever had to configure QOS or anything really complicated before, just basic to mid-level stuff, so any help is much appreciated!!!


Hieu Cao Tue, 08/14/2007 - 16:02

Another method of doing it besides access-list as shown by slidersv is to use "ip nbar port map" command.

config t# ip nbar port-map custom-01 udp 5004 5440 5441 5442 5442 5444 5445

(you can have a port-map line for each port, or put 7 ports in the same line, up to 16 ports are allowed on one line separated by a blank space.)

class-map XYX

match protocol custom-01

set dscp af21 (or whatever dscp value for your application)

policy-map Custom

class XYX

bandwidth percent xxxx

class class-default


random-detect dscp-based


class XYX

priority percent xxxx (using LLQ)

class class-default


random-detect dscp-based

Then, apply policy Custom to your serial interface:

config t

int s0/0

service-policy output Custom

Use "sh policy-map int s0/0" to verify.



jwdoherty Wed, 08/15/2007 - 10:46


In the later IOSs (e.g. 12.4) you can name the nbar custom port matches (e.g. ip nbar custom myname . . .) and you can also use port ranges (e.g. . . . range 5440 5445.)

roger200x Wed, 08/15/2007 - 10:54

I tried the access-list method by slidersv and it worked on one of my 1720s but not the other, the 2nd wont do class-map match-any xyz, it doesnt support the match-any I guess becasue its not an option. Also, the priority percent 30 wont work, it only allows a bandwidth rating not a precent...

is there somethign conflicting or somethign like that? They are both twin routers, both 1720s with 11 fas eth and 1 t1 csu/dsu card...


jwdoherty Wed, 08/15/2007 - 11:18

What you tried worked on 12.2 but not 12.1? (QoS features, and sometimes syntax, do vary per IOS.)


This Discussion