Network Layer - Routing
2024-01-12
Assumption
In this scenario, all communication partners have public IP addresses
Autonomous Systems Number (ASN)
Source: https://www.caida.org/projects/cartography/as-core/2017/
Explanation of the author “The CAIDA AS Core visualization depicts the Internet’s Autonomous Systems’ (ASes) geographic locations, number of customers, and interconnections. Each AS approximately corresponds to an Internet Service Provider (ISP). The geographic location of the individual AS is inferred from the weighted centroid of its address space according to NetAcuity, a commercial geolocation service. The number of direct or indirect customers of an ASA is inferred using its customer cone.”
You can check your local FIB using the command netstat -r
(Windows and Linux) or ip route show
(Linux only).
Static routing tables are not flexible enough for the rapidly changing topologies of the Internet
A routing scheme monitors and exchanges network topology information between routers to allow correct forwarding decisions on each router
These protocols base on adequate routing algorithms that update the local forwarding tables
Requirements for a routing scheme
How to make local routing decisions?
Who decides which path to take?
Hop-by-hop routing
The path is determined by each intermediate router
Advantage: fault tolerance if a downstream router/link breaks
Drawback: Additional effort per router
When do search the path?
Initialization of the tables:
Hop\(_{ij} \longleftarrow\) ?
Metric\(_{ij} \longleftarrow\infty\) for \(i\neq j\)
Hop\(_{ij} \longleftarrow\) R\(_{i}\)
Metric\(_{ij} \longleftarrow 0\) for \(i=j\)
For each direct neighbor R\(_{j}\) of R\(_{i}\) this information is stored:
Hop\(_{ij} \longleftarrow\) R\(_{j}\)
Metric\(_{ij} \longleftarrow\) Distance\((R_{i},R_{j} )\)
Each direct neighbor R\(_{j}\) of R\(_{i}\) sends his routing table to R\(_{i}\)
For each table entry to R\(_{k}\) it is verified if Metric\(_{ij}\ +\) Metric\(_{jk}<\) Metric\(_{ik}\)
If this is true, these assignments are made:
Hop\(_{ik} \longleftarrow\) R\(_{j}\) and
Metric\(_{ik} \longleftarrow\) Metric\(_{ij}\ +\) Metric\(_{jk}\)
Source: Jörg Roth. Prüfungstrainer Rechnernetze: Aufgaben und Lösungen. Vieweg (2010)
With each advertisement round the distance values (route and cost) to router A are propagated more and more
A | B | C | |
---|---|---|---|
0 | \(\infty\) | \(\infty\) | Initial record |
0 | 1 | \(\infty\) | After advertisement round 1 |
0 | 1 | 2 | After advertisement round 2 |
⋮ | ⋮ | ⋮ | ⋮ |
A | B | C | |
---|---|---|---|
0 | 1 | 2 | Initial record |
0 | 3 | 2 | After advertisement round 1 |
0 | 3 | 4 | After advertisement round 2 |
0 | 5 | 4 | After advertisement round 3 |
0 | 5 | 6 | After advertisement round 4 |
0 | 7 | 6 | After advertisement round 5 |
0 | 7 | 8 | After advertisement round 6 |
0 | 9 | 8 | After advertisement round 7 |
0 | 9 | 10 | After advertisement round 8 |
0 | 11 | 10 | After advertisement round 9 |
0 | 11 | 12 | After advertisement round 10 |
0 | 13 | 12 | After advertisement round 11 |
0 | 13 | 14 | After advertisement round 12 |
0 | 15 | 14 | After advertisement round 13 |
0 | 15 | \(\infty\) | After advertisement round 14 |
0 | \(\infty\) | \(\infty\) | After advertisement round 15 |
\(\Longrightarrow\) Count-to-Infinity
During advertisement round 1, R\(_{B}\) gets no more information from R\(_{A}\) and supposes that the best path to reach R\(_{A}\) is via R\(_{C}\)
During advertisement round 2, R\(_{C}\) receives the information that its neighbor R\(_{B}\) can reach R\(_{A}\) with 3 hops and therefore it stores hop count value 4 in its local routing table
…
Calculation
\(\Rightarrow\) Without triggered updates, it may take up to \(15*30\) s = 7:30 minutes until a network failure between 2 routers is detected and the affected routes get marked as not available in the routing tables
Allows routing inside autonomous systems (Intra-AS routing)
OSPF messages are transmitted directly, without a Transport Layer protocol, in the payload section of IPv4 packets
89
The functioning of OSPF is complicated compared with RIP
Helpful OSPF resources Ethernet, Jörg Rech, Heise (2008)
Computernetzwerke, James F. Kurose, Keith W. Ross, Pearson (2008)
TCP/IP, Gerhard Lienemann, Dirk Larisch, Heise (2011)
OSPF is far more complex compared with RIP and it will not be discussed in this course in detail
If only the path to a specific node needs to be determined, the algorithm can stop during step 2, if the requested node is the active one
Distance | |
---|---|
d\(_{A}\) = 0 | |
d\(_{B}\) = \(\infty\) | |
d\(_{C}\) = \(\infty\) | |
d\(_{D}\) = \(\infty\) | |
d\(_{E}\) = \(\infty\) | |
d\(_{F}\) = \(\infty\) |
Distance | |
---|---|
d\(_{A}\) = 0 | visited |
d\(_{B}\) = 1 | \(\leftarrow\) minimum distance |
d\(_{C}\) = 2 | |
d\(_{D}\) = 4 | |
d\(_{E}\) = 4 | |
d\(_{F}\) = 6 |
Distance | |
---|---|
d\(_{A}\) = 0 | visited |
d\(_{B}\) = 1 | visited |
d\(_{C}\) = 2 | \(\leftarrow\) minimum distance |
d\(_{D}\) = 4 | |
d\(_{E}\) = 4 | |
d\(_{F}\) = 6 |
Distance | |
---|---|
d\(_{A}\) = 0 | visited |
d\(_{B}\) = 1 | visited |
d\(_{C}\) = 2 | visited |
d\(_{D}\) = 3 | \(\leftarrow\) minimum distance |
d\(_{E}\) = 4 | |
d\(_{F}\) = 6 |
Distance | |
---|---|
d\(_{A}\) = 0 | visited |
d\(_{B}\) = 1 | visited |
d\(_{C}\) = 2 | visited |
d\(_{D}\) = 3 | visited |
d\(_{E}\) = 4 | \(\leftarrow\) minimum distance |
d\(_{F}\) = 6 |
Distance | |
---|---|
d\(_{A}\) = 0 | visited |
d\(_{B}\) = 1 | visited |
d\(_{C}\) = 2 | visited |
d\(_{D}\) = 3 | visited |
d\(_{E}\) = 4 | visited |
d\(_{F}\) = 5 | \(\leftarrow\) minimum distance |
Distance | |
---|---|
d\(_{A}\) = 0 | visited |
d\(_{B}\) = 1 | visited |
d\(_{C}\) = 2 | visited |
d\(_{D}\) = 3 | visited |
d\(_{E}\) = 4 | visited |
d\(_{F}\) = 5 | visited |
BGP router have to select paths and make forwarding decisions:
Preference
Route Selection
Route Forwarding
You should now be able to answer the following questions:
Computer Networks - Network Layer - Routing - WS 23/24