Thursday, January 24, 2013

Dynamic Routing

Dynamic refers to automatic update of routing table. The routing protocol defines the set of rules used by a router when it communicates routing information between neighboring routers. There are two types of routing protocols which are used in inter-networks: interior gateway protocols (IGPs) and exterior gateway protocols (EGPs).

IGP is used to exchange routing information with routers in the same autonomous system (AS). An AS is a collection of networks under common administrative domain. In a AS all the routers basically share the same routing information. Eg. EIGRP, RIP, etc.

EGP is used to communicate between different ASes. Eg. BGP (Border Gateway Protocol)

Administrative distance (AD) defines the trustworthiness of the routing information received on a router from a neighbor router. It is an integer ranges from 0 to 255. O is the most trusted and 255 is the least trusted or no traffic will pass through it.

Default administrative distances:
* We can manually define the AD for static route also:
rtr# ip route <destinationNetwork> <subnetMask> <gatewayIP> <AD>

Routing Protocols
Routing protocols are categorized into three classes according to their working function:

Distance Vector: The best path to the destination network is calculated and judged by distance. Eg. if a packet is passed through a router it is count a hop. The route with the least number of hops to the network is determined to be the best route to the destination. E.g. RIP and IGRP.

Link State: These routing protocols send updates containing the state of their own links to the other directly connected routers on the network, which is then propagated to their neighbors. They keeps track of directly attached neighbors, topology of the entire inter-network and the routing table. Eg. OSPF and IS-IS.

Hybrid: They are the protocols with both the characters of distance vector and link state. It sends traditional distance-vector updates containing information about networks plus the cost of reaching them from the perspective of the advertising router. E.g. EIGRP. It is the propitiatory of CISCO.


Sunday, January 20, 2013

Routing

Routing is defined as taking a packet from one device and sending it through the network to another device on a different network. Routers don't really care about hosts - they only care about networks and the best path to each network. The main function of router is to route the packets, to do so a router must have know, the following;
  1. Destination address
  2. Neighbor routers from which it can learn about remote networks
  3. Possible routers to all remote networks
  4. The best route to each remote network
  5. How to maintain and verify routing information
Router maintains routing information in a table known as routing table.

There are mainly two types of routing: Static and Dynamic

Static Routing: We manually enter the routing information in it's routing table so that, the packets can be routing through the network. E.g. Let's see a scenario here.
Here, without the routing information on two routers (HQ and Remote), the packets from PC0 could not reach PC1. It will only reach up to serial interface of Remote router because the network 192.168.2.0 is connected with HQ router also. so, we enter a routing information on both routers so that, PC0 could ping PC1 and vice Varese.
Pr-configurations on both routers:
  1. Basic router configurations such as ; hostname, banner, logging sync, no ip domain-lookup, etc.
  2. IP addresses on the required interfaces

Static Routing:
syntax:
HQ(config)# ip route <destination_Network_address> <destination_subnetmask> <gateway_IP> or <interface>
Now,
HQ(config)# ip route 192.168.3.0 255.255.255.0 192.168.2.2
next,
Remote(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.1

To verify the routing information:
HQ# sh ip route
N.B. You can download the packet tracer file here.
Thank You !!