The process of transferring data from one local area network to another local area network with the help of Layer 3 devices (Router) is called Routing.

Network routing is the process of selecting a path across one or more networks. The principles of routing can apply to any type of network, from telephone networks to public transportation. In packet-switching networks, such as the Internet, routing selects the paths for Internet Protocol (IP) packets to travel from their origin to their destination. These Internet routing decisions are made by specialized pieces of network hardware called routers.

  • The routed protocol enables to forward packets from one router to another Example – IP
  • Routing protocol sends and receives routing information packets from one router to other routers
  • Example -RIP, OSPF, EIGRP
  • Routing protocols gather and share the routing information which is used to maintain and update the routing table.
  • That routing information is in turn used to route a routed protocol to its final destination

How does routing work?

Routers refer to internal routing tables to make decisions about how to route packets along network paths. A routing table records the paths that packets should take to reach every destination that the router is responsible for. Think of train timetables, which train passengers to consult to decide which train to catch. Routing tables are like that, but for network paths rather than trains.

Routers work in the following way: when a router receives a packet, it reads the headers* of the packet to see its intended destination, like the way a train conductor may check a passenger’s tickets to determine which train they should go on. It then determines where to route the packet based on information in its routing tables.

Routers do this million of times a second with millions of packets. As a packet travels to its destination, it may be routed several times by different routers.

Routing tables can either be static or dynamic. Static routing tables do not change. A network administrator manually sets up static routing tables. This essentially sets in stone the routes data packets take across the network unless the administrator manually updates the tables.

Dynamic routing tables update automatically. Dynamic routers use various routing protocols (see below) to determine the shortest and fastest paths. They also make this determination based on how long it takes packets to reach their destination — similar to the way Google Maps, Waze, and other GPS services determine the best driving routes based on past driving performance and current driving conditions.

Dynamic routing requires more computing power, which is why smaller networks may rely on static routing. But for medium-sized and large networks, dynamic routing is much more efficient.

Packet headers are small bundles of data attached to packets that provide useful information, including where the packet is coming from and where it is headed, like the packing slip stamped on the outside of a mail parcel.

Routing Types:

  1. Static Routing
  2. Default Routing
  3. Dynamic Routing

1. Static Routing:

The network administrator configures information about remote networks manually. They are used to reduce overhead and for security. Because of the extra administrative requirements, static routing does not have the scalability of dynamic routing.

Advantage:

  • No overhead on the router CPU
  • No bandwidth usage between routers
  • Adds security

Disadvantage:

  • The administrator must really understand the internetwork
  • If a network is added to the internetwork, the administrator has to add a route to it on all routers
  • Not feasible in large networks

Static Route Configuration:

Router(config)#ip route network [mask] {address | interface} [distance] [permanent]
OR
Routeer(config)#ip route [destination_network][mask][next-hop_address or exitinterface]
 [administrative_distance][permanent]
  • ip route: The command used to create the static route.
  • destination_network: The network you’re placing in the routing table.
  • mask: The subnet mask being used on the network.
  • next-hop_address: The address of the next-hop router that will receive the packet and forward it to the remote network. This is a router interface that’s on a directly connected network.
  • exitinterface: You can use it in place of the next-hop address if you want, but it’s got to be on a point-to-point link, such as a WAN
  • administrative_distance: By default, static routes have an administrative distance of 1 (or even 0 if you use an exit interface instead of a next-hop address)
  • permanent: If the interface is shut down, or the router can’t communicate to the next-hop router, the route will automatically be discarded from the routing table. Choosing the permanent option keeps the entry in the routing table no matter what happens.
Router(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2

2. Default Routing:

This is the method where the router is configured to send all packets towards a single router (next hop). It doesn’t matter to which network the packet belongs, it is forwarded out to the router which is configured for default routing. It is generally used with stub routers. A stub router is a router that has only one route to reach all other networks.

  • Can only use default routing on stub networks
  • Stub networks are those with only one exit path out of the network
  • The only routers that are considered to be in a stub network are R1 and R3

Default Route Configuration:

  • Default routes are used to route packets with destinations that do not match any of the other routers in the routing table.
  • A default route is actually a special static route that uses this format:
    • ip route 0.0.0.0 0.0.0.0 [next-hop-address | outgoing interface]
    • This is sometimes referred to as a “Quad-Zero” route.
  • Example using next hop address:
    • Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.4.1
  • Example using the exit interface:
    • Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0

3. Dynamic Routing:

Dynamic routing makes automatic adjustments to the routes according to the current state of the route in the routing table. It uses protocols to discover network destinations and the routes to reach them. RIP and OSPF are the best examples of dynamic routing protocols. Automatic adjustments will be made to reach the network destination if one route goes down. 

A dynamic protocol has the following features: 

  1. The routers should have the same dynamic protocol running in order to exchange routes. 
  2. When a router finds a change in the topology then the router advertises it to all other routers. 

Advantages:

  • Easy to configure. 
  • More effective at selecting the best route to a destination remote network and also for discovering remote network. 

Disadvantage:

  • Consumes more bandwidth for communicating with other neighbors. 
  • Less secure than static routing. 

Leave a Reply