
================================================== ===
Match protocol HTTP URL
================================================== ===
r4#copy http://57.1.1.7/cisco.gif ?
archive: Copy to archive: file system
flash: Copy to flash: file system
null: Copy to null: file system
nvram: Copy to nvram: file system
running-config Update (merge with) current system configuration
startup-config Copy to startup configuration
syslog: Copy to syslog: file system
system: Copy to system: file system
r4#copy http://57.1.1.7/cisco.gif null:
Loading http://57.1.1.7/cisco.gif !!!!!!!!!!!
41270 bytes copied in 0.284 secs (145317 bytes/sec)
r5(config)#ip cef
r5(config)#class-map gif
r5(config-cmap)#match protocol http ?
c-header-field Client general Header Field
host Server Host Name
mime Match MIME Type
s-header-field Server general Header Field
url Match URL String
<cr>
r5(config)#class-map match-any image
r5(config-cmap)#match protocol http ?
c-header-field Client general Header Field
host Server Host Name
mime Match MIME Type
s-header-field Server general Header Field
url Match URL String
<cr>
r5(config-cmap)#match protocol http url "*.gif"
r5(config-cmap)#match protocol http url "*.jpeg"
r5(config-cmap)#match protocol http url "*.jpg"
r5(config)#policy-map drop-image
r5(config-pmap)#class image
r5(config-pmap-c)#?
QoS policy-map class configuration commands:
bandwidth Bandwidth
compression Activate Compression
drop Drop all packets
exit Exit from QoS class action configuration mode
netflow-sampler NetFlow action
no Negate or set default values of a command
police Police
priority Strict Scheduling Priority for this Class
queue-limit Queue Max Threshold for Tail Drop
random-detect Enable Random Early Detection as drop policy
service-policy Configure Flow Next
set Set QoS values
shape Traffic Shaping
r5(config-pmap-c)#drop
r5(config)#int fa0/0.2
r5(config-subif)#service-policy input drop-image
----------------------------------------------------------------
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image
Class-map: image (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http url "*.gif"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http url "*.jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http url "*.jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
r4#copy http://57.1.1.7/cisco.gif null:
%Error opening http://57.1.1.7/cisco.gif (I/O error)
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image
Class-map: image (match-any)
10 packets, 3400 bytes
5 minute offered rate 1000 bps, drop rate 1000 bps
Match: protocol http url "*.gif"
10 packets, 3400 bytes <========================
5 minute rate 1000 bps
Match: protocol http url "*.jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http url "*.jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
1 packets, 68 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
================================================== ==========
hostname sw1
interface FastEthernet0/4
switchport access vlan 45
!
interface FastEthernet0/5
switchport trunk encapsulation dot1q
switchport mode trunk
interface VLAN57
ip address 57.1.1.7 255.255.255.0
ip default-gateway 57.1.1.5
ip http server
--------------------------------------------------------------
hostname r4
interface FastEthernet0/0
ip address 45.1.1.4 255.255.255.0
router ospf 1
network 45.1.1.0 0.0.0.255 area 0
--------------------------------------------------------------
hostname r5
class-map match-any image
match protocol http url "*.gif"
match protocol http url "*.jpeg"
match protocol http url "*.jpg"
interface FastEthernet0/0.1
encapsulation dot1Q 45
ip address 45.1.1.5 255.255.255.0
interface FastEthernet0/0.2
encapsulation dot1Q 57
ip address 57.1.1.5 255.255.255.0
service-policy input drop-image
router ospf 1
network 45.1.1.0 0.0.0.255 area 0
network 57.1.1.0 0.0.0.255 area 0
================================================== =
Match protocol HTTP MIME
================================================== =
r5(config)#class-map match-any image2
r5(config-cmap)#match prot http mime "*gif"
r5(config-cmap)#match prot http mime "*jpeg"
r5(config-cmap)#match prot http mime "*jpg"
r5(config)#policy-map drop-image2
r5(config-pmap)#class image2
r5(config-pmap-c)#drop
r5(config)#int fa0/0.2
r5(config-subif)#service-policy input drop-image2
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image2
Class-map: image2 (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http mime "*gif"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http mime "*jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http mime "*jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
r4#copy http://57.1.1.7/cisco.gif null:
%Error opening http://57.1.1.7/cisco.gif (I/O error)
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image2
Class-map: image2 (match-any)
10 packets, 3400 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http mime "*gif"
10 packets, 3400 bytes <========================
5 minute rate 0 bps
Match: protocol http mime "*jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http mime "*jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
2 packets, 136 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Match protocol HTTP URL
================================================== ===
r4#copy http://57.1.1.7/cisco.gif ?
archive: Copy to archive: file system
flash: Copy to flash: file system
null: Copy to null: file system
nvram: Copy to nvram: file system
running-config Update (merge with) current system configuration
startup-config Copy to startup configuration
syslog: Copy to syslog: file system
system: Copy to system: file system
r4#copy http://57.1.1.7/cisco.gif null:
Loading http://57.1.1.7/cisco.gif !!!!!!!!!!!
41270 bytes copied in 0.284 secs (145317 bytes/sec)
r5(config)#ip cef
r5(config)#class-map gif
r5(config-cmap)#match protocol http ?
c-header-field Client general Header Field
host Server Host Name
mime Match MIME Type
s-header-field Server general Header Field
url Match URL String
<cr>
r5(config)#class-map match-any image
r5(config-cmap)#match protocol http ?
c-header-field Client general Header Field
host Server Host Name
mime Match MIME Type
s-header-field Server general Header Field
url Match URL String
<cr>
r5(config-cmap)#match protocol http url "*.gif"
r5(config-cmap)#match protocol http url "*.jpeg"
r5(config-cmap)#match protocol http url "*.jpg"
r5(config)#policy-map drop-image
r5(config-pmap)#class image
r5(config-pmap-c)#?
QoS policy-map class configuration commands:
bandwidth Bandwidth
compression Activate Compression
drop Drop all packets
exit Exit from QoS class action configuration mode
netflow-sampler NetFlow action
no Negate or set default values of a command
police Police
priority Strict Scheduling Priority for this Class
queue-limit Queue Max Threshold for Tail Drop
random-detect Enable Random Early Detection as drop policy
service-policy Configure Flow Next
set Set QoS values
shape Traffic Shaping
r5(config-pmap-c)#drop
r5(config)#int fa0/0.2
r5(config-subif)#service-policy input drop-image
----------------------------------------------------------------
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image
Class-map: image (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http url "*.gif"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http url "*.jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http url "*.jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
r4#copy http://57.1.1.7/cisco.gif null:
%Error opening http://57.1.1.7/cisco.gif (I/O error)
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image
Class-map: image (match-any)
10 packets, 3400 bytes
5 minute offered rate 1000 bps, drop rate 1000 bps
Match: protocol http url "*.gif"
10 packets, 3400 bytes <========================
5 minute rate 1000 bps
Match: protocol http url "*.jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http url "*.jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
1 packets, 68 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
================================================== ==========
hostname sw1
interface FastEthernet0/4
switchport access vlan 45
!
interface FastEthernet0/5
switchport trunk encapsulation dot1q
switchport mode trunk
interface VLAN57
ip address 57.1.1.7 255.255.255.0
ip default-gateway 57.1.1.5
ip http server
--------------------------------------------------------------
hostname r4
interface FastEthernet0/0
ip address 45.1.1.4 255.255.255.0
router ospf 1
network 45.1.1.0 0.0.0.255 area 0
--------------------------------------------------------------
hostname r5
class-map match-any image
match protocol http url "*.gif"
match protocol http url "*.jpeg"
match protocol http url "*.jpg"
interface FastEthernet0/0.1
encapsulation dot1Q 45
ip address 45.1.1.5 255.255.255.0
interface FastEthernet0/0.2
encapsulation dot1Q 57
ip address 57.1.1.5 255.255.255.0
service-policy input drop-image
router ospf 1
network 45.1.1.0 0.0.0.255 area 0
network 57.1.1.0 0.0.0.255 area 0
================================================== =
Match protocol HTTP MIME
================================================== =
r5(config)#class-map match-any image2
r5(config-cmap)#match prot http mime "*gif"
r5(config-cmap)#match prot http mime "*jpeg"
r5(config-cmap)#match prot http mime "*jpg"
r5(config)#policy-map drop-image2
r5(config-pmap)#class image2
r5(config-pmap-c)#drop
r5(config)#int fa0/0.2
r5(config-subif)#service-policy input drop-image2
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image2
Class-map: image2 (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http mime "*gif"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http mime "*jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http mime "*jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
r4#copy http://57.1.1.7/cisco.gif null:
%Error opening http://57.1.1.7/cisco.gif (I/O error)
r5#sh policy-map int fa0/0.2
FastEthernet0/0.2
Service-policy input: drop-image2
Class-map: image2 (match-any)
10 packets, 3400 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol http mime "*gif"
10 packets, 3400 bytes <========================
5 minute rate 0 bps
Match: protocol http mime "*jpeg"
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol http mime "*jpg"
0 packets, 0 bytes
5 minute rate 0 bps
drop
Class-map: class-default (match-any)
2 packets, 136 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any