cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
11127
Views
0
Helpful
23
Replies

How configure bandwidth limit with Catalyst 3750

peterderk
Level 1
Level 1

Hey,


I wan't to configure my Catalyst 3750.

I have two networks

192.168.1.0 /24

192.168.2.0 /24

the packets from the 192.168.1.0 network must become 70% of the Bandwidth.

the packets from the 192.168.2.0 network must become 30% of the  Bandwidth.

I make 2 ACL's

acces-list 1 permit 192.168.1.0 0.0.0.255

acces-list 2 permit 192.168.2.0 0.0.0.255

then two class maps

class-map net1

match access-group 1

class-map net2

match access-group2

Now I think I must create a policy map....

policy-map limiter
class net1

?

QoS policy-map class configuration commands:
  exit            Exit from QoS class action configuration mode
  no              Negate or set default values of a command
  police          Police
  service-policy  Configure QoS Service Policy
  set             Set QoS values
  trust           Set trust value for the class

class net2

and after the policy map

interface vlan 1

service-policy input limiter

I don't know what I have to configure in the policy map..... please help me...

regards

6 Accepted Solutions

Accepted Solutions

Lei Tian
Cisco Employee
Cisco Employee

Hi,

Here is the configuration you need for 3750 switch.

mls qos
int range all_access_port
mls qos vlan-based
int vlan 10(192.168.1.0/24)
service-policy in limiter
int vlan 20(192.168.2.0/24)
service-policy in limiter
policy-map limiter
class net1
set ip dscp 10
class net2
set ip dscp 20

mls qos srr-queue output dscp-map queue 1 threshold 1  10
mls qos srr-queue output dscp-map queue 2 threshold 1  20
mls qos queue-set output 1 buffers 70 30 0 0

int range all_ports
srr-queue bandwidth shape  7  3  0  0

HTH,


Lei Tian

View solution in original post

Hi Emmo,

Sorry about miss unstood your requirement. If you need SRR share, then the configure should look like

mls qos

mls qos srr-queue output dscp-map queue 1 threshold 1  10
mls qos  srr-queue output dscp-map queue 2 threshold 1  20
mls qos queue-set  output 1 buffers 70 30 0 0

class-map match-all net2
  match  access-group 2
class-map match-all net1
  match access-group 1
policy-map  limiter
  class net1
   set dscp af11
  class net2
   set  dscp af22

interface  GigabitEthernet1/0/17

srr-queue bandwidth shape 0 0 0 0
srr-queue bandwidth share 7 3 1 1
service-policy  input limiter

access-list 1 permit 10.1.1.0 0.0.0.255
access-list  2 permit 10.1.2.0 0.0.0.255


EDIT: I have the reason.... CISCO says

Default Scheduler Configuration:

The priority queue is disabled. Both the shaped and shared mode are       configured for the SRR. Shaped mode weights override the shared mode  value.       Therefore, the net result is queue 1 is serviced in shaped mode and  queues 2,       3, and 4 are serviced in shared mode. This means queue 1 is serviced  with an       absolute value that is (1/25) percent, or four percent, of the  bandwidth.       Queues 2, 3 and 4 are serviced at 25 percent of the bandwidth. If the  bandwidth       is available, then queues 2, 3 and 4 can be serviced at more than 25  percent of       the bandwidth.

What CISCO says is exactly right. The weight in shape mode can override weight in share mode.

It's uninterested what I set for buffer or share values. When I start the FTP transfer alone both computers have the 110MB/s it's ok, but when I start the File transfer  together, the Bandwidth is split to 50/50 and not to 70/30 oder what else....what have I done wrong again?

In share mode, each queue will have assigned bandwidth, but doesnt limit to that bandwidth; which means when there is bandwidth available it can use it. So on your case as long as the Gig port has available bandwidth every queue can use it.

HTH,

Lei Tian

View solution in original post

Hi Emmo,

It looks same because I just copy and paste your config, but if you look closely I added 2 more commands based on your configure.

1 mls qos -- this globally enable qos

2.srr-queue bandwidth shape 0 0 0 0 -- add that under interface to remove default shape queue for q1.

So let's do little math here, hope can clarify your question.

With the configuration you posted

interface  GigabitEthernet1/0/17
srr-queue bandwidth share 7 3 1 1
service-policy  input limiter

DSCP 10 assigned to queue  1, DSCP 20 assigned to queue 2. Queue 1 is configured in shape mode by default with 4% bandwidth, so the weight you assigned to queue 1 will be ignored. Now let's look queue 2/3/4, the bandwidth of queue 2 will be 3/3+1+1=60%;queue 3 will be 1/3+1+1=20%;queue 4=1/3+1+1=20%. So far so good?

