|
|
|
@ -259,25 +259,7 @@ session table inside the python controller. While the Jool and Tayga
|
|
|
|
|
both support cleaning up old session entries, |
|
|
|
|
our P4 based solution does not support this feature at the moment. |
|
|
|
|
% ---------------------------------------------------------------------- |
|
|
|
|
\section{\label{Design:BMV2}BMV2} |
|
|
|
|
Development of the thesis took place on a software emulated switch |
|
|
|
|
that is implemented using Open vSwitch~\cite{openvswitch} |
|
|
|
|
and the behavioral model~\cite{_implem_your_switc_target_with_bmv2}. |
|
|
|
|
The development followed |
|
|
|
|
closely the general design shown in section |
|
|
|
|
\ref{design:nat64}. Within the software emulation checksums can be |
|
|
|
|
computed with two different methods: |
|
|
|
|
\begin{itemize} |
|
|
|
|
\item Recalculating the checksum by inspecting headers and payload |
|
|
|
|
\item Calculating the difference between the translated headers |
|
|
|
|
\end{itemize} |
|
|
|
|
The BMV2 model is rather sophisticated and provides many standard |
|
|
|
|
features including checksumming over payload. This allows the BMV2 |
|
|
|
|
model to operate as a full featured host, including advanced features |
|
|
|
|
like responding to ICMP6 Neighbor discovery requests~\cite{rfc4861} |
|
|
|
|
that include payload checksums. |
|
|
|
|
A typical code to create the checksum can be found in figure |
|
|
|
|
\ref{fig:checksum}. |
|
|
|
|
\section{\label{design:bmv2}P4/BMV2} |
|
|
|
|
\begin{figure}[h] |
|
|
|
|
\begin{verbatim} |
|
|
|
|
/* checksumming for icmp6_na_ns_option */ |
|
|
|
@ -306,12 +288,39 @@ update_checksum_with_payload(meta.chk_icmp6_na_ns == 1,
|
|
|
|
|
); |
|
|
|
|
\end{verbatim} |
|
|
|
|
\centering |
|
|
|
|
\caption{IPv4 Pseudo Header} |
|
|
|
|
\label{fig:checksum} |
|
|
|
|
\caption{P4/BMV2 checksumming} |
|
|
|
|
\label{fig:bmv2checksum} |
|
|
|
|
\end{figure} |
|
|
|
|
|
|
|
|
|
The software emulated switch that is implemented using |
|
|
|
|
Open vSwitch~\cite{openvswitch} and the |
|
|
|
|
behavioral model~\cite{_implem_your_switc_target_with_bmv2} |
|
|
|
|
offers the fastest and easiest way of P4 development. All NAT64 |
|
|
|
|
features are tested first on P4/BMV2 and in a second step ported to |
|
|
|
|
P4/NetFPGA and modified, where necessary. |
|
|
|
|
The development follows closely the general design shown in section |
|
|
|
|
\ref{design:nat64}. |
|
|
|
|
As outlined in section \ref{background:checksums}, checksums inside |
|
|
|
|
higher level protocols need to be adjusted after translation. |
|
|
|
|
Within the software emulation checksums can be |
|
|
|
|
computed with two different methods: |
|
|
|
|
\begin{itemize} |
|
|
|
|
\item Recalculating the checksum by inspecting headers and payload |
|
|
|
|
\item Calculating the difference between the translated headers |
|
|
|
|
\end{itemize} |
|
|
|
|
The BMV2 model is sophisticated and provides direct support |
|
|
|
|
for calculating the checksum over the payload. This allows the BMV2 |
|
|
|
|
model to operate as a full featured host, including advanced features |
|
|
|
|
like responding to ICMP6 Neighbor discovery requests~\cite{rfc4861} |
|
|
|
|
that include payload checksums. Sample code that calculates the |
|
|
|
|
required checksum for answering NDP queries is shown in figure |
|
|
|
|
\ref{fig:bmv2checksum}. The code shows how the field |
|
|
|
|
\texttt{hdr.icmp6.checksum} is updated with the \texttt{csum16} method |
|
|
|
|
depending on the IPv6 and ICMP6 headers as well as the payload. The |
|
|
|
|
second option of using the differences is described in section |
|
|
|
|
\ref{design:netpfga}. |
|
|
|
|
% ok |
|
|
|
|
% ---------------------------------------------------------------------- |
|
|
|
|
\section{\label{Design:NetPFGA}NetFPGA - FIXME: relate things} |
|
|
|
|
\section{\label{design:netpfga}NetFPGA - FIXME: relate things} |
|
|
|
|
While the P4-NetFPGA project ~\cite{netfpga:_p4_netpf_public_github} |
|
|
|
|
allows compiling P4 to the NetPFGA, the design slightly varies. |
|
|
|
|
In particular, the NetFPGA P4 compiler does not support reading |
|
|
|
|