Monday, October 4, 2021

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

 

 



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?

What is of NBAR (network- based application recognition), classification QOS How to configure NBAR?


Classification and Marking

Classification and marking is the process 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 categorizing 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 colors 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, frame relay 

network layer:DSCP, IP precedence 



Layer 2 and Layer 3 Header Marking 


let's take a look at Layer 3 IPv4 packet ToS Byte. 




In the starting, the ToS byte defines like this ☝.


  • The starting 3 bits are used to define IP precedence. The higher the value means the higher the priority of IP Packets.
  • Rests of the bits are called the Type of Service. ToS bits are used to assign delay, throughput, and reliability.

let's see the picture for better understanding.




 

But the “type of service” bits which are a specified delay, throughput, and reliability have never been really been used. Only the IP precedence bits are used to assign a priority to the IP packets. do not confuse by the name ToS. 0-7 is called ToS byte and 4-7 bits is called ToS bits (Type of Service). look at the picture below👇. however, ToS bits (Type of Service) have never been used only the IP Precedence is in use for prioritizing the IP packets. 


Let's talks about what we actually using nowadays?

DS field (Differentiated Services)  now we called ToS byte to DS field the name is changed.


DSCP (DiffServ Code Point) provides a 6-bit field for QoS marking in which color code (CS) is also called DSCP value. CS or DSCP  6 bits among which 3 bits are the same as IP precedence, and the other 3 bits are ToS fields. Thus, the DSCP value range is 0 to 63. The graph below shows the DSCP and IP precedence bits:


DSCP value is also known as Per-Hop Behavior PHB is that packets that are marked with a certain codepoint will receive a certain QoS treatment (for example queuing, policing, or shaping). The default Per-Hop Behavior PHB means that we have a packet that is marked with a DSCP value of 000000. This packet should be treated as “best-effort”.

 .

Now there are three types of defined PHBs:

Best-Effort (BE or DSCP 0) is the packet that is marked with a DSCP value of 000000. This packet should be treated as “best-effort”.

 Assured Forwarding (AF) Assured forwarding allows you to provide assurance of delivery as long as the traffic does not exceed some subscribed rate.

Expedited Forwarding (EF).is that any traffic class with EF's related DSCP is given highest priority


let's see CS, AF, EF, and Best effort.





 The first bits are called CS higher number means high priority (same as IP Precedence) and the rest of the 3 bits are called AF higher number means high drop probability assured forwarding bits.




What are CS  and AF?

CS 1    +     AF 1     =  001 0100

CS 2   +     AF 2     =   010 1000

CS 3   +     AF 3     =   011 0110


How this works?

let's take an example we have FastEthernet 0/0 and the queue is full and the router wants drop packets.





 

 



Instagram



Facebook


Twitter



LINKEDIN









Saturday, March 21, 2020

What is Modular Quality of service CLI (MQC)?




The modular Quality of service CLI (MQC) to help by defining a common set of configuration commands to configure many QOS  features in a router or switch.






MQC separates the classification function of a QOS tool from the action (PHB) that the QOS tool wants to perform. To do so, there are three major commands with MQC, with several subordinate commands:


        Class maps


            What traffic do we really care about ?
            Each class is identified using a class map
             A traffic class contain three major elements:
-          A case-sensitive name
-          A series of match command
-          An instruction on how to evaluate the match command if more than one match command exists in the traffic class
Class maps can operate in two modes:
-          Match all: all conditions have to succeed.
-          Match any: at least one condition must succeed.
-          The default mode is match all.




                  R1(config-cmap)#
          Policy maps
              What will be done to this traffic?
             Define a traffic policy, which configures the QOS  features associated with traffic class                          previously identified using a class map.
             A traffic policy contains three major elements:
-          A case-sensitive name
-          A traffic class
-          The QOS  policy associate with that traffic class
Up to 256 traffic classes can be associated with a single traffic policy.
Multiple policy maps can be nested to influence the sequence of QOS  actions.
Service policy
Where will this policy be implemented?
Attaches a traffic policy configured with a policy map an interface.
Service polices can be applied to an interface for inbound or outbound packets.