Now let's put in the bandwidth, say your interface bandwidth is 100M. Then bandwidth of

queue 1 = 4%*100M =4M;

queue 2=60%*100M=60M;

queue 3=20%*100M=20M;

queue 4=20%*100M=20M.

We go back to your test result. Traffic from 10.1.1.x will be put in queue 1, which is shape queue with 4M bandwidth, and your test result show 4.53M.

The Computer who is in the 10.1.1.x area have ALONE this

ncftpget  ftp://10.1.1.51/incoming/data.20gb
data.20gb:                          ETA:  19:14   14.43/ 19.53 GB    4.53 MB/s

Traffic from 10.1.2.x will be put in queue 2, which is share queue with 60M bandwidth, however because there is no traffic in queue 3/4, available bandwidth can be used by queue 2. Your test result show 110.84M

The Computer who is in the 10.1.2.x area have ALONE this

ncftpget  ftp://10.1.2.51/incoming/data.20gb
data.20gb:                          ETA:   0:49   14.20/ 19.53 GB  110.84 MB/s

Does that make sense now?

Actually, if you want get close of 70%,30% ratio, you can change the interface level configure to

interface  GigabitEthernet1/0/17

srr-queue bandwidth shape 0 0 0 0
srr-queue bandwidth share 255 110 1 1
service-policy  input limiter

So, the queue 1=255/255+110+1+1=69%;queue 2=110/255+110+1+1=29%

Help that explain make sense for you.

HTH,

Lei Tian

View solution in original post

You can see that the configuration already done. Shaping is off! I only use Sharing!

Ok, I didn't see that in your configure.

But the sharing don't works with 70 and 30 percent so I have it configure. It make a 50/50 Split.

When I copy Data from the 10.1.1.x pc alone I have the 110M and when I copy Data from the 10.1.2.x pc I have the 110M too.

But both devices together don't work so I want it. Traffic goes with 50M on every device forward.

I have configured shape 0000 and share 7311 and it don't works?!

So, after you changed the shape 0 0 0 0, you did another test? In the new test, traffic from either network can have 110M download speed; when you download from both network at same time, each network can only have 50M download speed. Is that what you seen? Can you explain how you did the test, how is everything connected, and what is the physical interface bandwidth, is it 100M/full or 1G/full?


One other question:

Can you explain me what the different between buffer and share? Is Buffer how many packets I can put in the queue and share is how many BW can be used to forward the packets?

Yes. Buffer is how many frames can be hold in the queue before leave the interface;share weight is the bandwdith for each queue.

Please rate if it helps.

HTH,

Lei Tian

View solution in original post

Hi Emmo,

That picture definitely help!

So let me explain it; the queuing algorithm, share queue or shape queue are used for egress traffic queuing; ingress queuing is different, very limited, and normally we donā€™t use ingress queue. That is because congestion usually happens on uplink egress direction.

Now, let's look your testing. FTP traffic is more like unidirectional traffic, from FTP server towards clients. When FTP traffic coming in g1/0/17 interface, it get congested and be queued by the interface input queue. The switch will serve incoming traffic as FIFO fashion; it will check the mac-address-table and switch the FTP traffic to its output interfaces, which are g1/0/18 and g1/0/20. On the output interface, because no congestion happen, all traffic can be sent without be queued. As you can see, egress queuing is not be used in the whole process. So it is expected to see the 50/50 split.

In order to test the egress queue, you can put one FTP server at g1/0/18 and g1/0/20, put client on g1/0/17 and get same file from 2 FTP servers. That way, you can verify whether the egress queue working or not.

HTH,

Lei Tian

View solution in original post

Ok.

Can you clear the counter use "clear mls qos interface statistics", and do the test. After the test, can you capture the output of "show mls qos int g1/0/17 stat" , ""show mls qos int g1/0/18 stat" , "show mls qos int g1/0/20 stat" and post it.

Thanks

View solution in original post

23 Replies 23

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hey,


I wan't to configure my Catalyst 3750.

I have two networks

192.168.1.0 /24

192.168.2.0 /24

the packets from the 192.168.1.0 network must become 70% of the Bandwidth.

the packets from the 192.168.2.0 network must become 30% of the  Bandwidth.

I make 2 ACL's

acces-list 1 permit 192.168.1.0 0.0.0.255

acces-list 2 permit 192.168.2.0 0.0.0.255

then two class maps

class-map net1

match access-group 1

class-map net2

match access-group2

Now I think I must create a policy map....

policy-map limiter
class net1

?

