Showing posts with label Congestion management. Show all posts
Showing posts with label Congestion management. Show all posts

Friday, October 22, 2021

What is LLQ (Low Latency Queuing) and CBWFQ (Class-Based Weighted Fair Queuing)? How to configure LLQ and CBWFQ?

 LLQ (Low Latency Queuing) 

 CBWFQ (Class-Based Weighted Fair Queuing)



Cisco created CBWFQ and LLQ using some of the best concepts from legacy queuing methods. PQ and CQ as well as WFQ while adding several features.




LLQ low-latency queuing is developed by Cisco and it provides strict priority queuing to CBWFQ (class-based weighted fair queueing. Low-latency queuing provides delay-sensitive data like VoIP traffic to be given more preferential treatment over other traffic by letting the data be dequeued and sent first.  

CBWFQ (Class-Based Weighted Fair Queuing) it's a scheduling mechanism that allows a  minimum bandwidth guarantee when the network congestion occurs on an interface. 

CBWFQ is used to provide traffic classes during times of network congestion at an interface. Each of the CBWFQ queues is assigned a weight, and the packets are treated from the queues based upon the weight of the queue.CBWFQ and LLQ both support 64 queues/classes and also have one special queue called the class-default queue. LLQ and CBWFQ are both tools that use MQC and NBAR for configuration. there is one drawback in CBWFQ is VoIP traffic suffers an unacceptable delay. 





Advantage of LLQ

LLQ provides all the benefits of CBWFQ (Class-Based Weighted Fair Queuing), including the capability of the user to queue and guarantees each queue an appropriate amount of bandwidth and to apply WRED to each of the queues (except to the strict-priority queue). 

LLQ combines priority queuing and CBWFQ and provides Strict priority queueing for sensitive traffic like VoIP and video. LLQ also reduces latency/jitter for communications.


let's see the configuration for a better understanding of LLQ and CBWFQ.


Topology:-



Goal:-

  • configure the topology as per the diagram above.
  • configure IP addresses to their ports
  • configure EIGRP AS 65120 and advertise directly connected interfaces.
  • configure CBWFQ tool on router 1 
  • configure ICMP bandwidth 18 percent, FTP bandwidth 28 and HTTP bandwidth 38.
  • configure LLQ tool on router 3
  • configure VoIP priority 192, ICMP bandwidth 120, HTTP priority 10 and FTP priority 15.
  • The rest of the traffic use WFQ.


R1(config)#interface serial 4/0

R1(config-if)#ip address 192.168.10.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 10.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#no keepalive

R1(config-if)#exit


R2(config)#interface serial 4/0

R2(config-if)#ip address 192.168.10.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit


R2(config)#interface fastEthernet 0/0

R2(config-if)#ip address 20.1.1.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#no keepalive

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


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 30.1.1.1 255.255.255.0

R3(config-if)#no keepalive

R3(config-if)#no shutdown

R3(config-if)#exit



R1(config)#router eigrp 65120

R1(config-router)#network 192.168.10.0

R1(config-router)#network 10.0.0.0

R1(config-router)#no auto-summary

R1(config-router)#exit



R2(config)#router eigrp 65120
R2(config-router)#network 192.168.10.0
R2(config-router)#network 192.168.10.0
R2(config-router)#network 20.0.0.0
R2(config-router)#network 23.1.1.0
R2(config-router)#no auto-summary
R2(config-router)#exit

R3(config)#router eigrp 65120
R3(config-router)#network 23.1.1.0
R3(config-router)#network 30.0.0.0
R3(config-router)#no auto-summary
R3(config-router)#exit

R1(config)#class-map ICMP-TRAFFIC

R1(config-cmap)#match protocol icmp

R1(config-cmap)#class-map HTTP-TRAFFIC

R1(config-cmap)#match protocol http

R1(config-cmap)#class-map FTP-TRAFFIC

R1(config-cmap)#match protocol ftp

R1(config-cmap)#exit


R1(config)#policy-map CBWFQ-QUEUE

R1(config-pmap)#class ICMP-TRAFFIC

R1(config-pmap-c)#bandwidth percent 18

R1(config-pmap-c)#class HTTP-TRAFFIC

R1(config-pmap-c)#bandwidth percent 38

R1(config-pmap-c)#exit



R1(config-pmap)#policy-map CBWFQ-QUEUE

R1(config-pmap)#class FTP-TRAFFIC

R1(config-pmap-c)#bandwidth percent 28

R1(config-pmap-c)#exit

R1(config-pmap)#class class-default

R1(config-pmap-c)#exit

R1(config-pmap)#exit


R1(config)#interface serial 4/0

R1(config-if)#service-policy output CBWFQ-QUEUE

R1(config-if)#END


R1#show policy-map interface serial 4/0

 Serial4/0


  Service-policy output: CBWFQ-QUEUE


    Class-map: ICMP-TRAFFIC (match-all)

      0 packets, 0 bytes

      5 minute offered rate 0000 bps, drop rate 0000 bps

      Match: protocol icmp

      Queueing

      queue limit 64 packets

      (queue depth/total drops/no-buffer drops) 0/0/0

      (pkts output/bytes output) 0/0

      bandwidth 18% (277 kbps)


    Class-map: HTTP-TRAFFIC (match-all)

      0 packets, 0 bytes

      5 minute offered rate 0000 bps, drop rate 0000 bps

      Match: protocol http

      Queueing

      queue limit 64 packets

      (queue depth/total drops/no-buffer drops) 0/0/0

      (pkts output/bytes output) 0/0

      bandwidth 38% (586 kbps)


    Class-map: FTP-TRAFFIC (match-all)

      0 packets, 0 bytes

      5 minute offered rate 0000 bps, drop rate 0000 bps

      Match: protocol ftp

      Queueing

      queue limit 64 packets

      (queue depth/total drops/no-buffer drops) 0/0/0

      (pkts output/bytes output) 0/0

      bandwidth 28% (432 kbps)


    Class-map: class-default (match-any)

      2 packets, 48 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) 2/48


 

