Wednesday, 30 September 2015

RSTP

RSTP Topology Change:
==================

->TC when non-edge port goes forward only

-> Broadcasted on the network by initiator(not by root as in 802.1d)
                  Sent on Root and non-edge Designated ports

-> Flush most of the cam entries in the network immediately except for edge ports.

-> MAC entries  learned from the port where the Topology change is forwarded are flushed out.

-> Do Not clear entries for ports that received the TC BPDU

RSTP Convergence Process:
====================

Switch x(Root)------- a(Switch A)

Handshake:

Below mechanism for Point-to-Point Full duplex links.

1) Switch Root sends proposal bit set.(3 proposals before moving the port to blocking)
2) On Switch A "a" becomes root port goes into forwarding and send back a BPDU with agreement bit set
3) As soon as x receives the agreement it goes to Forwarding.

If they are connected to HUB then same process as 802.1d


Propagating the Handshake:
----------------------------------

Switch X ----- Switch A

1)  X is the root.

So when a new switch B with lower priority is connected to the switch A

Switch X ----- Switch A ----- NEW(Switch B)

2) Switch B sends proposal to Switch A proposing it as a new root.
3) Switch A realises the B priority is better than X and does 3 things simultaneously after receiving proposal from B.

             a) Block the port connecting to X.
             b) Forward the proposal to X
             c) Send back agreement to B

4) Once X sends back the agreement to A the port a will be moved to forwarding again.


http://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24062-146.html

Wednesday, 2 September 2015

QOS - Tools and Challenges

QOS TOOLS:
==========
==========

1) Classifiers and Classes of Service :
===========================

 A classifi er has one input, the incoming packet, and it has N possible outputs, where

N is the number of possible classes of service into which the packet can be classified

2) Metering and Coloring – CIR / PIR Model:
================================

 The metering tool provides this second level of granularity. It measures the traffi  c
arrival rate and assigns colors to traffi  c according to that rate.

 So looking at the classifi  er and metering tools together, the classifi  er assigns traffi  c to
classes of service, which each have assigned resources, and the metering tool allows traffi  c
inside a single class of service to be differentiated according to its arrival rate.

3) The Policer Tool:
==============

 The policer tool is responsible for ensuring that traffi  c conforms to a defi  ned rate called
the bandwidth limit  . The output of the policer tool is the traffi  c that was present at input,
but that has been limited based on the bandwidth - limit parameter, with excess traffi  c being
discarded,

 The metering tool is commonly coupled with the policer as a way to increase the policer
’  s granularity. In this scenario, the metering tool measures the traffi  c arrival rate and splits
the traffi  c into the three - color scheme previously presented. The policer is responsible for
applying actions to the traffi  c according to its color

4)The Shaper Function:
=================

 The shaper function causes a traffi  c fl  ow to conform to a bandwidth value referred to as
the shaping rate  . Excess traffi  c beyond the shaping rate is stored inside the shaper and
transmitted only when doing so does not violate the defi  ned shaping rate

5) Comparing Policing and Shaping:
==========================

 The difference between the policed and the shaped fl  ows is visible by comparing the
two graphs. The main difference is how each tool deal with excess traffi  c. The policer discards it, while the shaper stores it, to be transmitted later, whenever doing so does not
violate the defi  ned shaping rate

6) Queue:
=======

 A queue contains two sub - blocks: a buffer and a dropper. The buffer is where packets
are stored while awaiting transmission.

 The decision whether a packet should be placed in the queue buffer or dropped is taken
by the other queue block, the dropper. The dropper has one input, which is the queue fi  ll
level. Its output is a decision either to place the packet in the queue or to drop it.

 When a packet enters a queue, it fi  rst crosses the dropper block, which, based on the
queue fi  ll level, makes a decision regarding whether the packet should be placed in the
FIFO buffer or discarded. If the packet is placed in the buffer, it stays there until it is
transmitted. The action of moving a packet out of the queue is the responsibility of the
next QOS tool we discuss, the scheduler

7) The Scheduler:
==============

The scheduler implements a multiplexing operation, placing N inputs into a single output.
The inputs are the queues containing packets to be serviced, and the output is a single
packet at a time leaving the scheduler. The scheduler services a queue by removing
packets from it.

8) The Rewrite Tool:
===============

The rewrite tool allows a packet ’ s internal QOS marking (simply called its marking), to
be changed.


CHALLENGES:
============
============

1. Defining the Classes of Service:
========================

The main foundation of the entire QOS concept is applying different behavior to different
traffi c types. Achieving traffi c differentiation is mandatory, because it is only by splitting
traffi c into different classes of service that different behavior can be selectively applied
to each.

2) Classes of Service and Queues Mapping:
===============================

 the combination of the queuing and scheduling tools directs traffi c from several queues into a single output, and the queue properties, allied with the scheduling rules, dictate specifi  c behavior regarding delay, jitter, and packet loss,

3) Inherent Delay Factors:
==================
When traffi c crosses a network from source to destination, the total amount of delay
inserted at each hop can be categorized in smaller factors that contribute to the overall
delay value.
There are two groups of contributors to delay. The fi rst group encompasses the QOS
tools that insert delay due to their inherent operation, and the second group inserts delay
as a result of the transmission of packets between routers. While the second group is not
directly linked to the QOS realm, it still needs to be accounted for.

4) Congestion Points:
================

 Congestion points in the network exist when there is a resource shortage, and the
importance of QOS within a network increases as the available network resources shrink.

5) Trust Borders:
==========
When traffi c arrives at a router, in terms of QOS, the router can trust it or not. The term
trust can be seen from two different perspectives. The fi rst is whether the information
present in the packets is valid input for the classifi er deciding the class of service to which
the packets belong. The concern is assuring that the classifi er is not fooled by any misinformation
present in the packets, which could lead to traffi c being placed in an incorrect
class of service.

6) Granularity Levels:
================

Routers inside a network fall into two main groups: routers that are placed at the edge of
the network, commonly named PE ( provider edge ), and core routers, commonly named
P (provider). From a QOS perspective, the key differentiation factor between PE and P
routers is not their position in the network topology but the types of interfaces they have.
A PE router has two types of interfaces, customer and core facing, while P routers only
have the second type.

7) Control Traffic:
=============

There are two major differences between control and customer traffi c. The fi rst is that
control traffi c results from the network operation and protocol signaling, and provides the
baseline for the connectivity between service end points on top of which customer traffi c
rides. In other words, control traffi c is what keeps the network alive and breathing. The
second difference is that the source of control traffi c is internal. It is generated inside the
network, while the customer traffi c that transits the network between the service end
points comes from outside the network.


Calculating Bc, Tc, CIR for shaping and Policing:
===================================

Tc = Bc/CIR (in seconds) is the formula.

The router internally calculates the value of Tc based on the configured CIR and Bc values.

If Bc/CIR is more than or equal to 125 ms, it uses an internal Tc value if the router determines that traffic flow will be more stable with a smaller interval.
You can use the show traffic-shape command to determine whether your router is using an internal value for Tc or the value that you configured.

In your example with CIR of 64K and Bc of 8000K, (8,000/64,000) = 0.125 or 125ms.    If we wanted a Tc of 100ms, we would simply configure the Bc to be 6400.  Then  using the formula Tc=Bc/CIR it would be 6,400/64,000 = .1  or 100ms.