QOS using telnet to port 80

From: Greg Wendel (gwendel@gmail.com)
Date: Mon Mar 03 2008 - 01:14:32 ARST


I found the commands below on a previous groupstudy search so I need to
credit someone, but I am not sure who to credit. Here is what I
rediscovered. So if anyone knows who to credit please let me know.

Interesting in the way routers treat html traffic generated via the telnet
command.

Setup a simple policy map on an outbound fast e connection to a router
running the ip http server command
router setup with
ip http server
ip path bootflash
simple file created called test.jpg in the bootflash directory (router
complained if i used disk0 instead of bootflash)
also setup acl to match on precedence
xtended IP access list QOSMARKS (Compiled)
    10 permit ip any any dscp cs7 (1138 matches)
    20 permit ip any any dscp cs1
    30 permit ip any any dscp cs2
    40 permit ip any any dscp cs3 (20 matches)
    50 permit ip any any dscp cs4
    60 permit ip any any dscp cs5 (52 matches)
    70 permit ip any any dscp cs6

Here is what I found

When doing the following

Rack1R1#telnet 192.10.1.254 80
Trying 192.10.1.254, 80 ... Open
get /test.jpg

The http server router wouldn't send the file and the http counters on
either ip accounting / nbar or sh policy map didn't increment.
[Connection to 192.10.1.254 closed by foreign host]

If however I added the following

Rack1R1#telnet 192.10.1.254 80
Trying 192.10.1.254, 80 ... Open
*GET /test.jpg HTTP/1.1
*
HTTP/1.1 400 Bad Request

The router tried to send the file and all of the counters incremented.

What also worked to generate traffic was this

Rack1R2#copy http://192.10.1.254/test.jpg flash

Here is the relevant configuration.

class-map match-all ICMP
 match protocol icmp
class-map match-all HTTP
 match protocol http
class-map match-all PICTURES
 match protocol http url "*.jpg|*.jpeg|*.gif"
!
!
policy-map QOS
 class PICTURES
  set dscp cs5
 class ICMP
  set dscp cs3
 class class-default
  set dscp cs7
!
int f0/0
 service-policy output QOS

-- 
Gregory Wendel
Springfield VA, 22153


This archive was generated by hypermail 2.1.4 : Tue Apr 01 2008 - 07:53:52 ART