ā05-05-2010 09:40 AM - edited ā03-06-2019 10:56 AM
Hi,
I need to limit bandwidth or Reserver bandwidth for a network, Eg:Iam having 1Mbps connection and there are two vlans
NetworkA
128 is for Voice
128 for Web
256 for data
and
Network B
256 for Voice in this network
256 for data in this networkB
.So any network can use only the specified bandwidth as maximum irrespective of congestion in the network or not.
I thought to use "Bandwidth" command to reserver required bandwidth for each network.But i read in documents that Bandwidth which is specifiedunder this command is used only when there is congestion.
Iam not able to use Rate-limit becuase i need to classify different traffic in NetworkA and reserver BW for each
How i can achieve this?
Thanks,
Hari
ā05-05-2010 11:31 AM
QoS will only kick in during link congestion, and if there is a match in the class-map, policy within that policy-map will be applied. Otherwise, it will use the class-default .
policy-map shape_1m
class class-default
shape average 1000000
service-policy app_policy
ip access-list extended NET-A
permit ...
ip access-list extended VOICE
permit udp ...
ip access-list extended WEB
permit tcp ...
class-map match-all NetA_Voice
match ip address NET-A
match ip address VOICE
class-map match-all NetA_Web
match ip address NET-A
match ip address WEB
policy-map app_policy
class NetA_Voice
bandwidth ...
class NetA_Web
bandwidth ...
interface x/x
service-policy output shape_1m
HTH,
jerry
ā05-05-2010 01:04 PM
So that means when there is no congestion the classification will not have any impact and in my case both networ A and Network B can use the maximum available total WAN bandwidth Am i Right?
But i would like to limit the Bandwidth for each Network irrespcetive of congestion(including Voice and data for each network as Bw mentioned in my question) ie even when the BW is free
ie, i need to allocate BW for each Network
Is there any way i can achieve it?
Thank you for spending your costliest time.
Hari
ā05-05-2010 01:16 PM
Bandwidth command will reserve X amount of bandwidth during congestion, while during none congestion interval, any traffic can send whatever amount they want.
In the scenario that you described, the methond you are looking for is policing (the police command), it can be applied to the class-map to police to whatever you want.
HTH,
jerry
ā05-05-2010 01:42 PM
Yes this what i tried earlierbut i dont know where i missed
this what i configured :
Class-map match-all nwAvoice
match rtp...
match networkA
Class-map match-all nwAdata
match networkA
match not rtp
Police MYtraffic
class nwAvoice
police cir 128000
class nwAdata
police cir 256000 (exceed action drop)
Available BW is 1Mbps so out of this networkA should use only 128 for voice and 256 for data even in normal traffic without congestion
Is it correct
ā05-05-2010 04:03 PM
Please post the config including the ACL and interface service-policy.
Regards,
jerry
ā05-07-2010 08:12 AM
Extended IP access list MYPC
10 permit ip any host 192.16.10.42
20 permit ip host 192.16.16.42 any
Class Map match-any class-default (id 0)
Match any
Class Map match-any tdata (id 1)
Match access-group name MYPC
Policy Map BWpolicy
Class tdata
police cir 8000 bc 1500
conform-action transmit
exceed-action drop
interface FastEthernet0/1
description ##### UPLINK TO WAN #####
bandwidth 2048
ip address xx.xxx.xxx.xx xxx.xxx.xxx.xxx
no ip redirects
ip flow ingress
ip nat outside
ip virtual-reassembly
ip route-cache flow
speed 100
full-duplex
service-policy input BWpolicy
service-policy output BWpolicy
end
interface FastEthernet0/0
description ###MYLAN####
no ip address
no ip redirects
speed 100
full-duplex
service-policy output BWpolicy
end
Note:My bandwidth is 2Mbps
#sh policy-map int fa0/0
FastEthernet0/0
Service-policy output: BWpolicy
Class-map: tdata (match-any)
1128213 packets, 784781259 bytes
5 minute offered rate 1841000 bps, drop rate 0 bps
Match: access-group name MYPC
1128214 packets, 784781313 bytes
5 minute rate 1841000 bps
police:
cir 8000 bps, bc 1500 bytes
conformed 1417 packets, 242761 bytes; actions:
transmit
exceeded 174 packets, 93486 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
Class-map: class-default (match-any)
212456 packets, 136181720 bytes
5 minute offered rate 162000 bps, drop rate 0 bps
Match: any
#sh policy-map int fa0/1
FastEthernet0/1
Service-policy input: BWpolicy
Class-map: tdata (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group name MYPC
0 packets, 0 bytes
5 minute rate 0 bps
police:
cir 8000 bps, bc 1500 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)
7248772 packets, 4839834879 bytes
5 minute offered rate 1949000 bps, drop rate 0 bps
Match: any
Service-policy output: BWpolicy
Class-map: tdata (match-any)
1434 packets, 174860 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group name MYPC
1434 packets, 174860 bytes
5 minute rate 0 bps
police:
cir 8000 bps, bc 1500 bytes
conformed 1434 packets, 174860 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
Class-map: class-default (match-any)
5256097 packets, 1681075555 bytes
5 minute offered rate 1690000 bps, drop rate 0 bps
Match: any
============================================
In WAN interface i applied service policy in both direction , this is to check direction of matching(so please ignore)
Now traffic has been matched, as shows in fa0/0 which is the LAN interface(It has sub interface in it ) there are some matches in OUTPUT direction and traffic exceeded and there are some drop.
But in my PC iam getting 153Kbps download and 192Kbps upload as average when iam downloading a torrent file.
In speed test.net iam getting same
Is my QOS is working properly, I guess according to config i should always get 8Kbps due to Police command
Any suggestion Please?
ā05-07-2010 11:22 AM
The service policy should be on the sub-interface.
Regards,
jerry
ā05-07-2010 01:28 PM
Hi i did the same
there are matched packets based on class map but still iam getting full speed when downloading
ā05-07-2010 01:36 PM
What is the IP address of your PC? 192.16.10.42 or 192.16.16.42?
Extended IP access list MYPC
10 permit ip any host 192.16.10.42
20 permit ip host 192.16.16.42 any
Regards,
jerry
ā05-08-2010 01:32 AM
Sorry its 192.16.10.42
Extended IP access list MYPC
10 permit ip any host 192.16.10.42
20 permit ip host 192.16.10.42 any
its a typo here only in my router above was the configuration
Thankyou for your valuable time
Hari
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide