Monday, July 8, 2013

Types Of Routing Explained Briefly

IP Routing
When we want to connect two or more networks using different n/w addresses then we have to use IP Routing technique. The router will be used to perform routing between the networks. A router will perform following functions for routing.
(1)   Path determination
(2)   Packet forwarding
(1) Path determination
The process of obtaining path in routing table is called path determination. There are three different methods to which router can learn path.
i) Automatic detection of directly connected n/w.
ii) Static & Default routing
iii) Dynamic routing

(2) Packet forwarding
It is a process that is by default enable in router. The router will perform packet forwarding only if route is available in the routing table.

Routing Process
(i) The pc has a packet in which destination address is not same as the local n/w address.
(ii) The pc will send an ARP request for default gateway. The router will reply to the ARP address and inform its Mac address to pc.
(iii) The pc will encapsulate data, in which source IP is pc itself, destination IP is server, source Mac is pc’s LAN interface and destination Mac is router’s LAN interface.

               S. MAC                       D. MAC
     PC1                             R1
Destination. IP     172.16.0.5
Source. IP      10.0.0.6
The router will receive the frame, store it into the buffer. When obtain packet from the frame then forward data according to the destination IP of packet. The router will obtain a route from routing table according to which next hop IP and interface is selected .
(iv) According to the next hop, the packet will encapsulated with new frame and data is send to the output queue of the interface.

Static Routing
In this routing, we have to use IP route commands through which we can specify routes for different networks. The administrator will analyze whole internetwork topology and then specify the route for each n/w that is not directly connected to the router.

Steps to perform static routing
(1) Create a list of all n/w present in internetwork.
(2) Remove the n/w address from list, which is directly connected to n/w.
(3) Specify each route for each routing n/w by using IP route command.
Router(config)#ip route <destination n/w> <mask> <next hop ip>
Next hop IP it is the IP address of neighbor router that is directly connected our router.

Static Routing Example: -
Router#conf ter
Router(config)#ip route 10.0.0.0 255.0.0.0 192.168.10.2

Advantages of static routing
(1) Fast and efficient.
(2) More control over selected path.
(3) Less overhead for router.
(4) Bandwidth of interfaces is not consumed in routing updates.

Disadvantages of static routing
(1) More overheads on administrator.
(2) Load balancing is not easily possible.
(3) In case of topology change routing table has to be change manually

Alternate command to specify static route
Static route can also specify in following syntax: - Old
Router(config)#ip route 172.16.0.0 255.255.0.0 172.25.0.2
Or
Router(config)#ip route 172.16.0.0 255.255.0.0 serial 0
  
Backup route or loading static route
If more than one path are available from our router to destination then we can specify one route as primary and other route as backup route. Administrator Distance is used to specify one route as primary and other route as backup. Router will select lower AD route to forward the traffic. By default static route has AD value of 1. With backup path, we will specify higher AD so that this route will be used if primary route is unavailable.

Protocols                                  AD
Directly Connected                     0
Static                                         1
BGP                                         20
EIGRP                                     90
IGRP                                      100
OSPF                                     110
RIP                                         120 
 Syntax: - To set backup path
Router(config)#ip route <dest. n/w> <mask> <next hop> <AD>
                                                                              Or
                                                                        <exit interface>
Example: -
Router#conf ter
Router(config)#ip route 150.10.0.0 255.255.0.0 150.20.0.5
Router(config)#ip route 150.10.0.0 25.255.0.0 160.20.1.1 8 (below 20)
Router(config)#exit

Default Routing
Default routing means a route for any n/w. these routes are specify with the help of following syntax: -
Router(config)#ip route 0.0.0.0 0.0.0.0 <next hop>
                                                                        Or
                                                            <exit interface>
This type of routing is used in below diagram

Dia 1 - Stub network :- A n/w which has only one exit interface is called stub network.

If there is one next hop then we can use default routing
  Dia 2 - Internet connectivity :- On Internet, million of n/ws are present. So we have to specify default routing on our router. Default route is also called gateway of last resort. This route will be used when no other routing protocol is used. 

Router(config)#ip route 10.0.0.0 255.0.0.0 172.16.0.5
Router(config)#ip route 0.0.0.0 0.0.0.0 200.100.100.11

To display routing table --> Router#sh ip route
To display static routes only --> Router#sh ip route static
S 192.168.10.0/28 [1/0] via 172.16.0.
To display connected n/ws only --> Router#sh ip route connected
To check all the interface of a router --> Router#sh interface brief

Dynamic Routing
In dynamic routing, we will enable a routing protocol on router. This protocol will send its routing information to the neighbor router. The neighbors will analyze the information and write new routes to the routing table. The routers will pass routing information receive from one router to other router  also. If there are more than one path available then routes are compared and best path is selected. Some examples of dynamic protocol are: - RIP, IGRP, EIGRP, OSPF

Types of Dynamic Routing Protocols
According to the working there are two types of Dynamic Routing Protocols.
(1) Distance Vector
(2) Link State
According to the type of area in which protocol is used there are again two types of protocol: -
(1) Interior Routing Protocol
(2) Exterior Routing Protocol

 Autonomous system
Autonomous system is the group of contiguous routers and n/w, which will share their  routing information directly with each other. If all routers are in single domain and they share their information directly with each other then the size of routing updates will depend on the no. of n/w present in the Internetwork. Update for each n/w may take 150 – 200 bytes information.
 For example: - if there are 1000 n/ws then size of update will be
                        200*1000 = 200000 bytes
The routing information is send periodically so it may consume a large amount of bandwidth in our network.

Protocols
Interior Routing                    Exterior Routing
RIP                                              BGP
IGRP                                           EXEIGRP
EIGRP
OSPF
  
Distance Vector Routing
The Routing, which is based on two parameters, that is distance and direction is called Distance Vector Routing. The example of Distance Vector Routing is RIP & IGRP.

Operation: -
(1) Each Router will send its directly connected information to the neighbor router. This information is send periodically to the neighbors.
(2) The neighbor will receive routing updates and process the route according to following conditions.
(i) If update of a new n/w is received then this information is stored in routing table.
(ii) If update of a route is received which is already present in routing table then route will be refresh that is route times is reset to zero.
(iii) If update is received for a route with lower metric then the route, which is already present in our routing table. The router will discard old route and write the new route in the routing table 
(iv) If update is received with higher metric then the route that is already present in routing table , in thae case the new update will discard.

3) A timer is associated with each route. The router will forward routing information on all interfaces and entire routing table is send to the neighbor. There are three types of timers associated with routes.
(i) Route update timer          
         It is the time after which the router will send periodic update to the neighbor.
(ii) Route invalid timer
         It is the time after which the route is declared invalid, if there are no updates for the route. Invalid route are not forwarded to neighbor routers but it is still used to forward the traffic.
   (iii) Route flush timer
         It is the time after which route is removed from the routing table, if there are no updates about the router .

Metric of Dynamic Routing
Metric are the measuring unit to calculate the distance of destination n/w. A protocol ma use a one or more than one at a time to calculate the distance. Different types of metric are :-
(1) Hop Count
(2) Band Width
(3) Load
(4) Reliability
(5) Delay
(6) MTU
Hop Count :-- It is the no. of Hops (Routers) a packet has to travel for a destination n/w.
Bandwidth :-- Bandwidth is the speed of link. The path with higher bandwidth is preferred to send the data.
Load :-- Load is the amount of traffic present in the interface. Paths with lower load and high.
Reliability :-- Reliability is up time of interface over a period of time.
Delay :-- Delay is the time period b/w a packet is sent and received by the destination.
MTU : -- It is the maximum size of packet that can be sent in a frame mostly MTU is set to 1500.

Problems of Distance Vector
There are two main problems of distance vector routing

(1)   Bandwidth Consumption
(2)   Routing Loops

Bandwidth Consumption
The problem of accessive bandwidth consumption is solved out with the help of autonomous system. It exchanges b/w different routers. We can also perform route summarization to reduce the traffic.

Routing Loops
It may occur b/w adjacent routers due to wrong routing information. Distance Vector routing is also called routing by Rumor. Due to this the packet may enter in the loop  condition until their TTL is expired.

Method to solve routing loops
There are five different methods to solve or reduce the problem of routing loop.

(1)   Maximum Hop Count
(2)   Flash Updates/Triggered Updates
(3)   Split Horizon
(4)   Poison Reverse
(5)   Hold Down


Maximum Hop Count :-- This method limits the maximum no. of hops a packet can travel. This method does not solve loop problem. But it reduce the loop size in the n/w. Due to this method the end to end size of a n/w is also limited.

Flash Updates/Triggered Updates :-- In this method a partial update is send to the all neighbors as soon as there is topology change. The router, which receives flash updates, will also send the flash updates to the neighbor routers.

Split Horizon :-- Split Horizon states a route that update receive from an interface can not be send back to same interface.

Poison Reverse :-- This method is the combination of split Horizon and Flash updates. It implements the rule that information received from the interface can not be sent back to the interface and in case of topology change flash updates will be send to the neighbor.

Hold Down :-- If a route changes frequently then the route is declared in Hold Down state and no updates are received until the Hold Down timer expires. 

Twitter Delicious Facebook Digg Stumbleupon Favorites More