QoS policy-map class configuration commands:
  exit            Exit from QoS class action configuration mode
  no              Negate or set default values of a command
  police          Police
  service-policy  Configure QoS Service Policy
  set             Set QoS values
  trust           Set trust value for the class

class net2

and after the policy map

interface vlan 1

service-policy input limiter

I don't know what I have to configure in the policy map..... please help me...

regards

Hi,

Check out the below link hope that help !!

http://www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_25_see/configuration/guide/swqos.html

Ganesh.H

Hey thank you but I had read the Dokumentation before.

I have only found the Point "Limiting the Bandwidth on an  Egress Interface" about bandwidth limiting...

But the configuration only limit the Speed of the whole interface. And that is not that for what I look.

Lei Tian
Cisco Employee
Cisco Employee

Hi,

Here is the configuration you need for 3750 switch.

mls qos
int range all_access_port
mls qos vlan-based
int vlan 10(192.168.1.0/24)
service-policy in limiter
int vlan 20(192.168.2.0/24)
service-policy in limiter
policy-map limiter
class net1
set ip dscp 10
class net2
set ip dscp 20

mls qos srr-queue output dscp-map queue 1 threshold 1  10
mls qos srr-queue output dscp-map queue 2 threshold 1  20
mls qos queue-set output 1 buffers 70 30 0 0

int range all_ports
srr-queue bandwidth shape  7  3  0  0

HTH,


Lei Tian

Hey,

sorry but why I have to configure Vlan's when I mark the packets with DSCP Values?

I don't can be use Vlan's in the networks. Is it so important that I need Vlan's?

It's also nessesary, that the QOS configuration is IP-based not Port and not Interface based.

emmo

Hi Emmo,

Applying policy-map under SVI can consume less TCAM, it is the prefer way to do it. If your switch is a L2 switch, you can apply the policy-map under each physical interface.

One thing need to mention is this QoS configuration only gives you the bandwidth on this switch, if you need to pass the DSCP and follow same rule to other switches, you need to change the default dscp-queue map and assign proper weight for the queue on other switches.

HTH,

Lei Tian

Ok when that is the prefer way.... I should be go it

But I have one more question....

Activating policying to do bandwidth limitiation means, that the matched adresses ONLY HAVE 30% or ONLY HAVE 70% of the bandwidth. But what is when one of the networks are not fully exploiting its Traffic? e.g. the 192.168.1.0 network only use 10% but its have 70% and the network 192.168.2.0 want to become the not used percent of the 192.168.1.0 network?

in fli4l a lightwigh linux router you can configure QOS_CLASS_x_MINBANDWIDTH this is that what I looking for. The Dokumentation of the Command is only in German sorry...

And in the practice....

It's only one Network 192.168.0.0 /16 and I wan't to pick out the 192.168.1.0 - 255 part and the 192.168.2.0 - 255 part. So I do not know if this works with Vlan's.

kind regards
and I hope that you understand my english

emmo

Activating policying to do bandwidth limitiation means, that the matched adresses ONLY HAVE 30% or ONLY HAVE 70% of the bandwidth. But what is when one of the networks are not fully exploiting its Traffic? e.g. the 192.168.1.0 network only use 10% but its have 70% and the network 192.168.2.0 want to become the not used percent of the 192.168.1.0 network?

3750 uses SRR as the scheduling method and SRR has 2 mode: Share round robin and shaped round robin. What you have asking for is shaped round robin, it basically means one network will use and only use 70% of the bandwidth; the other network can use and only use 30% of the bandwidth. Even there is bandwidth available, none of the queue can use more than assigned bandwidth.

While the other share round robin means one queue can use 70% bandwidth, but it doesnā€™t limited to 70%. When there is bandwidth available, it can use more than 70%.

The configuration I gave to you was using shaped round robin; If I understand correctly, this is what you expect behavior.

HTH,

Lei Tian

Hey,

no I need the sharing..not shaping.


Sorry but I must change the IP Adresses.

I have configure my Switch like:

mls qos srr-queue output dscp-map queue 1 threshold 1  10
mls qos  srr-queue output dscp-map queue 2 threshold 1  20
mls qos queue-set  output 1 buffers 70 30 0 0

class-map match-all net2
  match  access-group 2
class-map match-all net1
  match access-group 1
policy-map  limiter
  class net1
   set dscp af11
  class net2
   set  dscp af22

The Interfaces 17 -20 are looking so

interface  GigabitEthernet1/0/17
srr-queue bandwidth share 7 3 1 1
service-policy  input limiter

access-list 1 permit 10.1.1.0 0.0.0.255
access-list  2 permit 10.1.2.0 0.0.0.255

