blob: 597ad504d3fd012dad852e8d9d97f50137c8848f [file] [log] [blame]
Nick Gordonf3a9ecb2017-01-24 13:55:14 -06001\section{Routing Table}
2\label{sec:routing-table}
3
4The Routing Table module performs three main tasks: it performs the routing table calculations using a \texttt{RoutingTableCalculator} (Section~\ref{sec:routing-table-calculator}),
5it stores the calculated routing table entries in a table, and notifies the Name Prefix Table module (Section~\ref{sec:npt}) when there are changes to the calculated next hops.
6
7\subsection{Routing Table Calculators}
8\label{sec:routing-table-calculator}
9
Nick Gordon221531c2017-06-08 11:44:45 -050010The \texttt{RoutingTableCalculator} is a base class that provides functionality common to both link-state and hyperbolic routing.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060011The Routing Table module uses the implementation class specific to the type of routing currently enabled.
12
13\subsubsection{Link-State Routing Table Calculator}
14
15The \texttt{LinkStateRoutingTableCalculator} class calculates the routing table uses Dijkstra's algorithm to calculate the shortest paths in the network.
16When \texttt{max-faces-per-prefix} is set to one, the \texttt{LinkStateRoutingTableCalculator} can simply run Dijkstra's algorithm.
Nick Gordon221531c2017-06-08 11:44:45 -050017When \texttt{max-faces-per-prefix} is greater than one, indicating multi-path calculation, the \\ \texttt{LinkStateRoutingTableCalculator} will iteratively perform Dijkstra's using only a single neighbor link as a next hop.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060018The calculation will be performed using each neighbor in order to learn the path costs for each destination through each next hop.
19
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060020\subsubsection{Hyperbolic Routing Table Calculator}
21
Ashlesh Gawande69903472017-06-28 13:30:46 -050022The \texttt{HyperbolicRoutingCalculator} class calculates the routing table using the Coordinate LSAs received from each router in the network to determine the cost from each of its neighbors to every other router in the network.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060023The \texttt{HyperbolicRoutingCalculator} iterates through each of the router's neighbors calculating the hyperbolic distance from the neighbor to every other router in the network (excluding itself and the neighbor router).
24The \texttt{HyperbolicRoutingCalculator} then uses these calculated distances to add routing table entries to the destination with the neighbor as the next hop.
25The \texttt{HyperbolicRoutingCalculator} also adds a routing table entry to reach the neighbor itself; a routing table entry using the neighbor as a next hop to the neighbor with a cost of zero is added.
26
27\subsection{Notifications for Newly Calculated Next Hops}
28
Nick Gordon221531c2017-06-08 11:44:45 -050029Once the Routing Table Module has finished calculating the routing table, it will update all of the Name Prefix Table's next hops.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060030The Name Prefix Table Module will then update the next hops for each name prefix based on the newly calculated routing table.
Nick Gordon221531c2017-06-08 11:44:45 -050031This process is described in more detail in Section~\ref{sec:npt-update-with-new-route}.