R1(config-pmap-c)#


 Service policy
Where will this policy be implemented?
Attaches a traffic policy configured with a policy map an interface.
Service polices can be applied to an interface for inbound or outbound packets.


\
let see the configuration:


Topology:                                                                                                                                




TASK:

  • configure the topology as per the diagram 
  • Assign IP addresses as per the diagram 
  • configure OSPF and advertise all the directly connected interfaces 
  • configure MQC policy on router 1 serial 3/2
  • traffic flows for ICMP between Router 1 and Router 3 serial 3/2 network (10.1.1.1 to 30.1.1.1) should be guaranteed 130 kbps.assign 70 kbps to HTTP traffic.




R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.1         YES manual up                    up
Serial3/2                    3.3.3.2         YES manual up                    up


R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.2         YES manual up                    up
Serial3/1                    2.2.2.1         YES manual up                    up



R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial3/1                     2.2.2.2         YES manual up                    up
Serial3/2                     3.3.3.1         YES manual up                    up


R1(config)#router ospf 1
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
R1(config-router)#network 3.0.0.0 0.255.255.255 area 0
R1(config-router)#exit



*Jan  5 23:40:32.179: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial3/0 from LOADING to FULL, Loading Done



R2(config)#router ospf 1
R2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R2(config-router)#network 2.0.0.0 0.255.255.255 area 0
R2(config-router)#network 1.0.0.0 0.255.255.255 area 0
R2(config-router)#exit



*Jan  5 23:40:31.891: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial3/0 from LOADING to FULL, Loading Done

*Jan  5 23:41:07.539: %OSPF-5-ADJCHG: Process 1, Nbr 30.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done


R3(config)#router ospf 1
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#network 3.0.0.0 0.255.255.255 area 0
R3(config-router)#network 2.0.0.0 0.255.255.255 area 0
R3(config-router)#exit

*Jan  5 23:41:07.835: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done

*Jan  6 00:21:31.051: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial3/2 from LOADING to FULL, Loading Done



R1#show ip pro
*** IP Routing is NSF aware ***

Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 10.1.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    1.0.0.0 0.255.255.255 area 0
    3.0.0.0 0.255.255.255 area 0
    10.0.0.0 0.255.255.255 area 0
  Routing Information Sources:
    Gateway         Distance      Last Update
    20.1.1.1             110      00:01:29
    30.1.1.1             110      00:00:43
  Distance: (default is 110)

R1#show ip route ospf

Gateway of last resort is not set

O     2.0.0.0/8 [110/128] via 1.1.1.2, 00:01:40, Serial3/0
O     20.0.0.0/8 [110/65] via 1.1.1.2, 00:01:40, Serial3/0
·         30.0.0.0/8 [110/129] via 1.1.1.2, 00:00:55, Serial3/0







R2#show ip pro
*** IP Routing is NSF aware ***


Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 20.1.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    1.0.0.0 0.255.255.255 area 0
    2.0.0.0 0.255.255.255 area 0
    20.0.0.0 0.255.255.255 area 0
  Routing Information Sources:
    Gateway         Distance      Last Update
    10.1.1.1             110      00:02:02
    30.1.1.1             110      00:01:25
  Distance: (default is 110)

R2#show ip route ospf

Gateway of last resort is not set

O     3.0.0.0/8 [110/128] via 1.1.1.1, 00:02:09, Serial3/0
O     10.0.0.0/8 [110/65] via 1.1.1.1, 00:02:09, Serial3/0
·         30.0.0.0/8 [110/65] via 2.2.2.2, 00:01:31, Serial3/1


R3#show ip pro
*** IP Routing is NSF aware ***



Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 30.1.1.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    2.0.0.0 0.255.255.255 area 0
    3.0.0.0 0.255.255.255 area 0
    30.0.0.0 0.255.255.255 area 0
  Routing Information Sources:
    Gateway         Distance      Last Update
    10.1.1.1             110      00:12:40
    20.1.1.1             110      00:14:46
  Distance: (default is 110)


