info_i_25x25.png See important information about Ubiquiti Devices and KRACK Vulnerability in this article. We will update this document as more information becomes available.

Intro to Networking - Packet Routing Tables & Protocols

 Overview


 This article gives an introduction on Routing, Routing Protocols and how they work.

Table of Contents


  1. What is Packet Routing
  2. Routers & Routing Tables
  3. Routing Protocols
  4. Example
  5. Related Articles

What is Packet Routing


Back to Top

Hosts that send traffic to other Hosts outside their own network do so by first forwarding traffic to their Local Gateway (Router). Quite literally, routers "route" (i.e., move) packets between IP networks based on information stored in their Routing tables.


Routers & Routing Tables


Back to Top

Gateways, also known as routers, determine the ‘next hop’ or next Gateway to which a packet should be forwarded, based on the best Route according to the Destination IP contained in the Packet.

Also known as the Routing Information Base (RIB), the Routing Table contains a list of all the best Routes suggested by each Routing Protocol.

When examining the Routing Table to decide which Route will be selected to move a Packet, a Route Election occurs, whereupon the Router considers the following Criteria, listed in order:

  1. Network ID & Prefix, meaning more specific Network Ranges, are more desirable routes.
  2. Route Reliability, or Administrative Distance (also abbreviated as “AD”). Route Reliability is related to the Routing Protocol used, where, by default, Connected, Static, and Dynamic Routes are preferred—in that order.
  3. Cost or, Metric, assessed by the Routing Protocol to each Route Path, in case of a tie between Routes with the same Network Prefix & AD.

Should a tie occur at the end of the Route Election, the Gateway may choose multiple paths for packets, in the case of Equal Cost Multi-Path (ECMP) Routing.

Also contained in each route is the address or interface of the next hop to forward the packet.

sample-rib-overview.png
An example Router's Routing Information Base (RIB, or Routing Table).

 


Routing Protocols


Back to Top

In general, three types of Routing Protocols exist:

  • Connected Routes represent the networks to which a router interface is directly connected, therefore considered most reliable routes, with an administrative distance of zero.
  • Static Routes identify a target interface or address to which packets can be forwarded in to reach a given network, and are manually added by admins, and with a default administrative distance of one, are second only to connected routes in terms of reliability.
  • Finally, Dynamic Routes represent routes calculated and shared in real-time despite a dynamically changing network, whose reliability or preference varies by protocol, while OSPF has a default distance of one-hundred and ten.

Policy-Based Routing (PBR) causes Routers to consider additional parameters for routing packets, such as application, transport, network, and link layer data contained in the packet. PBR is often implemented via rules which, when triggered, mark/assign the packet to a unique Routing Table with unique route entries.


Example


Back to Top

In many ways, Routing is analogous to highway travel. The traveler, like a network packet, drives from gas station to gas station (which are not unlike routers) asking for directions. An Attendant at each Gas Station looks at the local roadmap (not unlike Routing Tables), to get the Traveler on the best path, until reaching the Traveler’s final destination.


Related Articles


Back to Top

Read our other introductory networking articles in the Intro to Networking section.