Routing Basics

Routers in a network discover remote networks in two ways

  • Statically configured routes
  • Dynamic routing protocols

By default routers knows only the directly connected networks represented by “C”

Static Routing

Static route are mainly used when routing from a particular network to a stub network.

Stub networks are the networks that can be accessed through one point or one interface.

Syntax:

  • Ip route (remote network) (subnet mask) (next hop address/exit interface)
  • Ip route 192.168.1.0 255.255.255.0 192.168.2.2 (next hop address)
  • Ip route 192.168.1.0 255.255.255.0 s0/0 (exit interface)

Default Route:

  • Default route is used when routing from particular network to another network with the gateway address irrespective of the network address in source.
  • Ip route 0.0.0.0 0.0.0.0 (next hot address/ exit interface)
  • Ip route 0.0.0.0 0.0.0.0 192.168.2.2 (next hop address)
  • Ip route 0.0.0.0 0.0.0.0 s0/0 (exit interface)

TIPS:

  • When using static routing we should know the destination network,
  • Static routing are more secured form of network.

Cons:

  • It is unmanageable when routers are added
  • Not scalable
  • Most Important, when destination network do any modification the update should be passed otherwise the source route route becomes invalid which increases administration overhead.

DYNAMIC ROUTING

  • Routers protocols are used to enable the routers exchange routing information, they allow routers to learn about remotely connected networks dynamically.
  • They are classified into:
  • Interior and Exterior gateway routing protocols
  • Distance vector, path vector and link state routing protocols
  • Classful and Classless
  • Routing Protocol Operation
  • Routing protocol is made up of three components
  • Data Structure:
  • This is information about remote networks. It is processed in RAM and usually the updated information are stored in neighbor table, topology table etc
  • Algorithm:
  • This is the sequential list of steps taken to determine the best path to a remote network.
  • Routing Protocol Messages:
  • These are messages usually send between networks to keep the routing table updated. Such as Include, Hello message, update message etc

EGP vs IGP (External and Internal gateway protocol)

  • Routing protocols falls in this two category. This categorization is based on Autonomous system
  • Autonomous system are defined as collection of routers under the same administration

IGP can be classified into:

  • Distance vector routing protocol
  • Link state routing protocol

Distance vector means that routes are advertised as vectors of distance and direction. If we take an example of a tourist getting directions, distance vector protocols would be where the tourist would only use road signs to get to where they are going. They do not know the exact landscape and possible blocks, they only know of the next point towards their destination.

Distance vector protocols work best in situations where:

  • The network is simple and flat and does not require a special hierarchical design.
  • The administrators do not have enough knowledge to configure and troubleshoot link- state protocols.
  • Specific types of networks, such as hub-and-spoke networks, are being implemented.
  • Worst-case convergence times in a network are not a concern

Link state routing protocols usually have a complete view of the topology. They usually know of the best paths as well as backup paths to networks. Link state protocols use the shortest-path first algorithm to find the best path to a network.

  • Link-state protocols work best in situations where:
  • The network design is hierarchical, usually occurring in large networks.
  • The administrators have a good knowledge of the implemented link-state routing protocol.
  • Fast convergence of the network is crucial.

Classful and classless

  • Classful Routing Protocols
  • Classful routing protocols don’t include the subnet mask in their routing updates. This is because they were designed prior to the introduction of CIDR and VLSM. RIPv1 is an example of such protocols.
  • Since they do not include the subnet mask in their routing updates, they cannot work where the networks have been subnetted.
  • Classless routing protocols
  • Classless routing protocols include the subnet mask with the network address in routing updates.

Administrative distance and metric

Metric

The metric, is the mechanism used by the routing protocol to assign costs to reach remote networks. The metric is used to determine the best path to a network when there are multiple paths.

Administrative Distance:

The AD is the trustworthiness of a route. Administrative distance will be used when there are different routing protocols configured on a single router. The AD is a value from 0 to 255

  • RIP 120
  • OSPF 110
  • EIGRP 90, Static 1

Distance Vector Routing Protocol

  • A router using a distance vector routing protocol does not have the knowledge of the entire path to a destination network. Instead the router knows only:
  • The direction or outbound interface
  • Distance or metric towards the destination
  • There are several characteristics inherent with distance vector routing protocols.
  • Periodic updates sent at regular intervals or bounded updates.
  • Neighbors are directly connected routers.
  • Entire routing table updates with the exception of EIGRP
  • Like all other routing protocols, the use of an algorithm is usually to determine the best path. The routing update usually defines mechanisms for:
  • Exchange of Routing information by sending and receiving messages.
  • A means to calculate the best path
  • A method to determine topology changes and updating accordingly.
  • When the routers configured with the same routing protocol boot up, the following happens before communication can happen between hosts.
  • Exchange of initial information. This may include routing protocol security, discovery packets among others.

Exchange of routes. The routers exchange routes by examining updates they receive via broadcast from other routers. They examine the routes they have learnt from their neighbors and based on the algorithm calculations, the best path is added to the routing table.

Convergence. This is the state where all routers in the routing domain have exchanged routing information. All the routers can communicate. The speed by which this happens depends on;

  • How many routers are in the routing domain?
  • The speed by which the routers learn of new routes when there is a topology change.
  • The speed of the algorithm to calculate the cost to each network in the topology.
Written by actsupp-r0cks