Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Traffic Limiting Problem

Hi guys,

im trying to limit my bandwidth to my servers. Heres my test setup.

FTP Server ----e0/0 Router e1/0----- PC

MY Pc is trying to upload on the FTP Server. I want to limit the bandwidth to only 32 Kbps.

here's my config

class-map match-any FTP-Server

match access-group 10

!

!

policy-map FTP128

class FTP-Server

police 32000 1000 conform-action transmit exceed-action drop

!

interface Ethernet1/0

description ToServer

ip address 10.10.10.1 255.255.255.0

half-duplex

service-policy input FTP128

!

access-list 10 permit 10.10.20.2

access-list 10 deny any

But the problem is all my traffic goes to the class-default not conforming on my policy. Here's the output of trying to upload some files on my server.

Router#sh pol int

Ethernet1/0

Service-policy input: FTP128

Class-map: FTP-Server (match-any)

0 packets, 0 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: access-group 10

0 packets, 0 bytes

5 minute rate 0 bps

police:

cir 32000 bps, bc 1000 bytes

conformed 0 packets, 0 bytes; actions:

transmit

exceeded 0 packets, 0 bytes; actions:

drop

conformed 0 bps, exceed 0 bps

Class-map: class-default (match-any)

6452 packets, 9467950 bytes

5 minute offered rate 42000 bps, drop rate 0 bps

Match: any

The traffic is on the class default. I just want to limit the upload bandwidth to 32Kbps. What im missing here =(.

tnx

jeff

21 REPLIES
Purple

Re: Traffic Limiting Problem

Jeff,

Is the FTP server's IP address 10.10.20.2 ?

If so, change the ACL to match that address as the destination:

class-map match-any FTP-Server

match access-group 101

!

access-list 101 permit ip any host 10.10.20.2

Pls do remember to rate posts.

Paresh

New Member

Re: Traffic Limiting Problem

Paresh,

Yes my FTP Add is 10.10.20.2. After changing my acl. I cant upload any more =(

Here's the output.

Router(config-cmap)#do sh pol in

Ethernet1/0

Service-policy input: FTP128

Class-map: FTP-Server (match-any)

325 packets, 105797 bytes

5 minute offered rate 1000 bps, drop rate 1000 bps

Match: access-group 101

325 packets, 105797 bytes

5 minute rate 1000 bps

police:

cir 32000 bps, bc 1000 bytes

conformed 266 packets, 16471 bytes; actions:

transmit

exceeded 59 packets, 89326 bytes; actions:

drop

conformed 0 bps, exceed 1000 bps

Class-map: class-default (match-any)

14802 packets, 21955532 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

Purple

Re: Traffic Limiting Problem

Hi,

You might be better of shaping the traffic on the interface leading to the server so that you get better performance than policing, which simply drops all non-compliant packets..

Paresh

New Member

Re: Traffic Limiting Problem

hi pkhatri,

what commands are associated with these ?

thanks.

New Member

Re: Traffic Limiting Problem

Hi Paresh,

after changing the burst bytes to 4000 somehow it works. though my du meter is saying that im having around 24,26,48 Kbps traffic (changing). How can i determine the best burst bytes for these ? is this normaol changin traffic (24,26,36,48Kbps)?

tnx

Purple

Re: Traffic Limiting Problem

Try the following - apply it on the interface that connects to the server.

policy-map FTP128

class FTP-Server

shape average 32000

!

interface Ethernet0/0

service-policy output FTP128

Pls do remember to rate posts that help.

Paresh

New Member

Re: Traffic Limiting Problem

hi paresh,

somehow they have the same effect, but what are the differnce ? if all of the bandwidth is used by my first upload, what will happen if another connection will attempt to connect ? will this be disconnected ? any idea to share the bandwidth if two connections are there ? or bandwidth sharing per connection ?

tnx

Purple

Re: Traffic Limiting Problem

Jeff,

Shaping buffers the traffic so you should end up getting a slightly better response.

It is really impossible to predict the exact ratio each flow will get when you have multiple flows. However, the second flow will not be disconnected at all - it will simply share the available bandwidth with the first flow. On average, each flow should get a roughly equal share of the bandwidth.

Pls do remember to rate posts.

Paresh

New Member

Re: Traffic Limiting Problem

Hi guys,

Just to continue my query here. I've been testing my setup and it seems that traffic shaping works only on one bandwidth ?

here's my testing

FTP Server -- [e0/0 Router e 1/0] -- FTP client

First Test: Upload - 64Kbps

Upload file from FTP Client to FTP Server

BW = 60-70Kbps = OK

Second Test: Download - 32

Try to download a file simultaneously with the uploading

Effect:Suddenly my Upload Speed was down to 8Kbps.

How come my Inbound/Outbound is affected since i declared two policy for Uploading/Downlaoding ?

Purple

Re: Traffic Limiting Problem

Hey Jeff,

Could you pls post your config ?

Thanks,

Paresh

New Member

Re: Traffic Limiting Problem

Hi Paresh,

Glad to see you replied. Im trying now to configure upload/download speed. I'm trying to upload at 64K and work perfectly. But when i try to download simultaneously, my upload speed digrades. How come? I want them to be independently configured to different speed without affecting each other.

Here's my config.

class-map match-any FTP-Server-Upload

match access-group 101

class-map match-any FTP-Server-Download

match access-group 102

!

policy-map FTP-16-Download

class FTP-Server-Download

shape average 16000

policy-map FTP-64-Upload

class FTP-Server-Upload

shape average 64000

!

interface Ethernet0/0

description FromUser

ip address 10.10.20.1 255.255.255.0

full-duplex

service-policy output FTP-64-Upload

!

interface Ethernet1/0

description ToServer

ip address 10.10.10.1 255.255.255.0

half-duplex

service-policy output FTP-16-Download

!

access-list 101 permit ip any host 10.10.20.2

access-list 102 permit ip host 10.10.20.2 any

Thanks.

Jeff

Purple

Re: Traffic Limiting Problem

Thanks Jeff,

Could you also post the output of 'show policy-map interface eth0/0' during the middle of your test ?

Paresh

Purple

Re: Traffic Limiting Problem

One more question: do you also see this happening when you remove the download policy and then initiate a download while an upload is in progress ?

Paresh

New Member

Re: Traffic Limiting Problem

Hi Paresh,

Here's the output. My Upload speed right now is only 24Kbps and download speed is 12 Kbps. thanks for helping, i just want to test it first before deploying.

Thanks,

Ethernet0/0

Service-policy output: FTP-64-Upload

Class-map: FTP-Server-Upload (match-any)

6147 packets, 5583865 bytes

5 minute offered rate 17000 bps, drop rate 0 bps

Match: access-group 101

6147 packets, 5583865 bytes

5 minute rate 17000 bps

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

64000/64000 2000 8000 8000 125 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 6147 5583865 899 1277938 no

Class-map: class-default (match-any)

429 packets, 40393 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: anyEthernet1/0

Service-policy output: FTP-16-Download

Class-map: FTP-Server-Download (match-any)

10946 packets, 8766710 bytes

5 minute offered rate 15000 bps, drop rate 0 bps

Match: access-group 102

10946 packets, 8766710 bytes

5 minute rate 15000 bps

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

16000/16000 2000 8000 8000 500 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 5 10960 8774504 9180 8640807 yes

Class-map: class-default (match-any)

1007 packets, 94427 bytes

5 minute offered rate 0 bps, drop rate 0 bps

Match: any

Thanks.

Jeff

Purple

Re: Traffic Limiting Problem

Jeff,

You might want to configure 'load-interval 30' under both of your interfaces so that you get more accurate rates displayed by these commands - the 5 minute moving average is far too slow.

Now, I see that the outbound policy on eth0/0 shows an offered rate of only 17000 bps - your PC itself is only presenting that much traffic so the router can't really carry more than that.

Still awaiting the answer to the second question I posed to you..."do you also see this happening when you remove the download policy and then initiate a download while an upload is in progress ? "

Paresh

New Member

Re: Traffic Limiting Problem

Hi Paresh,

Sorry for the long delay. I've attended some problems.

What do you want me to test ? Actually when im uploading and downloading, the bandwidth degrades. When i remove the download policy, suddenly the speed for download moves up to 1Mbps which took only some 2 secs for my download. What test would you want me to take ?

Purple

Re: Traffic Limiting Problem

Here's what I was after:

- remove the download policy

- leave the upload policy in place

- ensure 'load-interval 30' is configured on your interfaces

- start your upload

- start your download

- get 'show policy-map interface' output

- post the above output :-)

In fact, you might want to then repeat the above test with the download policy applied - the difference from your previous tests is the load-interval setting..

Paresh

New Member

Re: Traffic Limiting Problem

Hi Paresh,

I've tried configuring both the same speed and look at the results.They are the same.Ill try to trim down the speed of the other one.

Ethernet0/0

Service-policy output: FTP-32-Upload

Class-map: FTP-Server-Upload (match-any)

1179 packets, 951573 bytes

30 second offered rate 32000 bps, drop rate 0 bps

Match: access-group 101

1179 packets, 951573 bytes

30 second rate 32000 bps

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

32000/32000 2000 8000 8000 250 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 2 1177 950005 794 530703 yes

Class-map: class-default (match-any)

37 packets, 3464 bytes

30 second offered rate 0 bps, drop rate 0 bps

Match: any

Ethernet1/0

Service-policy output: FTP-32-Download

Class-map: FTP-Server-Download (match-any)

891 packets, 532025 bytes

30 second offered rate 31000 bps, drop rate 0 bps

Match: access-group 102

891 packets, 532025 bytes

30 second rate 31000 bps

Traffic Shaping

Target/Average Byte Sustain Excess Interval Increment

Rate Limit bits/int bits/int (ms) (bytes)

32000/32000 2000 8000 8000 250 1000

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 4 908 548173 691 531638 yes

Class-map: class-default (match-any)

29 packets, 2679 bytes

30 second offered rate 0 bps, drop rate 0 bps

Match: any

Purple

Re: Traffic Limiting Problem

Jeff,

The key thing to note from your output is that the drop rate for both is 0 bps - that leads me to think that the problem is not your router, but in fact lies elsewhere....

Hope that helps - pls do remember to rate posts that help.

Paresh

New Member

Re: Traffic Limiting Problem

Hi Paresh,

So basically my config is correct ? So that i wont be messing with the config. I'll try to look at the other equipment like the client.

Thanks.

Jeff

Purple

Re: Traffic Limiting Problem

Yep, that's my thinking. If the router was messing about with these packets, you would see drops.. But since you don't see any, I would look at other elements first.

Pls do remember to rate posts that help...

Paresh

316
Views
17
Helpful
21
Replies
CreatePlease login to create content