Hierarchical Routing

The basics

See also What is an Autonomous System | Cloudflare

Forwarding table is configured by both intra- and inter-AS routing algorithm

Inter-AS v Intra-AS

Suppose router in AS1 receives datagram for which dest is outside of AS1, router will forward the packet towards one of the gateway routers. AS1 needs

  1. To learn which dests are reachable through AS2 and which through AS3
  2. To propagates this reachability info to all routers in AS1

These are all done through Inter-AS Routing

Pasted image 20231108002107.png|320

Suppose AS1 learns from the inter-AS protocol that subnet x (in AS3) is reachable from AS3 (gateway 1c) but not from AS2

Suppose AS1 learns form the inter-AS protocol that subnet x is reachable from AS3 and AS2

Pasted image 20231108110712.png|450

Why different Intra and Inter-AS routing?

  1. Policy
    • Inter-AS: admin wants control over how its traffic routed, who routes through its net
    • Intra-AS: single admin, so no policy decisions needed
  2. Scale
    • Hierarchical routing saves table size, reduced update traffic
  3. Performance
    • Intra-AS: can focus on performance
    • Inter-AS: policy may dominate over performance

Inter-AS Protocols

Routing across different ASs

BGP (Border Gateway Protocol)

BGP provides each AS a mean to

  1. Obtain subnet reachability information from neighboring ASs
  2. Propagate the reachability information to all routers internal to the AS
    • Tells nodes who the gateway routers are, but not how to get to them (this is intra-as)
  3. Determine "good" routes to subnets based on reachability information and policy

Allows a subnet to advertise its existence to rest of the Internet: "I am here"

BGP Basics

Pasted image 20231125090521.png|380

Distributing reachability info

Path attributes and BGP routes

BGP Route Selection

BGP Messages
BGP messages exchanged using TCP

BGP Routing Policy
A,B,C are provider networks
X,W,Y are customer (of provider networks)
X is dual-homed: attached to two networks
Pasted image 20231125091705.png|350

X does not want to route from B via X to C
so X will not advertise to B a route to C

A advertises to B the path AW
B advertises to X the path BAW
Should B advertise to C the path BAW?

Intra-AS Protocols

Routing within the same AS
Also known as Interior Gateway Protocols (IGP)

RIP (Routing Information Protocol)

Routing Algorithms#Distance Vector Algorithm (bellman-ford, overall topology unknown)

Example routing table for D
Pasted image 20231124174927.png|300

Link failure and recovery

RIP table processing

OSPF (Open Shortest Path First)

Routing Algorithms#Link-State Routing Algorithm (dijkstra's, overall topologies known)

OSPF advanced features that is not in #RIP (Routing Information Protocol)