blob: 17ea6f2f9d87e9df70dea9c00f3aa201d60edd5f [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
10The \texttt{RoutingTableCalculator} is a base class provides functionality common to both link-state and hyperbolic routing.
11The 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.
17When \texttt{max-faces-per-prefix} is set to a value indicating multi-path calculation, the \\ \texttt{LinkStateRoutingTableCalculator} will iteratively perform Dijkstra's using only a single neighbor link as a next hop.
18The calculation will be performed using each neighbor in order to learn the path costs for each destination through each next hop.
19
20
21\subsubsection{Hyperbolic Routing Table Calculator}
22
Ashlesh Gawande69903472017-06-28 13:30:46 -050023The \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 -060024The \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).
25The \texttt{HyperbolicRoutingCalculator} then uses these calculated distances to add routing table entries to the destination with the neighbor as the next hop.
26The \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.
27
28\subsection{Notifications for Newly Calculated Next Hops}
29
30Once the Routing Table Module has finished calculating the routing table, it will notify the Name Prefix Table module using the \texttt{NamePrefixTable::updateWithNewRoute} interface.
31The Name Prefix Table Module will then update the next hops for each name prefix based on the newly calculated routing table.
32This process is described in more detail in Section~\ref{sec:npt-update-with-new-route}.