qos:three steps or layers
policy-map:what to do(for the traffic you matched)
service-policy:where to do(for the policy)
section 1
R1 is experiencing a high volume of traffic coming in from R2
implement the following policy:
HTTP and HTTPS should be limited to 100kbps
FTP should be limited to 50kbps
ALL recognized peer-to-peer file sharing
application should be dropped
config)#class-map {match-all/match-any}
classmapname
match-all:Logical-AND all matching statements under
this classmap
match-any:Logical-OR all matching statements under
this classmap
default is match-all
in this case .the http and https must not be matched at the same time.so we choose the match-any
first step:
config)#class-map match-any WEB
config-cmap)#match protcol http
config-cmap)#match protcol secure-http
config-cmap)#^z
config)#class-map match-any FTP
config-cmap)#match protcol ftp
config-cmap)#^z
config)#class-map match-any P2P
config-cmap)#match protcol fasttrack
config-cmap)#match protcol peatella
config-cmap)#match protcol mapster
config-cmap)#match protcol kazav2
config-cmap)#match protcol
config-cmap)#^z
second step:
config)#policy-map CCIE_POLICY
config-pmap)#class WEB
config-pmap-c)#police100000
config-pmap-c-police)#config-action transit
config-pmap-c-police)#exceed-action drop
config-pmap-c-police)#exit
config-pmap-c)#exit
config-pmap)#class FTP
config-pmap-c)#police 50000
config-pmap-c-police)#config-action transit
config-pmap-c-police)#exceed-action drop
config-pmap-c-police)#exit
config-pmap-c)#exit
config-pmap)#class P2P
config-pmap-c)#police 8000
config-pmap-c-police)#drop
config-pmap-c-police)#exit
config-pmap-c)#exit
R1#show policy-map
R1#Policy Map CCIE_POLICY
Class WEB
police cir 100000 bc 3125
confim-action transmit
exceed-action drop
Class FTP
police cir 50000 bc 1562
confim-action transmit
exceed-action drop
Class P2P
drop
cisco auto config the burst traffic for the cir
you typed in and guaranteed
third step:
config-if)#sevice-policy intput CCIE_POLICY
sh policy-map interface fa0/1
see the policy taking affect
section 2
R2 connects to a voip network on VLAN 140,This is your critical application on R2,guarantee 128Kbps of priority bandwidth to the hosts on VLAN 140 as they enter the Frame Relay network. All other traffic types should be treated with Fair-Queuing.
CONFIG)#access-list 92 permit 180.1.60.0 0.0.0.255
CONFIG)#class-map HOST_PRI
CONFIG-cmap)#match access-group 92
CONFIG-cmap)#exit
CONFIG)#policy-map PRI
CONFIG-pmap)#class HOST_PRI
CONFIG-pmap-c)#priority 128 /*traffic guarantee*/
CONFIG-pmap-c)#match class-default
CONFIG-if)#sevice-poliy output PRI
section 3:
R3 is experiencing considerable lod from the BB1 router,Configure this router to poroactively drop HTTP and HTTP-S packets before the packet buffers fill completely.Just before the packet buffers have filled to the maximum threshold.the router should be dropping 1 out of every 20 packets.
class-map match-map WEB
match protocol http
match protocol secure-http
policy-map WRED
class WEB
random-detect procedence 0 100 500 20
^z
explain:
0: class level
100:minimum threshold
500:maximum threshold
20: drop 1 packet every 20 packets
class-map:what to match(determine what are you going to match)
policy-map:what to do(for the traffic you matched)
service-policy:where to do(for the policy)
section 1
R1 is experiencing a high volume of traffic coming in from R2
implement the following policy:
HTTP and HTTPS should be limited to 100kbps
FTP should be limited to 50kbps
ALL recognized peer-to-peer file sharing
application should be dropped
config)#class-map {match-all/match-any}
classmapname
match-all:Logical-AND all matching statements under
this classmap
match-any:Logical-OR all matching statements under
this classmap
default is match-all
in this case .the http and https must not be matched at the same time.so we choose the match-any
first step:
config)#class-map match-any WEB
config-cmap)#match protcol http
config-cmap)#match protcol secure-http
config-cmap)#^z
config)#class-map match-any FTP
config-cmap)#match protcol ftp
config-cmap)#^z
config)#class-map match-any P2P
config-cmap)#match protcol fasttrack
config-cmap)#match protcol peatella
config-cmap)#match protcol mapster
config-cmap)#match protcol kazav2
config-cmap)#match protcol
config-cmap)#^z
second step:
config)#policy-map CCIE_POLICY
config-pmap)#class WEB
config-pmap-c)#police100000
config-pmap-c-police)#config-action transit
config-pmap-c-police)#exceed-action drop
config-pmap-c-police)#exit
config-pmap-c)#exit
config-pmap)#class FTP
config-pmap-c)#police 50000
config-pmap-c-police)#config-action transit
config-pmap-c-police)#exceed-action drop
config-pmap-c-police)#exit
config-pmap-c)#exit
config-pmap)#class P2P
config-pmap-c)#police 8000
config-pmap-c-police)#drop
config-pmap-c-police)#exit
config-pmap-c)#exit
R1#show policy-map
R1#Policy Map CCIE_POLICY
Class WEB
police cir 100000 bc 3125
confim-action transmit
exceed-action drop
Class FTP
police cir 50000 bc 1562
confim-action transmit
exceed-action drop
Class P2P
drop
cisco auto config the burst traffic for the cir
you typed in and guaranteed
third step:
config-if)#sevice-policy intput CCIE_POLICY
sh policy-map interface fa0/1
see the policy taking affect
section 2
R2 connects to a voip network on VLAN 140,This is your critical application on R2,guarantee 128Kbps of priority bandwidth to the hosts on VLAN 140 as they enter the Frame Relay network. All other traffic types should be treated with Fair-Queuing.
CONFIG)#access-list 92 permit 180.1.60.0 0.0.0.255
CONFIG)#class-map HOST_PRI
CONFIG-cmap)#match access-group 92
CONFIG-cmap)#exit
CONFIG)#policy-map PRI
CONFIG-pmap)#class HOST_PRI
CONFIG-pmap-c)#priority 128 /*traffic guarantee*/
CONFIG-pmap-c)#match class-default
CONFIG-if)#sevice-poliy output PRI
section 3:
R3 is experiencing considerable lod from the BB1 router,Configure this router to poroactively drop HTTP and HTTP-S packets before the packet buffers fill completely.Just before the packet buffers have filled to the maximum threshold.the router should be dropping 1 out of every 20 packets.
class-map match-map WEB
match protocol http
match protocol secure-http
policy-map WRED
class WEB
random-detect procedence 0 100 500 20
^z
explain:
0: class level
100:minimum threshold
500:maximum threshold
20: drop 1 packet every 20 packets
转载于:https://blog.51cto.com/simonzh/120294