Basic Routing Concepts

In This Lesson We Will Learn:

  • How a packet is forwarded and how a router learns routes
  • Dynamic Routing Protocols
  • Administrative Distance

How packets are forwarded by routers:

There are two functions that accomplish packet forwarding: path determination, and switching. Path determination is, as the name suggests, is the process the router uses to determine the best path to use when forwarding a packet. To do this, the router will search it’s routing table and determine one of the following three options:

Directly connected network – This is chosen if the destination IP address belongs to a device that is directly connected to the router through one of it’s interfaces. This would mean the host address is on the same network as the router.

Remote Network – This is chosen if the destination IP address belongs in a different network, meaning the packet would need to be forwarded to a different router, often the next hop router.

No route determined – If none of the above apply, the packet is discarded. An ICMP (Inter Control Message Protocol) message is sent to the source IP address to notify of the discarding.

How a router learns it’s routes:

A router learns routes from three sources:

  1. Direct connected routes – As discussed above, if a device is connected to one of the routers interfaces and has an IP address, the router will automatically learn its routing path and enter it into the routing table.
  2. Static Routes – These are routes that are manually input by the administrator. The administrator would require that a routing interface always route out that interface to a specified IP address.
  3. Dynamic Routes – These are routes learned by sharing from other routers using the same routing protocols.

Dynamic Routing Protocols:

Routing protocols are classified based on their characteristics:

  1. IGP or EGP
  2. Distance Vector or Link State
  3. Classful or Classless

IGP and EGP

IGP – Interior Gateway Protocols – Used for intra-AS (detailed below) routing.

EGP – Exterior Gateway Protocols – Used for inter-AS routing. Routing between AS’s.

AS stands for autonomous system, a collection of routers under a common administration that presents a common and defined routing policy to the internet. Most company networks are not ASs, as most company networks are networks within the ISP (internet service provider) AS.

Distance Vector Routing Protocols

Distance vector means that routes are advertised as vectors of distance and direction. Distance is defined in terms of hop counts, and direction is the next hop router or exit interface. Distance Vector protocols will use the Bellman-Ford algorithm to determine shortest distance between a path. In fact, the Bellman-Ford algorithm was designed to do just that. Some distance vector protocols will send complete routing tables to all connected neighbors. In large networks these routing updates can become enormous, causing significant traffic on the links.

It’s worth noting that the Bellman-Ford algorithm does not allow a router to know the exact topology of an internetwork. The router knows only the routing information from it’s neighbors.

Distance vector protocols work best when the network is simple and flat, not hierarchical. If the admins cannot configure link-state protocols, certain types of non-hierarchical networks are implemented, such as hub-and-spoke, and when convergence times are not a concern.

Routing Loop Prevention

Without any preventive measures, DV (distance vectors) can cause loops in a network, bogging down its forwarding speed. A routing loop is when a packet is continuously transmitted within a series of routers without reaching its destination. Below are examples of mechanisms that can be implemented to prevent routing loops:

  • Setting a maximum metric to prevent count to infinity – Infinity is defined as an unreachable metric or route. If a router counts to infinity (which RIP defines as 16 hops), the route is marked as unreachable.
  • Hold Down Timers – If a route is identified as down or possibly down, any other information for that route containing the same status is ignored for a predetermined amount of time (the hold-down period) to allow time for the network to converge.
  • Split Horizon – Stops allowing advertisements to be sent back through the interface where they originated.
  • Route Poisoning – The route is marked as unreachable.
  • Triggered updates – A routing table update is sent immediately in response to a routing table change.

Link-State Routing Protocols

A link-state configured router creates a complete topology of the network by taking information from all other routers. Link-state routing protocols do not use periodic updates, as Distance Vector does. Instead, after the network has converged, a link-state update is sent only when the topology changes. Link-state protocols work best when the network is hierarchical, and fast convergence is necessary.

LSDB – This is the Link state data base, this calculates the best routes to each subnet.

OSPF is the most commonly used LSRP. OSPF advertises information in routing update messages which contain link-state advertisements (LSA).

Classful Routing Protocols

The CCNA exam does not focus on Classful Routing protocols, but it is worth knowing which protocols are classful or classless.

Classful routing protocols do not send the subnet mask information in routing updates. The earliest routing protocols were classful. Because classful routing protocols do not send or make use of subnet masks, they cannot be implemented in networks that are being subnetted, meaning, classful routing protocols do not support VLSM (variable length subnet masking.) Classful routing protocols are RIPv1 and IGRP.

Classless Routing Protocols

In contrast to Classful, classless protocols do include the subnet mask in routing updates. As classless routing protocols support VLSM, they are most commonly used in today’s networks, small and large. Classless routing protocols include RIPv2(Routing Information Protocol version 2), EIGRP (Enhanced Interior Gateway Routing Protocol), OSPF (Open Shortest Path First), IS-IS (Intermediate system-to-Intermediate System), and BGP (Border Gateway Protocol).

Administrative Distance

There are times when a router may learn multiple paths to a remote network. An example would be if a static route was configured, but the router also learned a dynamic route from it’s neighbor for the same destination. Which path would the router choose to forward its packet? This is determined by the administrative distance. Cisco routers use the administrative distance (AD) value when there are two or more different routing paths for the same destination. The AD value is a number from 0 to 255. The lower the number, the more preferred that path is to the router. Of the two extremes, only a directly connected network has an AD of 0, and this cannot be changed. An AD of 255 means the router will use this route at all and will not be implemented onto the routing table.

Below is a table of the default ADs:

Leave a Reply