Saturday, August 17, 2013

What, (when) is QoS, CoS (happen)?

What is actually QoS (quality of service)? specially IP QoS, IP Network QoS. IP QoS is transport packet-data with special or custom requirement, capability to provide custom transport service. 

How about CoS. Juniper refers to QoS as CoS (class of service).

When is QoS happen? QoS will occur if congestion happen, Even you configure QoS in network equipment but congestion doesn't happen, QoS isn't occur.

What is requirement for QoS?
- Networks converged
- Classification traffic and marking
- Define policies

QoS is optional feature in IP network, if congestion doesn't happen in your network, rethink again to enable QoS, some of feature is CPU intensive and memory consumption. The network will transport and deliver packet-data with best-effort if QoS is disable.

Friday, August 16, 2013

QOS Policy-Based Routing (PBR)

One important selection routing is PBR. What is actually PBR for ? The main purpose PBR is route traffic based-on source. The Routing protocol is route traffic based-on destination. Lets check out the example of PBR.

#### Define route-map that specifies the match criteria

IOS(config)#
access-list 10 permit 172.16.135.1
access-list 20 permit 172.16.135.3
!
route-map PBR-TEST permit 10
 match ip address 10
 set ip next-hop 172.16.24.2
!
route-map PBR-TEST permit 20
 match ip address 20
 set ip next-hop 172.16.24.4

#### Apply to interface

IOS(config-if)#
interface FastEthernet1/1
 description To-Router
 ip address 172.16.135.2 255.255.255.0
 ip policy route-map PBR-TEST
end

#### Verify PBR

#### Before Apply

IOS-135-1#traceroute 172.16.25.1 ttl 1 2

Type escape sequence to abort.
Tracing the route to 172.16.25.1

  1 172.16.135.2 4 msec 0 msec 0 msec
  2 172.16.24.4 0 msec 0 msec 4 msec
  
IOS-135-3#traceroute 172.16.25.1 ttl 1 2

Type escape sequence to abort.
Tracing the route to 172.16.25.1

  1 172.16.135.2 0 msec 4 msec 0 msec
  2 172.16.24.2 0 msec 0 msec 0 msec
  
#### After Apply

IOS#show ip access-lists 
Standard IP access list 10
    10 permit 172.16.135.1 (282 matches)
Standard IP access list 20
    10 permit 172.16.135.3 (102 matches)

IOS#show route-map
route-map PBR-TEST, permit, sequence 10
  Match clauses:
    ip address (access-lists): 10 
  Set clauses:
    ip next-hop 172.16.24.2
  Policy routing matches: 282 packets, 16920 bytes
route-map PBR-TEST, permit, sequence 20
  Match clauses:
    ip address (access-lists): 20 
  Set clauses:
    ip next-hop 172.16.24.4
  Policy routing matches: 102 packets, 6120 bytes

IOS#show ip policy 
Interface      Route map
FastEthernet1/1    PBR-TEST
  
IOS-135-1#traceroute 172.16.25.1 ttl 1 2

Type escape sequence to abort.
Tracing the route to 172.16.25.1

  1 172.16.135.2 0 msec 4 msec 0 msec
  2 172.16.24.2 0 msec 0 msec 0 msec
  
IOS-135-3#traceroute 172.16.25.1 ttl 1 2

Type escape sequence to abort.
Tracing the route to 172.16.25.1

  1 172.16.135.2 0 msec 8 msec 4 msec
  2 172.16.24.4 0 msec 4 msec 0 msec

Monday, August 12, 2013

QoS CAR Rate Limiting by Access List on Cisco

Previous posting are CAR rate policies:


You can set another CAR rate policies with IP Access List, both standard and extended. Matching to IP access list is more processor intensive than based on other.

The following example shows how CAR can be used to limit the rate by application to ensure capacity for other traffic.

#### Define application in access-list

IOS(config)#
 access-list 101 permit tcp any any eq ftp
end

#### Set CAR rate policies for ftp 4 Mbps, other 1 Mbps & Apply to interface

IOS(config-if)#
interface FastEthernet1/1
 description To-Router
 ip address 192.168.100.1 255.255.255.0
 rate-limit output access-group 101 4096000 512000 512000 conform-action set-prec-transmit 5 exceed-action set-prec-transmit 0
 rate-limit output 1024000 128000 128000 conform-action set-prec-transmit 5 exceed-action drop

#### Verify CAR

IOS#show interfaces FastEthernet1/1 rate-limit
FastEthernet1/1 To-Router
  Output
    matches: access-group 101
      params:  4096000 bps, 512000 limit, 512000 extended limit
      conformed 0 packets, 0 bytes; action: set-prec-transmit 5
      exceeded 0 packets, 0 bytes; action: set-prec-transmit 0
      last packet: 11650560ms ago, current burst: 0 bytes
      last cleared 00:00:15 ago, conformed 0 bps, exceeded 0 bps
    matches: all traffic
      params:  1024000 bps, 128000 limit, 128000 extended limit
      conformed 3 packets, 222 bytes; action: set-prec-transmit 5
      exceeded 0 packets, 0 bytes; action: drop
      last packet: 1832ms ago, current burst: 0 bytes
      last cleared 00:00:12 ago, conformed 0 bps, exceeded 0 bps