Thursday, October 14, 2021

What is Marking in QoS ? How to mark packets?

 In this section, we are going to discuss and look at the configuration of marking packets. When we set the TOS (Type of Service) byte with an IP Precedence value or DSCP value this is marking.  In case if you don’t know what is Classification, IP precedence, or DSCPcolor code value click here. I'm assuming you understand Classification.

What is Quality of Service (QOS)?

What is Modular Quality of service CLI (MQC)?

What is Classification and marking? What are IP Precedence and DSCP Values? What is AF and EF?





Let see the configuration:-

Topology:-



Goal:-

  • configure the topology as per the diagram. 
  • configure IP addresses as per the topology. 
  • configure EIGRP AS 65100 and advertise all the directly connected interfaces.
  • configure marking on router 1 to mark the packets coming from FastEthernet 0/0 and fwd to router 3 with IP precedence 2 value.
  • configure  IP precedence of 3 to ICMP packets on router 2.


R1(config)#interface serial 4/0

R1(config-if)#ip address 12.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit


R1(config)#interface fastEthernet 0/0

R1(config-if)#ip address 192.168.10.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#no keepalive

R1(config-if)#exit


R1(config)#interface loopback 0

R1(config-if)#ip address 1.1.0.1 255.255.255.0

R1(config-if)#interface loopback 1

R1(config-if)#ip address 1.1.1.1 255.255.255.0

R1(config-if)#interface loopback 2

R1(config-if)#ip address 1.1.2.1 255.255.255.0

R1(config-if)#interface loopback 3

R1(config-if)#ip address 1.1.3.1 255.255.255.0

R1(config-if)#exit


R2(config)#interface serial 4/0

R2(config-if)#ip address 12.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit


R2(config)#interface serial 4/1

R2(config-if)#ip address 23.1.1.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit


R2(config)#interface fastEthernet 0/0

R2(config-if)#ip address 192.168.20.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#no keepalive

R2(config-if)#exit


R2(config)#interface loopback 0

R2(config-if)#ip address 2.2.0.2 255.255.255.0

R2(config-if)#interface loopback 1

R2(config-if)#ip address 2.2.1.2 255.255.255.0

R2(config-if)#interface loopback 2

R2(config-if)#ip address 2.2.2.2 255.255.255.0

R2(config-if)#interface loopback 3

R2(config-if)#ip address 2.2.3.2 255.255.255.0

R2(config-if)#exit


R3(config)#interface serial 4/1

R3(config-if)#ip address 23.1.1.2 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#exit


R3(config)#interface fastEthernet 0/0

R3(config-if)#ip address 192.168.30.1 255.255.255.0

R3(config-if)#no keepalive

R3(config-if)#exit


R3(config)#interface loopback 0

R3(config-if)#ip address 3.3.0.3 255.255.255.0

R3(config-if)#interface loopback 1

R3(config-if)#ip address 3.3.1.3 255.255.255.0

R3(config-if)#interface loopback 2

R3(config-if)#ip address 3.3.2.3 255.255.255.0

R3(config-if)#interface loopback 3

R3(config-if)#ip address 3.3.3.3 255.255.255.0

R3(config-if)#exit



R1(config)#router eigrp 65100

R1(config-router)#network 12.1.1.1 0.0.0.0

R1(config-router)#network 1.1.0.1 0.0.0.0

R1(config-router)#network 1.1.1.1 0.0.0.0

R1(config-router)#network 1.1.2.1 0.0.0.0

R1(config-router)#network 1.1.3.1 0.0.0.0

R1(config-router)#network 192.168.10.1 0.0.0.0

R1(config-router)#end


R2(config)#router eigrp 65100

R2(config-router)#network 12.1.1.2 0.0.0.0

R2(config-router)#network 2.2.0.2 0.0.0.0

R2(config-router)#network 2.2.1.2 0.0.0.0

R2(config-router)#network 2.2.2.2 0.0.0.0

R2(config-router)#network 2.2.3.2 0.0.0.0

R2(config-router)#network 192.168.20.1 0.0.0.0

R2(config-router)#network 23.1.1.1 0.0.0.0

R2(config-router)#exit



R3(config)#router eigrp 65100
R3(config-router)#network 23.1.1.2 0.0.0.0
R3(config-router)#network 23.1.1.2 0.0.0.0
R3(config-router)#network 192.168.30.1 0.0.0.0
R3(config-router)#network 3.3.0.3 0.0.0.0
R3(config-router)#network 3.3.1.3 0.0.0.0
R3(config-router)#network 3.3.2.3 0.0.0.0
R3(config-router)#network 3.3.3.3 0.0.0.0
R3(config-router)#exit

*Oct 14 17:14:20.351: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65100: Neighbor 23.1.1.1 (Serial4/1) is up: new adjacency


R1(config)#access-list 111 permit IP host 192.168.10.1 host 192.168.30.1
R1(config)#class-map TEST
R1(config-cmap)#match access-group 111
R1(config-cmap)#exit

R1(config)#policy-map TEST-POLICY
R1(config-pmap)#class TEST
R1(config-pmap-c)#set ip precedence 3
R1(config-pmap-c)#end

R1(config)#interface serial 4/0
R1(config-if)#service-policy output TEST-POLICY
R1(config-if)#END

*Oct 14 17:19:48.795: %SYS-5-CONFIG_I: Configured from console by console
R1#ping 192.168.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/52/72 ms




R1#show policy-map interface serial 4/0
 Serial4/0

  Service-policy output: TEST-POLICY

    Class-map: TEST (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 111
      QoS Set
        precedence 3
          Packets marked 0

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

R1#show run class-map
Building configuration...

Current configuration: 57 bytes
!
class-map match-all TEST
 match access-group 111
end



R2(config)#class-map ICMP-TRAFFIC
R2(config-cmap)#match protocol icmp
R2(config-cmap)#exit

R2(config)#policy-map QoS
R2(config-pmap)#class ICMP-TRAFFIC
R2(config-pmap-c)#set ip precedence 2
R2(config-pmap-c)#exit
R2(config-pmap)#exit

R2(config)#interface serial 4/1
R2(config-if)#service-policy output QoS
R2(config-if)#EXIT
R2(config)#exit


R2#show policy-map interface serial 4/1
 Serial4/1

  Service-policy output: QoS

    Class-map: ICMP-TRAFFIC (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: protocol icmp
      QoS Set
        precedence 2
          Packets marked 0

    Class-map: class-default (match-any)
      11 packets, 857 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any
R2#show run class-map
Building configuration...

Current configuration: 62 bytes
!
class-map match-all ICMP-TRAFFIC
 match protocol icmp
end


R2#ping 192.168.30.1 source 192.168.20.1 repeat 123456789
Type escape sequence to abort.
Sending 123456789, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.20.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 

{ quit }

Success rate is 99 percent (11951/11952), round-trip min/avg/max = 1/13/64 ms
R2#show run class-map
Building configuration...

Current configuration: 62 bytes
!
class-map match-all ICMP-TRAFFIC
 match protocol icmp
end

R2#show policy-map interface serial 4/1
 Serial4/1

  Service-policy output: QoS

    Class-map: ICMP-TRAFFIC (match-all)
      11952 packets, 1243008 bytes
      5 minute offered rate 29000 bps, drop rate 0000 bps
      Match: protocol icmp
      QoS Set
        precedence 2
          Packets marked 11952

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



R1#traceroute 192.168.30.1 source 192.168.10.1
Type escape sequence to abort.
Tracing the route to 192.168.30.1
VRF info: (vrf in name/id, vrf out name/id)
  1 12.1.1.2 52 msec 44 msec 48 msec
  2 23.1.1.2 92 msec 48 msec 44 msec


No comments:

Post a Comment

INSTAGRAM FEED

@soratemplates