From: dave dave (funccie@gmail.com)
Date: Fri Feb 20 2009 - 12:19:16 ARST
Hi Narbik,
Thanks, you make the technology very very simple :) Your below LAB &
explantion is too good.
Thanks & Regards,
Dave
On Fri, Feb 20, 2009 at 5:34 PM, Narbik Kocharians <narbikk@gmail.com>wrote:
> Try this lab and you will know exactly what happens, and all you need is
> two routers connected back to back using their FastEthernet or Ethernet.
>
> * *
>
> *IP Addressing:*
>
>
>
> R1:
>
> F0/0 = 10.1.12.1 /24 and also assign an IPv6 address of 12::1/64
>
>
>
> R2:
>
> F0/0 = 10.1.12.2/24 and also assign an IPv6 address of 12::2/64
>
>
>
>
>
>
>
> *Task 1*
>
>
>
> From R2, ping R1 using an extended Ping, this traffic should be generated
> with an IP Precedence of 1. You should use an MQC to verify the traffic's
IP
> Precedence levels of IPv4 packets.
>
>
>
>
>
> *For verification, 8 class-maps are configured on R1, each matching
> different IP Precedence level, then, a policy-map called "TST" is
> configured, this policy-map references the different classes created
> earlier, and finally, the policy-map TST is applied to the F0/0 interface
of
> R1 in the inbound direction.*
>
> * *
>
> *On R1*
>
>
>
> R1(config)#class-map *QOS0*
>
> R1(config-cmap)#*match ip precedence 0*
>
>
>
> R1(config)#class-map *QOS1*
>
> R1(config-cmap)#*match ip precedence 1*
>
>
>
> R1(config)#class-map *QOS2*
>
>
>
> R1(config-cmap)#*match ip precedence 2*
>
>
>
> R1(config)#class-map *QOS3*
>
>
>
> R1(config-cmap)#*match ip precedence 3*
>
>
>
> R1(config)#class-map *QOS4*
>
> R1(config-cmap)#*match ip precedence 4*
>
>
>
> R1(config)#class-map *QOS5*
>
> R1(config-cmap)#*match ip precedence 5*
>
>
>
> R1(config)#class-map *QOS6*
>
> R1(config-cmap)#*match ip precedence 6*
>
>
>
> R1(config)#class-map *QOS7*
>
> R1(config-cmap)#*match ip precedence 7*
>
>
>
>
>
> R1(config)#policy-map *TST*
>
> R1(config-pmap)#*class QOS0*
>
>
>
> R1(config-pmap)#*class QOS1*
>
>
>
> R1(config-pmap)#*class QOS2*
>
>
>
> R1(config-pmap)#*class QOS3*
>
>
>
> R1(config-pmap)#*class QOS4*
>
>
>
> R1(config-pmap)#*class QOS5*
>
>
>
> R1(config-pmap)#*class QOS6*
>
>
>
> R1(config-pmap)#*class QOS7*
>
>
>
> R1(config)#int f0/0
>
> R1(config-if)#service-policy input *TST*
>
> * *
>
> *To Generate the traffic with IP precedence of 1 from R2: *
>
> * *
>
> *Note an extended ping can be used to generate traffic with different IP
> Precedence levels, remember that the IP Precedence uses the three most
> significant bits of the TOS Byte, and the decimal value of these bits are:
> 128 (The most significant), 64 (The second most significant) and 32 (The
> third most significant), the table below identifies the TOS values and
their
> corresponding IP Precedence value: *
>
> * *
>
> *IP **Precedence***
>
> *Decimal*
>
> *Value*
>
> *IP*
>
> *Precedence Level*
>
> *TOS Levels*
>
> *0*
>
> *0*
>
> *0*
>
> *0*
>
> *0*
>
> *0 31*
>
> *0*
>
> *0*
>
> *1*
>
> *32*
>
> *1*
>
> *32 63*
>
> *0*
>
> *1 *
>
> *0*
>
> *64*
>
> *2*
>
> *64 95*
>
> *0*
>
> *1*
>
> *1*
>
> *96*
>
> *3*
>
> *96 127*
>
> *1*
>
> *0*
>
> *0*
>
> *128*
>
> *4*
>
> *128 159*
>
> *1*
>
> *0*
>
> *1*
>
> *160*
>
> *5*
>
> *160 191*
>
> *1*
>
> *1*
>
> *0*
>
> *192*
>
> *6*
>
> *192 223*
>
> *1*
>
> *1*
>
> *1*
>
> *224*
>
> *7*
>
> *224 - 255*
>
> * *
>
> * *
>
> *On R2*
>
> * *
>
> R2#Ping
>
> Protocol [ip]:
>
> Target IP address: *10.1.12.1*
>
> Repeat count [5]:
>
> Datagram size [100]:
>
> Timeout in seconds [2]:
>
> Extended commands [n]: *y*
>
> Source address or interface: *10.1.12.2*
>
> *Type of service [0]: 32*
>
> Set DF bit in IP header? [no]:
>
> Validate reply data? [no]:
>
> Data pattern [0xABCD]:
>
> Loose, Strict, Record, Timestamp, Verbose[none]:
>
> Sweep range of sizes [n]:
>
> Type escape sequence to abort.
>
> Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
>
> Packet sent with a source address of 10.1.12.2
>
> *!!!!!*
>
> *Success rate is 100 percent (5/5),* round-trip min/avg/max = 1/2/4 ms
>
>
>
> *On R1*
>
>
>
> *R1#Show policy-map interface f0/0*
>
> * *
>
> FastEthernet0/0
>
>
>
> Service-policy input: TST
>
>
>
> Class-map: *QOS0* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 0
>
>
>
> * Class-map: QOS1 (match-all)*
>
> *5 packets*, 570 bytes
>
> 5 minute offered rate 0 bps
>
> *Match: ip precedence 1 *
>
>
>
> Class-map: *QOS2* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 2
>
>
>
> Class-map: *QOS3* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 3
>
>
>
> Class-map: *QOS4* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 4
>
>
>
> Class-map: *QOS5* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 5
>
>
>
> Class-map: *QOS6* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 6
>
>
>
> Class-map: *QOS7* (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 7
>
>
>
> Class-map: class-default (match-any)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps, drop rate 0 bps
>
>
>
> Match: any
>
>
>
> *Note the output of the above Show command reveals that ONLY IP Precedence
> level 1 was matched.*
>
> * *
>
> *To clear the counter:*
>
> * *
>
> R1#cle counter
>
> Clear "show interface" counters on all interfaces [confirm]
>
> * *
>
> *To generate IPv6 traffic:*
>
> * *
>
> *On R2*
>
>
>
> R2#*Ping ipv6*
>
> Target IPv6 address: *12::1*
>
> Repeat count [5]:
>
> Datagram size [100]:
>
> Timeout in seconds [2]:
>
> Extended commands? [no]: *Y*
>
> Source address or interface: *12::2*
>
> UDP protocol? [no]:
>
> Verbose? [no]:
>
> Precedence [0]: *4*
>
> Include hop by hop option? [no]:
>
> Include destination option? [no]:
>
> Sweep range of sizes? [no]:
>
> Type escape sequence to abort.
>
> Sending 5, 100-byte ICMP Echos to 12::1, timeout is 2 seconds:
>
> Packet sent with a source address of 12::2
>
> *!!!!!*
>
> *Success rate is 100 percent (5/5),* round-trip min/avg/max = 0/1/4 ms
>
>
>
> *To verify the configuration:*
>
> * *
>
> *On R1*
>
> * *
>
> *R1#Show policy-map interface F0/0*
>
>
>
> FastEthernet0/0
>
>
>
> Service-policy input: TST
>
>
>
> Class-map: QOS0 (match-all)
>
>
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 0
>
>
>
> Class-map: QOS1 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 1
>
>
>
> Class-map: QOS2 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 2
>
>
>
> Class-map: QOS3 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 3* *
>
>
>
> Class-map: QOS4 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 4
>
>
>
> Class-map: QOS5 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 5
>
>
>
> Class-map: QOS6 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 6* *
>
>
>
> Class-map: QOS7 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: ip precedence 7
>
>
>
> *Class-map: class-default (match-any)*
>
> * *
>
> * 5 packets*, 570 bytes
>
> 5 minute offered rate 0 bps, drop rate 0 bps
>
> Match: any
>
>
>
>
>
> *Note IPv6 traffic was matched to "class class-default" and the Precedence
> level was not detected, this is because when the "class-maps" were
> configured, the "match ip precedence" was used, when "class-map ip
> precedence" is used, it only matches on IPv4 traffic and NOT IPv6.*
>
>
>
>
>
>
>
> *Task 2*
>
>
>
> Remove the service-policy, policy-map and the class-map from the previous
> task.
>
>
>
>
>
> *On R1*
>
>
>
> R1(config)#int f0/0
>
> R1(config-if)#no service-policy input TST
>
>
>
> R1(config)#no policy-map TST
>
>
>
> R1(config)#no class-map QOS0
>
> R1(config)#no class-map QOS1
>
> R1(config)#no class-map QOS2
>
> R1(config)#no class-map QOS3
>
> R1(config)#no class-map QOS4
>
> R1(config)#no class-map QOS5
>
> R1(config)#no class-map QOS6
>
> R1(config)#no class-map QOS7
>
>
>
>
>
>
>
> *Task 3*
>
>
>
> From R2, R1 should be pinged using an extended Ping; this traffic should be
> generated with an IP Precedence of 4. You should use an MQC to verify the
> traffic's IP Precedence levels of IPv6 packets.
>
>
>
>
>
> *Note since the IP Precedence level of IPv6 packets should be matched,
> then, the match statement in the "class-map" should NOT include the "IP"
> keyword; remember that "IP" in IOS references IPv4 and NOT IPv6. *
>
>
>
> *On R1*
>
>
>
> R1(config)#class-map *P0*
>
> R1(config-cmap)#*match precedence 0*
>
>
>
> R1(config)#class-map *P1*
>
> R1(config-cmap)#*match precedence 1*
>
>
>
> R1(config)#class-map *P2 *
>
> R1(config-cmap)#*match precedence 2*
>
>
>
> R1(config)#class-map *P3*
>
> R1(config-cmap)#*match precedence 3*
>
>
>
> R1(config)#class-map *P4*
>
> R1(config-cmap)#*match precedence 4*
>
>
>
> R1(config)#class-map *P5*
>
> R1(config-cmap)#*match precedence 5*
>
>
>
> R1(config)#class-map *P6*
>
> R1(config-cmap)#*match precedence 6*
>
>
>
> R1(config)#class-map* P7*
>
> R1(config-cmap)#*match precedence 7*
>
>
>
> R1(config)#policy-map *TST*
>
> R1(config-pmap)#class P0
>
>
>
> R1(config-pmap)#class P1
>
>
>
> R1(config-pmap)#class P2
>
>
>
> R1(config-pmap)#class P3
>
>
>
> R1(config-pmap)#class P4
>
>
>
> R1(config-pmap)#class P5
>
>
>
> R1(config-pmap)#class P6
>
>
>
> R1(config-pmap)#class P7
>
>
>
> R1(config-pmap)#int f0/0
>
> R1(config-if)#service-policy in *TST*
>
>
>
> *To test the configuration:*
>
> * *
>
> *On R2*
>
>
>
>
>
> R2#*Ping IPv6*
>
> Target IPv6 address: *12::1*
>
> Repeat count [5]:
>
> Datagram size [100]:
>
> Timeout in seconds [2]:
>
> Extended commands? [no]: *Y*
>
> Source address or interface: *12::2*
>
> UDP protocol? [no]:
>
> Verbose? [no]:
>
> Precedence [0]: *4*
>
> Include hop by hop option? [no]:
>
> Include destination option? [no]:
>
> Sweep range of sizes? [no]:
>
> Type escape sequence to abort.
>
> Sending 5, 100-byte ICMP Echos to 12::1, timeout is 2 seconds:
>
> Packet sent with a source address of 12::2
>
> *!!!!!*
>
> *Success rate is 100 percent (5/5),* round-trip min/avg/max = 0/1/4 ms
>
>
>
> *To verify the configuration:*
>
> * *
>
> *On R1*
>
>
>
> *R1#Sh policy-map inter*
>
> * *
>
> FastEthernet0/0
>
>
>
> Service-policy input:* TST*
>
>
>
> Class-map: P0 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 0
>
>
>
> Class-map: P1 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 1
>
>
>
> Class-map: P2 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 2
>
>
>
> Class-map: P3 (match-all)
>
>
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 3
>
>
>
> *Class-map: P4 (match-all)*
>
> * 5 packets, 570 bytes*
>
> * 5 minute offered rate 0 bps*
>
> * Match: precedence 4 *
>
>
>
> Class-map: P5 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 5
>
>
>
> Class-map: P6 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 6
>
>
>
> Class-map: P7 (match-all)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps
>
> Match: precedence 7
>
>
>
> Class-map: class-default (match-any)
>
> 0 packets, 0 bytes
>
> 5 minute offered rate 0 bps, drop rate 0 bps
>
> Match: any
>
>
>
> *Note Precedence level 4 was matched in the IPv6 packets. The "match
> precedence" or "match dscp" command in the "class-map" can match IPv4
and/or
> IPv6, whereas, the "match ip precedence" or "match ip dscp" command in the
> "class-map" can ONLY match the precedence or dscp levels in IPv4 packets
and
> IPv4 packets ONLY. *
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Fri, Feb 20, 2009 at 1:39 AM, Nadeem Ansari <nadeem.ansari574@gmail.com
> > wrote:
>
>> "set ip precedence" will mark precedence value only on IPv4 packet
>> "set precedence" will mark precedence value on both IPv4 and IPv6 packet
>> Simple :)
>>
>> Regards
>> Nadeem
>>
>> On Fri, Feb 20, 2009 at 10:48 AM, dave dave <funccie@gmail.com> wrote:
>>
>> > Hi Expert,
>> >
>> > I see the difference for setting the precedence for L2 COS marked
>> packet.
>> > What your view on this
>>
> ...
>
> [Message clipped]
Blogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Sun Mar 01 2009 - 09:44:12 ARST