Now I have tested with FTP Transfer.

The Computer who is in the 10.1.2.x area have ALONE this

ncftpget  ftp://10.1.2.51/incoming/data.20gb
data.20gb:                          ETA:   0:49   14.20/ 19.53 GB  110.84 MB/s

The Computer who is in the 10.1.1.x area have ALONE this

ncftpget  ftp://10.1.1.51/incoming/data.20gb
data.20gb:                          ETA:  19:14   14.43/ 19.53 GB    4.53 MB/s

Normaly, the 10.1.1.x Computer must also have 110MB/S Transfer Rate when he make the Transfer alone....

Emmo

EDIT: I have the reason.... CISCO says

Default Scheduler Configuration:

The priority queue is disabled. Both the shaped and shared mode are       configured for the SRR. Shaped mode weights override the shared mode  value.       Therefore, the net result is queue 1 is serviced in shaped mode and  queues 2,       3, and 4 are serviced in shared mode. This means queue 1 is serviced  with an       absolute value that is (1/25) percent, or four percent, of the  bandwidth.       Queues 2, 3 and 4 are serviced at 25 percent of the bandwidth. If the  bandwidth       is available, then queues 2, 3 and 4 can be serviced at more than 25  percent of       the bandwidth.

Distribution1#show mls qos int gigabitEthernet 1/0/20 queueing
GigabitEthernet1/0/20
Egress Priority Queue : disabled
Shaped queue weights (absolute) :  25 0 0 0
Shared queue weights  :  25 25 25 25
The port bandwidth limit : 100  (Operational Bandwidth:100.0)
The port is mapped to qset : 1

You only make a srr-queue bandwidth shape 0 0 0 0 on the interfaces you needed and it works

But now I have another problem

It's uninterested what I set for buffer or share values. When I start the FTP transfer alone both computers have the 110MB/s it's ok, but when I start the File transfer  together, the Bandwidth is split to 50/50 and not to 70/30 oder what else....what have I done wrong again?

Hi Emmo,

Sorry about miss unstood your requirement. If you need SRR share, then the configure should look like

mls qos

mls qos srr-queue output dscp-map queue 1 threshold 1  10
mls qos  srr-queue output dscp-map queue 2 threshold 1  20
mls qos queue-set  output 1 buffers 70 30 0 0

class-map match-all net2
  match  access-group 2
class-map match-all net1
  match access-group 1
policy-map  limiter
  class net1
   set dscp af11
  class net2
   set  dscp af22

interface  GigabitEthernet1/0/17

srr-queue bandwidth shape 0 0 0 0
srr-queue bandwidth share 7 3 1 1
service-policy  input limiter

access-list 1 permit 10.1.1.0 0.0.0.255
access-list  2 permit 10.1.2.0 0.0.0.255


EDIT: I have the reason.... CISCO says

Default Scheduler Configuration:

The priority queue is disabled. Both the shaped and shared mode are       configured for the SRR. Shaped mode weights override the shared mode  value.       Therefore, the net result is queue 1 is serviced in shaped mode and  queues 2,       3, and 4 are serviced in shared mode. This means queue 1 is serviced  with an       absolute value that is (1/25) percent, or four percent, of the  bandwidth.       Queues 2, 3 and 4 are serviced at 25 percent of the bandwidth. If the  bandwidth       is available, then queues 2, 3 and 4 can be serviced at more than 25  percent of       the bandwidth.

What CISCO says is exactly right. The weight in shape mode can override weight in share mode.

It's uninterested what I set for buffer or share values. When I start the FTP transfer alone both computers have the 110MB/s it's ok, but when I start the File transfer  together, the Bandwidth is split to 50/50 and not to 70/30 oder what else....what have I done wrong again?

In share mode, each queue will have assigned bandwidth, but doesnt limit to that bandwidth; which means when there is bandwidth available it can use it. So on your case as long as the Gig port has available bandwidth every queue can use it.

HTH,

Lei Tian

Hey letian,

when you look at my previous post you can see the configuration is exactly the same thanks anyway

In share mode, each queue will have assigned bandwidth, but doesnt limit to that bandwidth; which means when there is bandwidth available it can use it. So on your case as long as the Gig port has available bandwidth every queue can use it.

All right, but the assignet bandwidth is 69% and 29% and not 50% and 50% (my test results show that).

I have calculate the Bandwidth for the different Queues

Q2

29/100*110 = 31,9 MB/s

Q3

69/100*110 = 75,9 MB/s

Q1 and Q4

1/100*110 = 1,1 MB/s

Normaly, the 75,9 MB/s must be guarented for the Queue 3 ! When I send packets over the network they filled in the Queue 3 or in Queue 2 only then is the maximum Bandwidth reached. But when I make traffic they filled in both Queues (2&3) the Traffic is split in 50% per Queue? I have on both FTP connections 55MB/s and not 76MB/s at the one and 32 at the other...you understand? I think the configuration is right.

Emmo

Hi Emmo,

It looks same because I just copy and paste your config, but if you look closely I added 2 more commands based on your configure.

1 mls qos -- this globally enable qos

2.srr-queue bandwidth shape 0 0 0 0 -- add that under interface to remove default shape queue for q1.

So let's do little math here, hope can clarify your question.

With the configuration you posted

interface  GigabitEthernet1/0/17
srr-queue bandwidth share 7 3 1 1
service-policy  input limiter

DSCP 10 assigned to queue  1, DSCP 20 assigned to queue 2. Queue 1 is configured in shape mode by default with 4% bandwidth, so the weight you assigned to queue 1 will be ignored. Now let's look queue 2/3/4, the bandwidth of queue 2 will be 3/3+1+1=60%;queue 3 will be 1/3+1+1=20%;queue 4=1/3+1+1=20%. So far so good?

Now let's put in the bandwidth, say your interface bandwidth is 100M. Then bandwidth of

queue 1 = 4%*100M =4M;

queue 2=60%*100M=60M;

queue 3=20%*100M=20M;

queue 4=20%*100M=20M.

We go back to your test result. Traffic from 10.1.1.x will be put in queue 1, which is shape queue with 4M bandwidth, and your test result show 4.53M.

The Computer who is in the 10.1.1.x area have ALONE this

ncftpget  ftp://10.1.1.51/incoming/data.20gb
data.20gb:                          ETA:  19:14   14.43/ 19.53 GB    4.53 MB/s

Traffic from 10.1.2.x will be put in queue 2, which is share queue with 60M bandwidth, however because there is no traffic in queue 3/4, available bandwidth can be used by queue 2. Your test result show 110.84M

The Computer who is in the 10.1.2.x area have ALONE this

ncftpget  ftp://10.1.2.51/incoming/data.20gb
data.20gb:                          ETA:   0:49   14.20/ 19.53 GB  110.84 MB/s

Does that make sense now?

Actually, if you want get close of 70%,30% ratio, you can change the interface level configure to

interface  GigabitEthernet1/0/17

srr-queue bandwidth shape 0 0 0 0
srr-queue bandwidth share 255 110 1 1
service-policy  input limiter

So, the queue 1=255/255+110+1+1=69%;queue 2=110/255+110+1+1=29%

Help that explain make sense for you.

HTH,

Lei Tian

Hey again,

thanks for the beautiful explain.

When you look at this post from me...

You only make a srr-queue bandwidth shape 0 0 0 0 on the interfaces you needed and it works

You can see that the configuration already done. Shaping is off! I only use Sharing!

But the sharing don't works with 70 and 30 percent so I have it configure. It make a 50/50 Split.

When I copy Data from the 10.1.1.x pc alone I have the 110M and when I copy Data from the 10.1.2.x pc I have the 110M too.

But both devices together don't work so I want it. Traffic goes with 50M on every device forward.

I have configured shape 0000 and share 7311 and it don't works?!

One other question:

Can you explain me what the different between buffer and share? Is Buffer how many packets I can put in the queue and share is how many BW can be used to forward the packets?

thanks

emmo

You can see that the configuration already done. Shaping is off! I only use Sharing!

Ok, I didn't see that in your configure.

But the sharing don't works with 70 and 30 percent so I have it configure. It make a 50/50 Split.

When I copy Data from the 10.1.1.x pc alone I have the 110M and when I copy Data from the 10.1.2.x pc I have the 110M too.

But both devices together don't work so I want it. Traffic goes with 50M on every device forward.

I have configured shape 0000 and share 7311 and it don't works?!

So, after you changed the shape 0 0 0 0, you did another test? In the new test, traffic from either network can have 110M download speed; when you download from both network at same time, each network can only have 50M download speed. Is that what you seen? Can you explain how you did the test, how is everything connected, and what is the physical interface bandwidth, is it 100M/full or 1G/full?


One other question:

Can you explain me what the different between buffer and share? Is Buffer how many packets I can put in the queue and share is how many BW can be used to forward the packets?

Yes. Buffer is how many frames can be hold in the queue before leave the interface;share weight is the bandwdith for each queue.

Please rate if it helps.

HTH,

Lei Tian

Hey,

I think pictures says more than 1000 words I have make a picture for you.....

I also try a upload, but with the same results.

thx

emmo

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco

Ā