Nick Gordon | f3a9ecb | 2017-01-24 13:55:14 -0600 | [diff] [blame^] | 1 | \section{Routing Table} |
| 2 | \label{sec:routing-table} |
| 3 | |
| 4 | The Routing Table module performs three main tasks: it performs the routing table calculations using a \texttt{RoutingTableCalculator} (Section~\ref{sec:routing-table-calculator}), |
| 5 | it 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 | |
| 10 | The \texttt{RoutingTableCalculator} is a base class provides functionality common to both link-state and hyperbolic routing. |
| 11 | The Routing Table module uses the implementation class specific to the type of routing currently enabled. |
| 12 | |
| 13 | \subsubsection{Link-State Routing Table Calculator} |
| 14 | |
| 15 | The \texttt{LinkStateRoutingTableCalculator} class calculates the routing table uses Dijkstra's algorithm to calculate the shortest paths in the network. |
| 16 | When \texttt{max-faces-per-prefix} is set to one, the \texttt{LinkStateRoutingTableCalculator} can simply run Dijkstra's algorithm. |
| 17 | When \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. |
| 18 | The 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 | |
| 23 | The \texttt{HyperbolicRoutingCalculator} class calculates the routing table uses 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. |
| 24 | The \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). |
| 25 | The \texttt{HyperbolicRoutingCalculator} then uses these calculated distances to add routing table entries to the destination with the neighbor as the next hop. |
| 26 | The \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 | |
| 30 | Once the Routing Table Module has finished calculating the routing table, it will notify the Name Prefix Table module using the \texttt{NamePrefixTable::updateWithNewRoute} interface. |
| 31 | The Name Prefix Table Module will then update the next hops for each name prefix based on the newly calculated routing table. |
| 32 | This process is described in more detail in Section~\ref{sec:npt-update-with-new-route}. |