R1#show run policy-map

Building configuration...


Current configuration : 185 bytes

!

policy-map CBWFQ-QUEUE

 class ICMP-TRAFFIC

  bandwidth percent 18

 class HTTP-TRAFFIC

  bandwidth percent 38

 class FTP-TRAFFIC

  bandwidth percent 28

 class class-default

!

end


R1#show run class-map

Building configuration...


Current configuration : 168 bytes

!

class-map match-all FTP-TRAFFIC

 match protocol ftp

class-map match-all ICMP-TRAFFIC

 match protocol icmp

class-map match-all HTTP-TRAFFIC

 match protocol http

end




FROM ROUTER 2 















FROM ROUTER 1












Tuesday, October 19, 2021

What is the queue? How do software and hardware queues work? Congestion management using Queuing.

Routers use a queue to store traffic until it can be processed or serialized. switches and router interfaces have ingress (inbound) queues and egress (outbound) queues. An ingress (inbound) queue stores packets until the switch or router CPU can forward the data to the appropriate interface.




Cisco routers can be configured to perform well queuing for packets that are waiting to exit an interface. Queues are buffers in devices that hold data to be processed. Queues provide bandwidth reservation and prioritization of traffic as it enters or leaves a network device. If the queues are not emptied, they overflow and drop traffic.

We have two types of queues and fancy queueing QoS tools like CBWFQ  & LLQ.

Hardware queue 

Software queue 

Hardware queues provide the following features:

  • When an interface finishes sending a packet, the next packet from the hardware queue can be encoded and sent out the interface, without ensuring a software interrupt to the CPU—ensuring full use of interface bandwidth.
  • Always use FIFO logic first in first out.
  • Cannot be affected by IOS queuing tools.
  • IOS automatically shrinks the length of the hardware queue to a smaller length than the default when a queuing tool is present.
  • Short hardware queue length means packets are more likely to be in the controllable software queues, giving the software queuing more control of the traffic leaving the interface.
  • The only function of a hardware queue that can be manipulated is the length of the queue.

Congestion management using Queuing

Congestion can occur at any point in the network where there are points of speed mismatches or aggregation, Speed mismatches are the most typical cause of congestion. when the packets travel from LAN to WAN. Generally, a full hardware queue indicates interface congestion and software queuing is used to manage it. The software queuing system can be selected and configured depending on the platform and Cisco IOS version. Queuing manages congestion to provide bandwidth and delay guarantees.



Creation of queues. Assignment of packets to those queues based on the classification of the packets, and scheduling of the packets in a queue for transmission. Allow us to control congestion by determining the order in which packets are sent out an interface based on priorities assigned to those packets. 

INSTAGRAM FEED

@soratemplates