From: Victor Cappuccio (vcappuccio@gmail.com)
Date: Sat Jul 19 2008 - 14:29:49 ART
Hi Radioactive,
The main difference in my opinion would be that method #1 can be
applied to any interface and you would get 20 % of the bandwidth
configured on the interface (so the first method would be based on BW)
take in consideration that the CIR configured must cir fall between
8000 and 2000000000
Rxx(config-pmap-c)#police cir ?
<8000-2000000000> Bits per second
Now on the second method you will police traffic to 204000 Bits per
seconds in the class class-default statically no matter what BW you
had configured.
Please take a look at the following
Method #1
Router#conf ter
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Rxx
Rxx(config)#line con 0
Rxx(config-line)#logg syn
Rxx(config-line)#exec-time 0 0
Rxx(config-line)#exit
Rxx(config)#no ip domain loo
Rxx(config)#
Rxx(config)#class-map www
Rxx(config-cmap)#class-map ftp
Rxx(config-cmap)#
Rxx(config-cmap)# policy-map NUTTS
Rxx(config-pmap)# class www
Rxx(config-pmap-c)# priority 100
Rxx(config-pmap-c)# class ftp
Rxx(config-pmap-c)# bandwidth 50
Rxx(config-pmap-c)# class class-default
Rxx(config-pmap-c)# fair-queue
Rxx(config-pmap-c)# police rate percent 20
Rxx(config-pmap-c-police)# conform-action transmit
Rxx(config-pmap-c-police)# exceed-action drop
Rxx(config-pmap-c-police)#exit
Rxx(config-pmap-c)#int s0/0/0
Rxx(config-if)#service out NUTTS
Rxx(config-if)#no sh
Rxx(config-if)#do show int s0/0/0 | in BW
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
<-------------------------------
Rxx(config-if)#do show policy-map int s0/0/0 | in rate|class-
5 minute offered rate 0 bps, drop rate 0 bps
5 minute offered rate 0 bps, drop rate 0 bps
Class-map: class-default (match-any)
5 minute offered rate 0 bps, drop rate 0 bps
rate 20 %
rate 308500 bps, burst 9640 bytes <-------------------------------
Rxx(config-if)#band 400 <-------------------------------
Rxx(config-if)#do show int s0/0/0 | in BW
MTU 1500 bytes, BW 400 Kbit, DLY 20000 usec,
Rxx(config-if)#do show policy-map int s0/0/0 | in rate|class-
5 minute offered rate 0 bps, drop rate 0 bps
5 minute offered rate 0 bps, drop rate 0 bps
Class-map: class-default (match-any)
5 minute offered rate 0 bps, drop rate 0 bps
rate 20 %
rate 80000 bps, burst 2500 bytes <-------------------------------
Now for the second method the configured rate (bits per second) would be static
Remember that you need to have the correct BW settings or the max
reservable bw do.
Rxx(config-if)#do show queueing int s0/0/0
Interface Serial0/0/0 queueing strategy: fair
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 360010
Queueing strategy: Class-based queueing
Output queue: 0/1000/64/360010 (size/max total/threshold/drops)
Conversations 0/0/128 (active/max active/max total)
Reserved Conversations 1/1 (allocated/max allocated)
Available Bandwidth 150 kilobits/sec
Rxx(config-if)#do show queueing int s0/0/0 | in Av
Available Bandwidth 150 kilobits/sec
Rxx(config-if)#band 300
Rxx(config-if)#do show queueing int s0/0/0 | in Av
Available Bandwidth 75 kilobits/sec
Rxx(config-if)#band 200
Rxx(config-if)#do show queueing int s0/0/0 | in Av
Available Bandwidth 0 kilobits/sec
Rxx(config-if)#band 100
CBWFQ: Not enough available bandwidth for all classes Available 75
(kbps) Needed 150 (kbps)
Rxx(config-if)#CBWFQ: Removing service policy on Serial0/0/0
Method #2
Rxx(config-if)# policy-map NUTTS
Rxx(config-pmap)# class class-default
Rxx(config-pmap-c)# police 204000
Rxx(config-pmap-c-police)#
Rxx(config-pmap-c-police)#conform-action transmit
Rxx(config-pmap-c-police)#
Rxx(config-pmap-c-police)#exceed-action drop
Rxx(config-pmap-c-police)#int s0/0/0
Rxx(config-if)#band 400
Rxx(config-if)#no fair
Rxx(config-if)#serv out NUTTS
Rxx(config-if)#do show policy-map int s0/0/0 | be class-default
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 128
(total queued/total drops/no-buffer drops) 0/0/0
police:
cir 204000 bps, bc 6375 bytes <-------------------------------
conformed 0 packets, 0 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
see the static CIR there configured to the Bit rate you configured?
now to understand this a little bit more, let manipulate the band and
remove all the min rev bw configurations
Verification:
Rxx(config-if)#policy-map NUTTS
Rxx(config-pmap)#no class www
Rxx(config-pmap)#no class ftp
Rxx(config-pmap)#do show policy-map int s0/0/0
Serial0/0/0
Service-policy output: NUTTS
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 128
(total queued/total drops/no-buffer drops) 0/0/0
police:
cir 204000 bps, bc 6375 bytes
conformed 0 packets, 0 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
Rxx(config-pmap)#int s0/0/0
Rxx(config-if)#band 100 <---------- Manipulation of the BW
Rxx(config-if)#do show policy-map int s0/0/0
Serial0/0/0
Service-policy output: NUTTS
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 32
(total queued/total drops/no-buffer drops) 0/0/0
police:
cir 204000 bps, bc 6375 bytes <---------- Nothing happens here!
conformed 0 packets, 0 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
Rxx(config-if)#do show run policy-map
Building configuration...
Current configuration : 134 bytes
!
policy-map NUTTS
class class-default
fair-queue
police cir 204000
conform-action transmit
exceed-action drop
!
end
Rxx(config-if)#policy-map NUTTS
Rxx(config-pmap)#class class-default
Rxx(config-pmap-c)#police rate percent 20
Rxx(config-pmap-c-police)#do show policy-map int s0/0/0
Serial0/0/0
Service-policy output: NUTTS
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 32
(total queued/total drops/no-buffer drops) 0/0/0
police:
rate 20 %
rate 20000 bps, burst 1500 bytes <---------- See the Thing there
conformed 0 packets, 0 bytes; actions:
transmit
exceeded 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps
Rxx(config-pmap-c)#int s0/0/0
Rxx(config-if)# band 10
cir must fall between 8000 and 2000000000
cir must fall between 8000 and 2000000000
Have fun Frog!
HTH
Victor.-
On Sat, Jul 19, 2008 at 7:40 AM, Radioactive Frog <pbhatkoti@gmail.com> wrote:
> Scenario#
> 2 sites - siteA and siteb, total bandwidth between sites is 1024 kbps
>
> Question# transmit all traffic below 20% of pvc, excess traffic should be
> dropped.
>
> Whats the difference between method#1 and method2
>
> -----------------------------method#1-----------------------------
> policy-map NUTTS
> class www
> priority 100
> class ftp
> bandwidth 50
> class-default
> fair-queue
> police rate percent 20 conform-action transmit exceed-action drop
>
>
> Vs
> -----------------------------method#2-----------------------------
> policy-map NUTTS
> class www
> priority 100
> class ftp
> bandwidth 50
> class-default
> fair-queue
> police 204000 conform-action transmit exceed-action drop
>
> note; 204 is calculated from 20% of 1024(pvc).
>
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
-- Victor Cappuccio CCIE R/S# 20657 CCSI# 30452 www.vcappuccio.wordpress.com
This archive was generated by hypermail 2.1.4 : Mon Aug 04 2008 - 06:11:55 ART