Demystifying Routing

Author:Jeff Propes
Date:June 14, 2015

Follow along with me at http://self2015.grimoi.re/demystifying_routing/

Overview

Quick review of IP

Routers introduced via example

The routing table

The routing decision

Cleanup

Setting Expectations

Our goal today is to peel back the curtain on routing

Remove any fears that "Routing is hard!"

Understand that all routing is straightforward, no matter what scale

Be able to study further on your own

What This Presentation Is Not

Things not covered:

Comparison of Router Brands

Prep for certifications

IP subnetting

Reviewing IP

IP - The Internet Protocol (IP) is the principal communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet. (Source: Wikipedia)

Layer 3 in the OSI Model

Connectionless protocol (compare: TCP)

Agnostic to what happens at layer 2

An IP Packet

Copyright © Oskar Andreasson. The Iptables Tutorial

images/ip-headers.jpg images/ip-headers-highlighted.jpg

IP Addresses

Example IPv4 Address: 50.116.28.130

Example IPv6 Address: fe80::3e15:c2ff:fe2b:1818

Subnet Mask

Subnet mask logically separates an IP address into a network portion and a host portion

Routing Introduced

Routing is an intrinsic part of the IP protocol

Every IP-based network device has a router in it

Your computers. Your tablets. Your phones. Your VMs.

images/everything.png

Routing Introduced

Quite simply, routing is making a decision on what transport a packet should use to go to its destination.

images/us_map.png

Routing Facts

A routing decision happens for each IP packet that passes through (connectionless).

Each decision is the best possible at the point in time it is made.

Packets are buffered and decided upon in the order they arrive

Once a packet is forwarded, the router DOESN'T CARE WHAT HAPPENS TO IT

The Routing Table

images/routing_table.png

The Routing Table (cont.)

Each route has three crucial elements:

The Routing Decision

  1. Verify that the packet checksum is valid. If not, throw it away.
  2. Verify that the TTL of the packet is >0. If not, throw it away.
  3. Compare destination address against prefixes in the routing table, starting with the longest, most specific ones (longest subnet mask)
  4. If you have more than one match, compare the metric to decide which route you should use (lower wins)
  5. Decrement the TTL and forward the packet onto the interface identified in steps 3-4.

Filling The Routing Table

All routing decisions are based upon the current contents of the routing table

The table can be filled by:

The Gateway Route

Route of last resort, also called the default route

High metric so that it goes last

Any packets not matching other routes is sent to the gateway

If you aren't connected to the internet, you may not have this route

Tiering

Your gateway route goes out to your ISP who handles the packet for you.

They have a gateway route to a larger ISP (tier 2)

The tier 2 ISP connects to the backbone, which doesn't need a gateway route

This forms into a tree structure we call tiering

Discussed at length in the BGP presentation

This Seems Too Easy ...

It is easy! But there are some gotchas

Routing protocols (BGP, OSFP/IS-IS, RIP) to fill the routing table

What order do I compare routes for highest efficiency?

How fast can I go?

Fin

Thanks for coming!

This presentation can be found permanently at http://self2015.grimoi.re/demystifying_routing/

Stick around for the next session: Demystifying BGP taught by Ken Propes