Networks Horizon

share

Saturday 7 April 2012

Quality of Service (QoS)-Part6

Congestion Management-Configuration

NBAR (Network Based Application Recognition) has a built in feature to allow the protocol discovery feature to monitor the traffic statistics.
By default NBAR will monitor the session for 5 minutes (300 secs) average of traffic. With load interval command we can change this. Here Load interval is set to 60 seconds.


Router(config)# int S0/0
Router(config-if)#ip nbar protocol discovery
Router(config-if)#load-interval 60

After enabling above commands, we can monitor the network going through serial0 on router. Command is :

Router# show ip nbar protocol-discovery stats bit-rate top-n 10

Above command will display top 10 sender input/output on serial 0 interface. NBAR continuously monitors the network traffic and generates this information for the user. In above output, "unknown" traffic is might be the traffic that NBAR is unable to identify.

Router3(config)#class-map Match_HTTP
Router3(config-cmap)#match protocol http

As soon as we use protocol keyword NBAR is operational.

Now, create second class-map as below:

Router3(config)#class-map Match_FTP
Router3(config-cmap)#match protocol ftp

Defining Policy Map:

Router3(config)#policy-map Mark_traffic

Calling class-maps under Policy Map:


Router3(config-map)#class Match_HTTP
Router3(config-map-c)#set dscp af21 =========>>First class-map

Router3(config-map)#class Match_FTP
Router3(config-map-c)#set dscp af11 =========>>Second class-map

Note:We can have maximum 256 class-maps under one policy-map

Router3#show policy-map
Plicy Map Mark-traffic
Class Match_HTTP
   set dscp af21
Class Match_FTP
 set dscp af11

Marking is usually done in Inbound direction but here we have discussed the problem:

Router3 (config)# int e0/0
Router3 (config-if)#service-plicy input Mark_traffic

This completes marking of different kinds of traffic.

Checking the marking of traffic on interface basis.

Router3#show policy-map interface ethernet 0/0
On router2, we will re-classify the traffic based on different marking labels (AF21,AF11) like
below:

Router2(config)#class-map Match_AF11
Router2(config-cmap)#match dscp af11

Router2(config)#class-map Match_AF21
Router2(config-cmap)#match dscp af21


Now Implementating Queuing:

Router2(config)#policy-map LLQ
Router2(config-pmap)#class-map af11
Router2(config-pmap-c)#bandwidth ?
<8-2000000> Kilo Bits per second
percent    % of total bandwidth
remaining   % of remaining bandwidth
Router2(config-pmap-c)#bandwidth percent 10

Router2(config-pmap)#class class-default
Router2(config-pmap-c)# fair-queue  ===================>>>enabling WFQ for default class

Configuring Priority Queuing

Router2(config-pmap)#class Match_AF21
Router2(config-pmap-c)#priority ?
<8-2000000> Kilo Bits per second
percent    % of total bandwidth

If we apply 70 percent here in priority queue, then

Router2(config-pmap-c)#priority 70

But when we try to apply this policy map input direction on S0, it gives an Error.
It is important thing to remember is that We can only do 3 things in inbound traffic, classify, Mark and Police but we cannot give priority or re queue the traffic as it is completly dependent on sending device so we cannot apply this policy in inbound direction.Therefore, when we try to apply this policy map, it gives an error.

Moreover, by the rule we can only assign maximum 75 % of total available bandwidth but in this case we have requested of total 80 percent of available bandwidth (10 % for AF11, 70 % for AF21) We can change bandwidth limitation with below command per interface basis:

Router(config-if)#max-reserved-bandwidth 90

By applying this we can use 90 percent of total available bandwidth for the QoS purpose.Another thing to remember is congestion management only takes place when there is congestion in the network. When we try to apply any outbound policy on Ethernet, mostly we do not see any QoS applied. Therefore, we need to apply policy map to the inbound of WAN interface for receiving device and outbound of WAN interface for sending router.

Using same class-map for inbound/outbound 

Moreover, if we try to use same class-map for inbound and outbound direction, it becomes more processor work for the router. The whole purpose of applying QoS is not to open actual packet which is already marked but in the case where we are using same class-map for inbound and outbound direction, if a class-map is used in inbound direction and marked with some kind of marking, the packet will be re-opened and re-marked when we apply the same class-map for outbound direction.


No comments:

Post a Comment