Sunday, 27 July 2014

Basic Routing

Routing:
Routing is the process of transmitting packets from a network to another network across an internetwork. 
  • Routing is usually performed by a dedicated device called Router.
  • The main concern of routers is networks instead of hosts.
  • Router can only forward packets to routes (or subnets) in its routing table.
  • Host would send packets destined to another network to its default gateway of the local network.
With IP based networks, the routing decision is based on the destination address in the IP packet's header.  
Routing involves two basic activities:
  • Determining best routing paths.
  • Transport packets through an internetwork.
Routing Protocol:
Routing protocol is a protocol that allows routers to dynamically advertise and learn routes, determine which routes are available and which are the best routes to a destination.
Or
Routing protocols are used by routers to figure out the network topology, find paths to all the networks in an internetwork, determine the best path to a network, and fill the routing tables with the routing information.  
Examples of Routing Protocols are – RIP, OSPF, IGRP, EIGRP, IS-IS, BGP.

Routed Protocol:
Routed protocol is a protocol by which data can be routed. Routed protocol defines the addressing scheme based on which router identifies the network & host.
Or
Routed protocols are used to define and assign logical addressing on physical interfaces, encapsulate data into packets, and communicate with the data link layer to deliver packets through an internetwork. These protocols allow packets to be forwarded by routing protocols.
Examples of Routed Protocols are – IP, IPX & Apple Talk.

Note: IBM SNA, NetBIOS, and NetBEUI are non-routable protocols.

Difference between Routing Protocol & Routed Protocol:
The following are the differences between Routing Protocol & Routed Protocol:
  • Routing protocol helps router to decide the best paths to send traffic, where as Routed protocol actually sends traffic between devices running at Layer 3 (Network Layer) in OSI model.
  • Routing protocol routes a routed protocol datagram (packets) whereas routed protocol using routing protocols.
  • Routing protocol allows router to dynamically advertise & learn the routes to the destination, whereas routed protocol carry information used by the routing protocol. 
Information a Router needs to know to route a packet:
Router need to know the following information -  
  • Destination address.
  • Neighbor routers.
  • Possible routes to all remote networks.
  • The best route to each network.
  • How to maintain and verify routing information.
Types of Routing Protocol:
Routing Protocol is of two types –
  • Interior Gateway Protocol (IGP).
  • Exterior Gateway Protocol (EGP).
Interior Gateway Protocol (IGP):
Interior Gateway Routing Protocol is a routing protocol that performs routing within a single autonomous system.
Example of IGP: RIP, IGRP, OSPF & EIGRP.

Exterior Gateway Protocol (EGP):
Exterior Gateway Routing Protocol is a routing protocol that performs that performs routing within different autonomous system.
Example of EGP: BGP.

Types of Routing:
Routing is of three types –
  • Static Routing.
  • Default Routing.
  • Dynamic Routing.
Static Routing:
Static routing is the process of manually adding routes from source to destination in each router's routing table. 

Administrator configures the route based on destination network, next hop and metrics.  The route doesn't change until the network administrator changes it.

Advantages:
  • No overhead on router CPU.
  • No bandwidth usage between links.
  • Security (only administrator adds routes).
Disadvantages:
  • Administrator must know destination network.
  • If a new network is added, administrator must update all routers.
  • Not practical on large networks.
Syntax for Static Route:

Router(config)#ip route [Destination Network] [Subnet Mask] [Next Hop Address/Exit Interface] [Administrative Distance] [permanent]

Default Routing:
Default routing is the process of forward packets addressed to hosts or networks which are not listed in the routing table.

Default routes are useful where learning all the networks is not desirable, as in case of stub networks, or not possible due to limited system resources such as memory and processing power.

Advantages:
  • When administrator doesn’t know the destination network address then administrator can use the default routing.
  • Default routing is basically used on the stub network.
Disadvantages:
  • Manually defined routes.
  • Possibility of routing loops.
Syntax for Default Route:
Router(config)#ip route 0.0.0.0 0.0.0.0 [Next Hop Address/Exit Interface] [Administrative Distance] [permanent]

Administrative Distance:
Administrative distance is the measure used by routers to select the best path when there are two or more different routes to the same destination from two different from two different routing protocols. Administrative distance defines the reliability of a routing protocol. Least the AD Value, more preferable or reliable is the protocol.
Or
Administrative distance is a metric that specifies the reliability of one routing protocol over another.

Route Source
Default AD
Connected interface
0
Static route
1
Enhanced Interior Gateway Routing Protocol (EIGRP).
5
External Border Gateway Protocol (BGP)
20
Internal EIGRP
90
IGRP
100
OSPF
110
Intermediate System-to-Intermediate System(IS-IS)
115
Routing Information Protocol (RIP)
120
Exterior Gateway Protocol (EGP)
140
On Demand Routing (ODR)
160
External EIGRP
170
Internal BGP
200
Unknown
255

Dynamic Routing:
Dynamic routing is the process where router uses routing protocol to dynamically discover network destination & also select the best path for each destination. Dynamic routing allows router to upgrade the routing tables if a router on the route goes down.

Advantages:
  • There is no need to know the destination network.
  • Need to advertise only directly connect network.
  • Update to topology which changes dynamically.
  • Administrative work is reduced.
  • Used for large organization.
Disadvantages:
  • Network may down by route loop.
  • More overhead on CPU.
Types of Dynamic Routing Protocol:
There are 3 types of Dynamic routing protocols, these differ mainly in the way that they discover and make calculations about routes:
  • Distance Vector Protocol.
  • Link State Protocol.
  • Hybrid or Advance Distance Vector Protocol.
Distance Vector Protocol:
Distance Vector Protocol is a simple routing protocol which uses distance or hop count as its primary matrices for determining the best path.

The name distance vector is derived from the fact that routes are advertised as vectors of (distance, direction), where distance define the metric and direction define the next-hop router. For example, "Destination A is a distance of five hops away, in the direction of next-hop Router X."
  • It works with Bellman Ford algorithm.
  • Periodic updates after a regular interval.
  • Full routing table are exchanged.
  • Updates are through broadcast.
  • It is a class full routing protocol.
  • It is also known as “Routing by Rumor”.
EX: RIPv1, RIPv2 and IGRP.

Advantages:
  • Simple router advertisement processes that are easy to understand.
  • Easy to configure.
Disadvantages:
  • Large routing tables.
  • High network traffic overhead.
  • Does not scalable for large network.
  • High convergence time.
  • Lack of verity of matrices.
Link State Routing Protocols:
Link state routing protocol is a complex routing protocol that share information with other router in order to determine the best path. Link State protocol use speed, cost as well as current congestion as metric to determine the best path.

Link state routers are updated from all the routers in the entire network by passing information from router to nearest router. Link state protocol router only inform its neighboring routers when it detects a change.
  • It works with Dijkstra algorithm.
  • Only missing routes are exchanged.
  • Updates are through multicast.
  • It is a class less routing protocol.
  • It is also known as “Routing by Intelligence”.
  • Updates if there is any change in the network.
EX: OSPF, IS-IS, NLSP (Netware Link Services Protocol).

Advantages:
  • Smaller routing tables.
  • Low network overhead.
  • Scalable for large network.
  • Lower convergence time.
 Disadvantages:
  • It is much more complex and difficult to understand.
  • More difficult to configure.
Hybrid or Advance Distance Vector Protocol:
Hybrid protocol takes advantages of both Distance vector & Link state protocol and merges them into a new protocol. Like DV, which works by sharing its knowledge of the entire network with its neighbors and like link state routing, which works by having the router tell every router on the network about its closest neighbors’. 

Hybrid routing protocols use distance-vectors for more accurate metrics to determine the best paths to destination networks. Hybrid routing allows for rapid convergence but requires less processing power and memory as compared to link-state routing.
  • It works with DUAL (Distributed Update Algorithm) algorithm.
  • Only mission routes are exchanged.
  • Updates are through multicast.
  • It’s a classless routing protocol.
  • It’s very fast convergence.
  • It is also known as “Routing by Intelligence”.
EX: EIGRP.

Routing Protocol Evolution & Classification:



Terms to Remember:

Convergence: 
Convergence refers to how much time it takes for all routers to be aware of new network topology.

Next Hop address:
Next Hop address is the address where an IP packet is sent on the way to the final destination.

Hop Count: 
Hop Count is the number of routers or hops between an IP source network and IP destination network.

Unicast Routing: 
Unicast routing is the process of forwarding unicast traffic from a source to a destination on an internetwork. Unicast traffic is destined for a Unicast address. 

Classless Inter Domain Routing (CIDR):
Classless Inter Domain Routing (CIDR) is method for assigning IP addresses without using standard IP address classes like class A, B & C.

Variable Length Submit Mask (VLSM): 
Variable Length Submit Mask (VLSM) is a process that allows us to use more than one subnet mask within the same network address space.

Classful Routing Protocol: 
Classful routing protocol does not send subnet mask with the network address when a route updates is sent out. Example of Classful routing protocol: RIP V1, IGRP.

Classless Routing Protocol: 
Classless routing protocol does send subnet mask with the network address when a route updates is sent out. Example of Classless routing protocol: RIP V2, EIGRP & OSPF.

Metric:
Metric is a method of measuring the best route through a network that has multiple routes to the same location. For different protocol there is different parameter used –

RIP                               : Hop Count.
IGRP & EIGRP                : Bandwidth, Delay, Reliability & Load.
OSPF & IS-IS                 : Cost.

1 comment:

  1. Wonderful blog & good post.Its really helpful for me, awaiting for more new post.

    Ccie training institute

    ReplyDelete