R3#show ip route ospf

Gateway of last resort is not set



O     1.0.0.0/8 [110/128] via 3.3.3.2, 00:12:45, Serial3/2
                [110/128] via 2.2.2.1, 00:14:52, Serial3/1
O     10.0.0.0/8 [110/65] via 3.3.3.2, 00:12:45, Serial3/2
O     20.0.0.0/8 [110/65] via 2.2.2.1, 00:53:04, Serial3/1



R1(config)#access-list 111 permit icmp host 10.1.1.1 host 30.1.1.1 echo
R1(config)#access-list 111 permit icmp host 10.1.1.1 host 30.1.1.1 echo-reply
R1(config)#access-list 122 permit tcp any any eq www

R1(config)#class-map icmp_tr
R1(config-cmap)#match access-group 111
R1(config-cmap)#exit

R1(config)#class-map web_tr
R1(config-cmap)#match access-group 122
R1(config-cmap)#exit

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

Current configuration : 111 bytes
!
class-map match-all web_tr
 match access-group 122
class-map match-all icmp_tr
 match access-group 111
end

R1(config)#policy-map internetworks
R1(config-pmap)#class icmp_tr
R1(config-pmap-c)#bandwidth 130
R1(config-pmap-c)#exit

R1(config-pmap)#class web_tr
R1(config-pmap-c)#bandwidth 70
R1(config-pmap-c)#exit



R1(config-pmap)#class class-default
R1(config-pmap-c)#exit

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

Current configuration : 116 bytes
!
policy-map internetworks
 class icmp_tr
  bandwidth 130
 class web_tr
  bandwidth 70
 class class-default
!
end



R1(config)#interface serial 3/2
R1(config-if)#service-policy output internetworks
R1(config-if)#end

R1#show policy-map interface serial 3/2
 Serial/2

  Service-policy output: internetworks

    Class-map: icmp_tr (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 111
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 0/0
      bandwidth 130 kbps


    Class-map: web_tr (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 122
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 0/0
      bandwidth 70 kbps



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

      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 5/288





R1#PING 30.1.1.1 SOURCE 10.1.1.1 REPEAT 100
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 10.1.1.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 20/29/44 ms

R1#show policy-map interface serial 3/2
 Serial3/2

  Service-policy output: INTERNETWORKS

    Class-map: ICMP_TR (match-all)
      100 packets, 10400 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 111
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 100/10400
      bandwidth 130 kbps

    Class-map: WEB_TR (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: access-group 122
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 0/0
      bandwidth 70 kbps

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






      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/0/0
      (pkts output/bytes output) 15/1153


Saturday, January 25, 2020

What is Quality Of Service (QOS)?



Quality of service models:
  • Best-effort service
  • Integrated services
  • Differentiated services

Best-effort service model – the internet was initially based on a best-effort packet delivery service. Best-effort is the default mode for all traffic. There is no differentiation among types of traffic.
The best-effort model is similar to using standard mail service – it will get there when it gets there.


Advantages of best-effort service model:
  • Highly scalable
  • No special mechanisms required

Disadvantages of best-effort service model:
  • No service guarantees
  • No service differentiation

Integrated services (intserv model) are a QoS model that is older than QOS / Differentiated services model. Intserv model defines a signaling process by which an individual flow can request that the network reserve the bandwidth and delay needed for the flow.

The integrated services model uses RSVP for reserving bandwidth. RSVP stands for a resource reservation protocol. RSVP  is used for reserving bandwidth/QOS tools for a particular flow.
Here is a limitation of intserv model if reserved no other traffic can use it and it is not scalable each flow required separate admin configuration on the router.





The differentiated services model is designed to overcome the limitation of best-effort and intserv models. In Diffserv model network traffic is identified by classes and network QOS policy enforces differentiated treatment of traffic classes. You choose the level of service for each class.


Advantages of Differentiated service model:
  • Highly scalable
  • Many levels of quality are possible

Disadvantages of Differentiated service model:
  • No absolute service guarantee
  • Complex mechanisms




INSTAGRAM FEED

@soratemplates