QoS for AToM

April 16, 2010 at 12:48 am | Posted in MPLS, QoS | Leave a comment

Topology

Add R5 as a P router between R1 & R2 in the previous lab, so that we can monitor packets based on MPLS EXP bits.

R3 —— R1 —— R5 —— R2 —— R4

Configuration

 

R3#

class-map TELNET
 match protocol telnet

class-map ICMP
 match protocol icmp

class-map ANY
 match any
policy-map SET_COS

class TELNET
 set cos 5

class ICMP
 set cos 1

class ANY
 set cos 2

interface FastEthernet0/0.100
 encapsulation dot1Q 100
 ip address 34.0.0.3 255.255.255.0
 service-policy output SET_COS

R1#
class-map COS7
 match cos 7
class-map COS6
 match cos 6
class-map COS5
 match cos 5
class-map COS4
 match cos 4
class-map COS3
 match cos 3
class-map COS2
 match cos 2
class-map COS1
 match cos 1
class-map COS0
 match cos 0

policy-map ETHERNET_OVER_MPLS

class COS7
 set mpls experimental 7
class COS6
 set mpls experimental 6
class COS5
 set mpls experimental 5
class COS4
 set mpls experimental 4
class COS3
 set mpls experimental 3
class COS2
 set mpls experimental 2
class COS1
 set mpls experimental 1
class COS0
 set mpls experimental 0

!
interface FastEthernet0/1.100
 description Connect to R3 via VLAN 100
 encapsulation dot1Q 100
 service-policy input ETHERNET_OVER_MPLS
 no cdp enable
 xconnect 2.2.2.2 1000 pw-class AToM
R5#
no class-map match-all EXP7
no class-map match-all EXP6
no class-map match-all EXP5
no class-map match-all EXP4
no class-map match-all EXP3
no class-map match-all EXP2
no class-map match-all EXP1
no class-map match-all EXP0

class-map match-all EXP7
  match mpls experimental topmost 7
class-map match-all EXP6
  match mpls experimental topmost 6
class-map match-all EXP5
  match mpls experimental topmost 5
class-map match-all EXP4
  match mpls experimental topmost 4
class-map match-all EXP3
  match mpls experimental topmost 3
class-map match-all EXP2
  match mpls experimental topmost 2
class-map match-all EXP1
  match mpls experimental topmost 1
class-map match-all EXP0
  match mpls experimental topmost 0
no policy-map EXP_COUNTERS

policy-map EXP_COUNTERS
class EXP7
class EXP6
class EXP5
class EXP4
class EXP3
class EXP2
class EXP1
class EXP0
class class-default
int fa0/0
 service-policy input EXP_COUNTERS
 service-policy output EXP_COUNTERS

Verification

 
Rack1R3#ping 34.0.0.4 rep 100

Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 8/32/84 ms
Rack1R3#telnet 34.0.0.4
Trying 34.0.0.4 … Open

Rack1R4>
Rack1R4>
Rack1R4>
Rack1R4>exit

[Connection to 34.0.0.4 closed by foreign host]
Rack1R3#telnet 34.0.0.4 80
Trying 34.0.0.4, 80 …
% Connection refused by remote host

Rack1R3#telnet 34.0.0.4 80
Trying 34.0.0.4, 80 …
% Connection refused by remote host

Rack1R3#
Rack1R3#
Rack1R3#sh policy-map interface
 FastEthernet0/0.100

  Service-policy output: SET_COS

    Class-map: TELNET (match-all)
      21 packets, 1350 bytes

      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol telnet
      QoS Set
        cos 5
          Packets marked 21

    Class-map: ICMP (match-all)
      100 packets, 11800 bytes

      5 minute offered rate 0 bps, drop rate 0 bps
      Match: protocol icmp
      QoS Set
        cos 1
          Packets marked 100

    Class-map: ANY (match-all)
      2 packets, 128 bytes

      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      QoS Set
        cos 2
          Packets marked 2

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any

Rack1R1#sh policy-map interface

 FastEthernet0/1.100

  Service-policy input: ETHERNET_OVER_MPLS

    Class-map: COS7 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  7
      QoS Set
        mpls experimental imposition 7
           Packets marked 0

    Class-map: COS6 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  6
      QoS Set
        mpls experimental imposition 6
           Packets marked 0

    Class-map: COS5 (match-all)
      21 packets, 1350 bytes

      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  5
      QoS Set
        mpls experimental imposition 5
           Packets marked 21

    Class-map: COS4 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  4
      QoS Set
        mpls experimental imposition 4
           Packets marked 0

    Class-map: COS3 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  3
      QoS Set
        mpls experimental imposition 3
           Packets marked 0
    Class-map: COS2 (match-all)
      2 packets, 128 bytes

      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  2
      QoS Set
        mpls experimental imposition 2
           Packets marked 2

    Class-map: COS1 (match-all)
      100 packets, 11800 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  1
      QoS Set
        mpls experimental imposition 1
           Packets marked 100

    Class-map: COS0 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: cos  0
      QoS Set
        mpls experimental imposition 0

           Packets marked 0

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
Rack1R5#sh policy-map interface fa0/0 input

 FastEthernet0/0

  Service-policy input: EXP_COUNTERS

    Class-map: EXP7 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps
      Match: mpls experimental topmost 7

    Class-map: EXP6 (match-all) ! ROUTING(?) & CONTROL TRAFFIC
      36 packets, 2780 bytes

      5 minute offered rate 0 bps
      Match: mpls experimental topmost 6

    Class-map: EXP5 (match-all) ! Telnet
      21 packets, 1518 bytes

      5 minute offered rate 0 bps
      Match: mpls experimental topmost 5

    Class-map: EXP4 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps

      Match: mpls experimental topmost 4

    Class-map: EXP3 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps
      Match: mpls experimental topmost 3

    Class-map: EXP2 (match-all) ! TCP PORT 80 generated via telnet 34.0.0.4 80
      2 packets, 144 bytes

      5 minute offered rate 0 bps
      Match: mpls experimental topmost 2

    Class-map: EXP1 (match-all) ! Pings
      100 packets, 12600 bytes

      5 minute offered rate 0 bps
      Match: mpls experimental topmost 1

    Class-map: EXP0 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps
      Match: mpls experimental topmost 0
    Class-map: class-default (match-any) ! Plain IP TRAFFIC (not MPLS)
      8 packets, 528 bytes

      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any

Reference

http://fengnet.com/book/IOS_MPLS/ch13lev1sec6.html

Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: