Skip to main content

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


Comments

Popular posts from this blog

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

  Classification and Marking Classification and marking are the processes of identifying the priority of each packet. This is the first step of QOS control and should be done near the source hosts. Classification is the process of identifying and categorising traffic into classes, typically based upon incoming interface IP precedence, DSCP Source or Destination address. Application classification is the most fundamental QOS building block. Without classification, all packets are treated the same.   The table lists the criteria of classification                                  Marking  Marking is the QOS feature component that colours a packet so it can be identified and distinguished from other packets in QOS treatment. Commonly used markers: link-layer: COS (ISL, 802.1q), MPLS EXP bits,...

OSPF default routing

  OSPF Default Route Configuring OSPF Default route is not a big problem. We have couple of options when we want to OSPF default route. Here is an example R1(config)#router ospf 1  R1(config-router)#default-information originate ?   always       Always advertise default route   metric       OSPF default metric   metric-type  OSPF metric type for default routes   route-map    Route-map reference   <cr> We can change numbers of things for example metric or metric type but most of the people forget about the most important thing is the always keyword.  If we add the always command this feature advertises the default route even if we do not have in our routing table. It will look like that route is installed in routing table.   When we use the default information originate we can advertise a default route in OSPF. But OSPF won’t...

BGP Local preference configuration

BGP Local preference (Local_Pref) Path attribute gives the router inside a single autonomous system a value that they can set per-route and advertise to all iBGP routers inside the autonomous system, so that all routers in the autonomous system agree about which routers is the best exit point for packet destined for that prefix. Local preference (Local_Pref) is the second BGP attribute. We can use the local preference to choose the outbound external BGP path. Local preference is sent to all internal BGP (iBGP) routers in our autonomous system. Local preference (Local_Pref) is not exchanged between external BGP routers. It’s a well-known and discretionary BGP attribute. Default value is 100. The path with the highest local preference is desirable  Topology:- TASK: To reach 50.1.1.1, 15.0.0.1 network router 2 and router 3 using 3.1.1.2 path ( AS 65144) because it has less numbers of au...