Sunday, November 17, 2013

Networking protocols

Today we will talk about protocols that allow networking and I will keep updating this as I think of relevant protocols.

Starting with layer 2 
Spanning tree protocol(STP) is a protocol that allows for path redundancy while eliminating undesired loops in the network and this is accomplished by blocking certain links.
How does this work?
1. A root bridge is elected ( switch with lowest MAC address if Bridge ID same for all)
2. Root ports on a non-root bridge ( shortest route to root bridge)
3. Elect designated port on each device and that will forward traffic, rest of the link will be blocked

Transparent Interconnect of lots of links (TRILL) is a  replacement for STP
Why? STP wastes bandwidth by blocking certain links.
Trill brings routing intelligence to layer 2, link state protocol runs on RBridges(devices that support TRILL, usually switches). The link state protocol provides the topology of the RBridges and the surrounding links, so each RBridge computes shorted path to the RBridge for data transmission.

There are 3 types of routing protocols
  • Interior Gateway Protocol using link state  routing protocol (OSPF, IS-IS)
  • Interior Gateway Protocol using Distance vector routing protocol ( RIPv2, IGRP and EIGRP)
  • Exterior Gateway Protocol ( BGP)
Open Shortest Path First (OSPF)
This is a link state protocol that gathers topology information from the neighboring nodes and determines the shortest path to destination using Dijkstra's algorithm. OSPF is a preferred for more than 4-5 routers. This protocol will send out the routing table only when it detects a topology change unlike RIP that sends the table every 30 seconds. This protocol is used mainly in campus enterprise solutions. The way OSPF works is, it selects a Designated Router(DR) and a Backup DR and based on talking to neighbors through a hello and acknowledgment with calculate shortest path with determine route. OSPFv3 has been designed for IPv6 traffic. ISIS is independent of IPv4 or IPv6 traffic.

Intermediate State to Intermediate State (IS-IS)
ISIS is a link state protocol used mainly in service provide environments. ISIS supports more routers than OSPF so preferred more by Internet Service Provider(ISP). ISIS also appends a TLV(type length value) to its packets which is useful in ISP networks.

Routing Information Protocol (RIP)
This protocol is based on the distance vector routing protocol. Routes are based on hop count. RIP can support a max. of 16 hops. The way this protocol works is, the RIP router will send a REQUEST broadcast message to all the RIP enabled routers in its network. Then those routers reply with a RESPONSE routing table that the RIP router will use to update routing information. RIP is much older and there is a delay to convergence. Convergence is a when all the RIP enabled routers have the same topology information as the network they belong to. This mechanism is preferable when the routers know the topology well and its a small network. RIP sends routing table updates every 30 secondss which wastes a lot of bandwidth.

Border Gateway Protocol(BGP)
BGP is an exterior gateway protocol that used path vector protocol. This is a layer 4 protocol, sits on top of TCP. BGP in a simple way is a routing protocol that makes the internet work. All the large internet service providers use BGP, its the most important internet protocol.

Multi-protocol Label Switching (MPLS)
Traditional switch will look at the next hop and transport packet to that. The MPLS mechanism looks the destination address and selects a pre-determines path to the destination by putting a label on the packet. Like a courier service, postman does not open the package to see where it needs to be delivered just looks at the label for the destination address. This mechanism is protocol independent( DSL or IP ) and provides QoS. ( VPN does not provide this)


No comments:

Post a Comment