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 of NBAR (network- based application recognition),classification QOS How to configure NBAR?

 When we implement Quality of Service (QoS ) the first step is classification, by default our router does not care about what kind of IP packets it is. Our router just looks at the routing table to find the correct destination IP address and forwards. When we configure QoS technologies like queuing, policing, or shaping before doing first we have to identify what kind of traffic is running on our routers so we can figure out what kind of application it belongs to. This is 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?     Once we identify our traffic (classify). Now we can mark and apply QoS policy to it. There are a few methods on IOS routers for classification: Header inspection It is a simple classification method and it works really good but has some disadvantages. Let’s say we configure our router all th...

OSPF Tunnels Vs Virtual-links

OSPF VIRTUAL LINKS  An Open Shortest Path First (OSPF) autonomous system has all areas physically connected to the backbone area (Area 0). In some cases, if this is not possible, we can use a virtual link to connect to the backbone (Area 0) through a non-backbone area. We can also use the virtual links to connect two parts of a partitioned backbone (Area 0) through a non-backbone area. The area through which we configure the virtual link, known as a transit area, must have full routing information. Remember, the transit area cannot be a stub area. Virtual link must be configuring both sides with the same area ID and the corresponding virtual link OSPF neighbor router ID. Show IP OSPF neighbors command give you the router ID information. OSPF Transit Area from Tunnel When configuring OSPF with tunnel interfaces as transit areas, there are several important considerations to ensure proper routing functionality. Here's what you need to know: Key Concepts Transit Area : In OS...

The Internal Components of a Cisco Router and Switch

The Internal Components of a Cisco Router and Switch Bootstrap Bootstrap is stored in the microcode of the ROM, the bootstrap is bringing a router up during initialization. It will boot the router and then load the IOS. POST POST (power-on-self-test) is stored in the microcode of the ROM, the POST is used to check the basic functionality of the router hardware and determine which interfaces are present. ROM monitor ROM monitor stored in the microcode of the ROM monitor is used for manufacturing, testing, and troubleshooting. Mini-IOS Mini-IOS called the RXBOOT or boot loader by Cisco, the mini-IOS is a small IOS in ROM that can be used to bring up an interface and load a Cisco IOS into flash memory. The mini-IOS can also perform a few other maintenance operations. RAM RAM (randomly used to hold packet buffers, ARP cache, routing table, and also access memory) is the software and data structure that allows the router to function. Running configuration is stored in RAM...