blob: 6bba5b7b3a974369eb0569381025b2de5e07cce8 [file] [log] [blame]
Nick Gordonf3a9ecb2017-01-24 13:55:14 -06001\section{Introduction}
2\label{sec:intro}
3
4The Named-data Link State Routing protocol (NLSR) is an intra-domain routing protocol for Named Data Networking (NDN).
5It is an application level protocol similar to many IP routing protocols, but NLSR uses NDN's Interest/Data packets to disseminate routing updates.
6Although NLSR is designed in the context of a single domain, its design patterns may offer a useful reference for future development of inter-domain routing protocols.
7
8NLSR supports name-based routing in NDN, computes routing ranks for all policy-compliant next-hops which provides a name-based multi-path routing table for NDN's forwarding strategy,
9and ensures that routers can originate only their own routing updates using a hierarchical trust model.
10
11\subsection{NLSR Modules and Data Structures}
12\label{sec:modules}
13NLSR contains multiple modules that each contribute to the total realization of the protocol.
14Many of the modules interact with one another to trigger some behavior or to modify information in data structures.
15NLSR uses the following modules:
16\begin{itemize}
17\item \textbf{Hello Protocol} (Section~\ref{sec:hello-protocol}) - determines the status of neighboring routers using periodic Hello Interests and notifies other modules when neighbors' statuses change.
Nick Gordon221531c2017-06-08 11:44:45 -050018\item \textbf{ChronoSync} - provides network-wide synchronization of NLSR LSDBs.~\cite{chronosync}
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060019\item \textbf{Sync Logic Handler} (Section~\ref{sec:sync-logic}) - handles sync update notifications from NSync by retrieving updated LSAs.
20\item \textbf{LSAs} (Section~\ref{sec:lsas}) - represent routing information published by the router.
21\item \textbf{LSDB} (Section~\ref{sec:lsdb}) - stores the LSA information distributed by other routers in the network.
22\item \textbf{Routing Table} (Section~\ref{sec:routing-table}) - calculates and maintains a list of next hops for each router in the network.
23\item \textbf{Name Prefix Table} (Section~\ref{sec:npt}) - stores all advertised name prefixes and their next hops.
24\item \textbf{FIB} (Section~\ref{sec:fib}) - maintains a shadow FIB which represents the intended state of NFD's FIB~\cite{NFD}.
Nick Gordon221531c2017-06-08 11:44:45 -050025\item \textbf{Prefix Update Processor} (Section~\ref{sec:prefix-update}) - listens for dynamic prefix announcements to advertise or withdraw name prefixes.
26\item \textbf{NFD RIB Command Processor} (Section~\ref{sec:nfd-rib-commands}) - listens for readvertise-to-NLSR commands to advertise or withdraw name prefixes that were inserted into NFD.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060027\end{itemize}
28
29\subsection{Protocol Overview}
30\label{sec:protocol-overview}
31
Nick Gordon221531c2017-06-08 11:44:45 -050032NLSR is designed to accomplish three main tasks: (1) discover adjacent
33neighbors; (2) disseminate and synchronize topology, name prefix, and
34hyperbolic routing information; and (3) calculate a routing table and
35populate NFD's FIB. The entire protocol is described in detail in the
36NLSR paper~\cite{NlsrTr}.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060037
38\subsubsection{Discovering Neighbors}
39
40NLSR determines the adjacency status of neighboring routers using the Hello Protocol module (Section~\ref{sec:hello-protocol}).
41When the Hello Protocol detects a status change for a neighbor, it will ask the LSDB module (Section~\ref{sec:lsdb}) to update the router's advertised adjacency information.
42
Nick Gordon886fd5d2017-09-05 16:03:20 -050043Additionally, NLSR discovers the infrastructure for communicating with
44neighbors by querying NFD, which maintains a dataset of all
45information for its Faces.
46
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060047\subsubsection{Disseminating Routing Information}
48
Nick Gordon221531c2017-06-08 11:44:45 -050049When a router's LSAs (Section~\ref{sec:lsas}) changes, the information of this change should be distributed to every other router in the network.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060050The Sync Logic Handler module (Section~\ref{sec:sync-logic}) is used to notify the synchronization protocol of changes to the router's own LSAs as well as to learn of LSA changes from other routers in the network;
Nick Gordon221531c2017-06-08 11:44:45 -050051the Sync Logic Handler module interfaces with ChronoSync to perform the two tasks.
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060052
53When the Sync Logic Handler module learns of a new LSA, it will inform the LSDB module.
54The LSDB module will attempt to fetch the new LSA and will store it in the LSDB module's database if it can be retrieved.
55If the newly fetched LSA informs the router of previously unknown routing information, the LSDB module will inform other modules depending on the type of routing information:
56\begin{itemize}
Nick Gordon221531c2017-06-08 11:44:45 -050057 \item \textbf{Change in network topology} - the LSDB module will ask the Routing Table module (Section~\ref{sec:routing-table}) to recalculate paths in the network
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060058\item \textbf{Change in name prefix advertisement} - the LSDB module will inform the Name Prefix Table module (Section~\ref{sec:npt}), which will in turn notify the FIB module (Section~\ref{sec:fib}) in order to add or remove the changed name prefixes.
59\item \textbf{Change in hyperbolic coordinates} - the LSDB module will inform the Routing Table module (Section~\ref{sec:routing-table}), so the Routing Table module can calculate an up-to-date routing table.
60\end{itemize}
61
62\subsubsection{Calculating the Routing Table and Populating NFD's FIB}
63
64When the routing table is calculated by the Routing Table module, the computed next hops are passed to the Name Prefix Table module.
65The Name Prefix Table module will then further pass the next hops to the FIB module to update NLSR's expected state of NFD's FIB.
66The FIB module will then perform the registrations or unregistrations with NFD's FIB.\\
67
68A simplified diagram of NLSR's actions when receiving new routing information is shown in Figure~\ref{fig:system-interaction}.
69The remainder of this documentation will describe the purpose of and interaction between each module in more detail.
70
71\begin{figure}
72\center
Nick Gordoneafb2a22017-01-24 14:55:56 -060073\includegraphics[width=\linewidth]{figures/system-interaction.pdf}
Nick Gordonf3a9ecb2017-01-24 13:55:14 -060074\caption{Simplified Diagram of the Actions of NLSR's Modules}
75\label{fig:system-interaction}
76\end{figure}
77
Nick Gordonf750ef52017-02-13 13:28:09 -060078\subsection{Dispatcher}
79\label{sec:dispatcher}
80
81NLSR takes advantage of a variety of ndn-cxx convenience
82mechanisms. Among these is the dispatcher. The dispatcher provides
83facilities for receiving and decoding ControlCommands, which
84simplifies the processing workflow. The dispatcher itself is
85\href{http://named-data.net/doc/ndn-cxx/current/doxygen/de/d34/classndn_1_1mgmt_1_1Dispatcher.html}{well-documented},
86so we will only give a brief overview here.
87
88\begin{itemize}
89\item Any prefixes that are registered, such as ``prefix/register'',
90 \emph{must} be registered before top-level prefixes. All prefix
91 registrations should go in \texttt{Nlsr::registerLocalhostPrefix}.
92\item The dispatcher can be used to accept incoming ControlCommands
93 and respond to requests for datasets. Currently NLSR uses the
94 dispatcher only for accepting incoming ControlCommands.
95\item Top-level prefixes cannot overlap. For example, you cannot
96 register ``/localhost/nlsr'' and then ``/localhost/nlsr/fib''. The
97 second registration must be done as a sub-prefix of the first,
98 i.e. the first prefix, and then ``fib''.
99\end{itemize}