Doc,various

This commit is contained in:
Nico Schottelius 2019-08-04 09:04:01 +02:00
parent 7c42eefd40
commit a2868a3f07
9 changed files with 500 additions and 74 deletions

View File

@ -10,7 +10,7 @@ table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 425407664113
table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477352206378 => 64 0 0 0 0
# 2001:db8:42:2a to be translated to 10.0.0.42:
table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960998550477184434218 => 42540766411362381960998550477184434176 167772160 42540766411362381960998550477184434176 0
#table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960998550477184434218 => 42540766411362381960998550477184434176 167772160 42540766411362381960998550477184434176 0
# 2001:db8:42::a00:2a to 10.0.0.42
table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960998550477352206378 => 42540766411362381960998550477184434176 167772160 42540766411362381960998550477184434176 0

4
bin/init_ipv4_esprimo.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
ip addr add 10.0.0.42/24 dev enp2s0f0
ip link set enp2s0f0 up

View File

@ -3,9 +3,13 @@
# eth1 / nsg
remote_mac=f8:f2:1e:41:44:9c
# enp2s0f1 / esprimo
remote_mac=f8:f2:1e:09:62:d1
intf=enp2s0f1
set -x
for addr in $(seq 1 64); do
hwaddr=$(printf "%0.2d" $addr)
sudo ip neighbor add 10.0.0.$addr lladdr $remote_mac dev enp2s0f0
sudo ip neighbor add 10.0.0.$addr lladdr $remote_mac dev ${intf}
done

View File

@ -5,6 +5,9 @@ Description of the theory/software/hardware that you designed.
Maybe figures here? controller,
\section{\label{Design:General}General}
\section{\label{Design:BMV2}BMV2}
\section{\label{Design:NetPFGA}NetFPGA}
Netpfga live,

View File

@ -1,92 +1,99 @@
\chapter{\label{chapter2}Problem / latex samples}
\chapter{\label{chapter2}Problem}
%** Problem.tex: Documentation in own words of the problem to
% be addressed in this document:
% What is the challenge, why is it useful what you
% plan to do.
In \ref{introduction} we start with our introduction to the problem that we
are going to address. Since we do not want to waste the readers time we
go and show the essential issues of latex in section
\ref{chapter2:essentials}.
%% In \ref{introduction} we start with our introduction to the problem that we
%% are going to address. Since we do not want to waste the readers time we
%% go and show the essential issues of latex in section
%% \ref{chapter2:essentials}.
\section{\label{chapter2:essentials}Essentials}
\section{\label{chapter2:linespeed}Line Speed NAT64}
NAT64 in software is CPU bound. Hardware can potentially do this at
line speed.
Well this section can be further subdivided into subsection. We present
this in subsection \ref{chapter2:essentials:subsections}.
\section{\label{chapter2:transitition}Simplify IPv6 deployments}
Currently network operators have to focus on two network stacks when
designing networks: IPv6 and IPv4. As To simplify network setups
\subsection{\label{chapter2:essentials:subsections}Subsections}
%% Well this section can be further subdivided into subsection. We present
%% this in subsection \ref{chapter2:essentials:subsections}.
\paragraph{\label{introduction:essentials:subsections:paragraph}Paragraphs}
can be specially referenced as well.
%% \subsection{\label{chapter2:essentials:subsections}Subsections}
Of further importance is the understanding of the following environments:
%% \paragraph{\label{introduction:essentials:subsections:paragraph}Paragraphs}
%% can be specially referenced as well.
%*** itemized lists
\begin{itemize}
\item This shows an itemized bullet list
\begin{itemize}
\item Which can be used for several levels\ldots
\end{itemize}
\end{itemize}
%% Of further importance is the understanding of the following environments:
%*** enumerated lists
\begin{enumerate}
\item The same applies to enumerated lists.
\end{enumerate}
%% %*** itemized lists
%% \begin{itemize}
%% \item This shows an itemized bullet list
%% \begin{itemize}
%% \item Which can be used for several levels\ldots
%% \end{itemize}
%% \end{itemize}
%% %*** enumerated lists
%% \begin{enumerate}
%% \item The same applies to enumerated lists.
%% \end{enumerate}
%** figures
\begin{figure}[!hbt]
\begin{center}
% \includegraphics[width=\textwidth, angle=90]{file_name.eps}
\caption{This is a figure to be printed in a float}
\label{file_name}
\end{center}
\end{figure}
%% %** figures
%% \begin{figure}[!hbt]
%% \begin{center}
%% % \includegraphics[width=\textwidth, angle=90]{file_name.eps}
%% \caption{This is a figure to be printed in a float}
%% \label{file_name}
%% \end{center}
%% \end{figure}
By figure \ref{file_name}, we show some funny figures.
%% By figure \ref{file_name}, we show some funny figures.
Table with caption and footnotes below the table.
%% Table with caption and footnotes below the table.
\begin{table}[htbp]
\begin{center}\begin{minipage}{\textwidth}
\begin{tabular}{| c | p{130pt} | l |}
\hline
Column 1 & Column 2 \newline (additional line) & Column 3 \\
\hline
C1,R2 & C2,R2 & C2,R3 \\
\hline
C1,R3 & \multicolumn{2}{| c |}{C2\&C3,R3} \\
\hline
C1,R4 & C2,R4\footnote{Footnote to table~\ref{tab:table1}} & C3,R4\\
\hline
\end{tabular}
\end{minipage}
\caption{Table 1}
\label{tab:table1}
\end{center}
\end{table}
%% \begin{table}[htbp]
%% \begin{center}\begin{minipage}{\textwidth}
%% \begin{tabular}{| c | p{130pt} | l |}
%% \hline
%% Column 1 & Column 2 \newline (additional line) & Column 3 \\
%% \hline
%% C1,R2 & C2,R2 & C2,R3 \\
%% \hline
%% C1,R3 & \multicolumn{2}{| c |}{C2\&C3,R3} \\
%% \hline
%% C1,R4 & C2,R4\footnote{Footnote to table~\ref{tab:table1}} & C3,R4\\
%% \hline
%% \end{tabular}
%% \end{minipage}
%% \caption{Table 1}
%% \label{tab:table1}
%% \end{center}
%% \end{table}
Examples of different text sizes:
%% Examples of different text sizes:
\small Small \\
\scriptsize Script size \\
\normalsize Normal \\
\large Large \\
\huge Huge \\
\normalsize
%% \small Small \\
%% \scriptsize Script size \\
%% \normalsize Normal \\
%% \large Large \\
%% \huge Huge \\
%% \normalsize
\CHECK
If we reference to another document, we cite the document \cite{Lamport:LaTeX}.
%% \CHECK
%% If we reference to another document, we cite the document \cite{Lamport:LaTeX}.
%** landscape
\NEW
\begin{landscape}
Of some interest is also the landscape environment:
\end{landscape}
%% %** landscape
%% \NEW
%% \begin{landscape}
%% Of some interest is also the landscape environment:
%% \end{landscape}
\verbatiminput{filename.txt}
Even though we don't think full listings are useful in documents,
you can easily insert complete files by the verbatiminput{}-command.
%% \verbatiminput{filename.txt}
%% Even though we don't think full listings are useful in documents,
%% you can easily insert complete files by the verbatiminput{}-command.

View File

@ -4,3 +4,7 @@
% It should conclude by a conclusion.
Sum up what you have done and recapitulate your key findings.
\section{\label{summary:overall}Overall}
\section{\label{summary:bmv2}BMV2}
\section{\label{summary:netpfga}NetFGPA}

View File

@ -1,3 +1,3 @@
\chapter{\label{timetable}Timetable (?)}
\chapter{\label{timetable}Timetable}
Here may come your thesis schedule (the original plan and ev. the actual outcome).
-> can be from plan.org

View File

@ -298,7 +298,192 @@ Step 4: ping test should translate, but fail with wrong checksum:
\chapter{\label{appendixB}Appendix B?}
\chapter{\label{appendixB}NetFPGA Logs}
Majority of the log files are stored inside the source code directory
stored at ``netpfga/logs''. It follows a selection of log files
\section{\label{chapterB:netpfga-flasherror}NetFPGA Flash Errors}
Sometimes flashing bitfiles to the NetFPGA will fail. A random amount
of reboots (1 to 3) and a random amount of reflashing will fix this
problem.
Below can be found the log output from the flashing process.
\begin{verbatim}
nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$ sudo bash -c ". $HOME/master-thesis/netpfga/bashinit && $(pwd -P)/program_switch.sh"
++ which vivado
+ xilinx_tool_path=/opt/Xilinx/Vivado/2018.2/bin/vivado
+ bitimage=minip4.bit
+ configWrites=config_writes.sh
+ '[' -z minip4.bit ']'
+ '[' -z config_writes.sh ']'
+ '[' /opt/Xilinx/Vivado/2018.2/bin/vivado == '' ']'
+ rmmod sume_riffa
+ xsct /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl -tclargs minip4.bit
rlwrap: warning: your $TERM is 'screen' but rlwrap couldn't find it in the terminfo database. Expect some problems.
RUN loading image file.
minip4.bit
100% 19MB 1.7MB/s 00:11
fpga configuration failed. DONE PIN is not HIGH
invoked from within
"::tcf::eval -progress ::xsdb::print_progress {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {process_tcf_actions_cache_client ::tcfclient#0::arg}}}"
(procedure "::tcf::cache_eval_with_progress" line 2)
invoked from within
"::tcf::cache_eval_with_progress [dict get $arg chan] [list process_tcf_actions_cache_client $argvar] $progress"
(procedure "process_tcf_actions" line 1)
invoked from within
"process_tcf_actions $arg ::xsdb::print_progress"
(procedure "fpga" line 430)
invoked from within
"fpga -f $bitimage"
(file "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl" line 33)
+ bash /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/pci_rescan_run.sh
Check programming FPGA or Reboot machine !
+ rmmod sume_riffa
rmmod: ERROR: Module sume_riffa is not currently loaded
+ modprobe sume_riffa
+ ifconfig nf0 up
nf0: ERROR while getting interface flags: No such device
+ ifconfig nf1 up
nf1: ERROR while getting interface flags: No such device
+ ifconfig nf2 up
nf2: ERROR while getting interface flags: No such device
+ ifconfig nf3 up
nf3: ERROR while getting interface flags: No such device
+ bash config_writes.sh
\end{verbatim}
\section{\label{chapterB:netpfga-flashok}NetFPGA Flash Success}
A successful flashing process also emits a couple of errors, however
the message ``fpga configuration failed. DONE PIN is not HIGH'' and
its succeeding lines are missing, as seen below.
After that in all cases a reboot is required; the PCI rescan in no
tested case showed the nf devices.
\begin{verbatim}
nico@nsg-System:~$ cd $NF_DESIGN_DIR/bitfiles/
nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$ sudo bash -c ". $HOME/master-thesis/netpfga/bashinit && $(pwd -P)/program_switch.sh"
++ which vivado
+ xilinx_tool_path=/opt/Xilinx/Vivado/2018.2/bin/vivado
+ bitimage=minip4.bit
+ configWrites=config_writes.sh
+ '[' -z minip4.bit ']'
+ '[' -z config_writes.sh ']'
+ '[' /opt/Xilinx/Vivado/2018.2/bin/vivado == '' ']'
+ rmmod sume_riffa
+ xsct /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl -tclargs minip4.bit
rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.
RUN loading image file.
minip4.bit
attempting to launch hw_server
****** Xilinx hw_server v2018.2
**** Build date : Jun 14 2018-20:18:37
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.
INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application
INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121
100% 19MB 1.7MB/s 00:11
+ bash /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/pci_rescan_run.sh
Check programming FPGA or Reboot machine !
+ rmmod sume_riffa
rmmod: ERROR: Module sume_riffa is not currently loaded
+ modprobe sume_riffa
+ ifconfig nf0 up
nf0: ERROR while getting interface flags: No such device
+ ifconfig nf1 up
nf1: ERROR while getting interface flags: No such device
+ ifconfig nf2 up
nf2: ERROR while getting interface flags: No such device
+ ifconfig nf3 up
nf3: ERROR while getting interface flags: No such device
+ bash config_writes.sh
nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$
\end{verbatim}
\section{\label{chapterB:netpfga-kernelmodule}NetFPGA Kernel module}
After a successful flash, loading the kernel module will enable nf
devices to appear in the operating system.
\begin{verbatim}
nico@nsg-System:~$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 74:d0:2b:98:38:f6 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether f8:f2:1e:41:44:9c brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether f8:f2:1e:41:44:9d brd ff:ff:ff:ff:ff:ff
5: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/none
nico@nsg-System:~$ ~/master-thesis/bin/build-load-drivers.sh
+ cd /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0
+ sudo modprobe -r sume_riffa
+ make clean
make -C /lib/modules/4.15.0-55-generic/build M=/home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0 clean
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-55-generic'
CLEAN /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0/.tmp_versions
CLEAN /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-55-generic'
+ make all
make -C /lib/modules/4.15.0-55-generic/build M=/home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-55-generic'
CC [M] /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0/sume_riffa.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0/sume_riffa.mod.o
LD [M] /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0/sume_riffa.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-55-generic'
+ sudo make install
make -C /lib/modules/4.15.0-55-generic/build M=/home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-55-generic'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-55-generic'
install -o root -g root -m 0755 -d /lib/modules/4.15.0-55-generic/extra/sume_riffa/
install -o root -g root -m 0755 sume_riffa.ko /lib/modules/4.15.0-55-generic/extra/sume_riffa/
depmod -a 4.15.0-55-generic
+ sudo modprobe sume_riffa
+ grep sume_riffa
+ lsmod
sume_riffa 28672 0
nico@nsg-System:~$
nico@nsg-System:~$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 74:d0:2b:98:38:f6 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether f8:f2:1e:41:44:9c brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether f8:f2:1e:41:44:9d brd ff:ff:ff:ff:ff:ff
5: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/none
6: nf0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 02:53:55:4d:45:00 brd ff:ff:ff:ff:ff:ff
7: nf1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 02:53:55:4d:45:01 brd ff:ff:ff:ff:ff:ff
8: nf2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 02:53:55:4d:45:02 brd ff:ff:ff:ff:ff:ff
9: nf3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 02:53:55:4d:45:03 brd ff:ff:ff:ff:ff:ff
nico@nsg-System:~$
\end{verbatim}
\section{\label{chapterB:netpfga-nftraffic}NetFPGA misses packets on nf*}
While the nf devices appear in the operating system, packets emitted
by the netpfga cannot be sniffed on the nf interfaces
directly. Instead one has to sniff packets on a physical network card
that is connected to the specific output port.
%Entries for the list of abbrevations:

View File

@ -3,13 +3,16 @@
| 2019-02-21 | Kick-Off | x |
| | Finish all admin points | x |
| | Know when/how to coordinate | x |
| | | |
| 2019-02-21 | Clarifications Ueli Maurer (Mentor) | x |
| | Write mail / phone | x |
| | | |
| 2019-02-22 | Have all papers handed in | |
| | | |
| 2019-02-22 | Have rough definition of tasks | x |
| | | |
| 2019-02-23 | python2 / ipaddress is buggy | x |
| 2019-02-23 | python2 / ipaddress is buggy / has unicode problems | x |
| | | |
| | p4utils is python2 only support | |
| | bmpy_utils is not installable with pip | |
| | python2 / latest ipaddress==1.0.22 still has the bug | |
@ -21,7 +24,7 @@
| 2019-02-24 | non reliable neighbor entries / flushing addresses puts into failed | |
| | | |
| | | |
| 2019-02-28 | Meet Laurent #2 | |
| 2019-02-28 | Meeting Laurent | |
| | - Status | |
| | * Setup base code | |
| | * Parser for all protocols (udp,tcp,icmp,icmp6) | |
@ -8264,6 +8267,7 @@ table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960
#+END_CENTER
*** TODO 2019-08-02: ipv4 checksum after nat64 is empty!
*** TODO 2019-08-03
** The NetPFGA saga
Problems encountered:
- The logfile for a compile run is 10k+ lines
@ -8355,6 +8359,221 @@ ls: cannot access '/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw
- not using raise() and hiding source of errors (_hexify)
- sometimes flashing fails:
#+BEGIN_CENTER
nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$ sudo bash -c ". $HOME/master-thesis/netpfga/bashinit && $(pwd -P)/program_switch.sh"
++ which vivado
+ xilinx_tool_path=/opt/Xilinx/Vivado/2018.2/bin/vivado
+ bitimage=minip4.bit
+ configWrites=config_writes.sh
+ '[' -z minip4.bit ']'
+ '[' -z config_writes.sh ']'
+ '[' /opt/Xilinx/Vivado/2018.2/bin/vivado == '' ']'
+ rmmod sume_riffa
+ xsct /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl -tclargs minip4.bit
rlwrap: warning: your $TERM is 'screen' but rlwrap couldn't find it in the terminfo database. Expect some problems.
RUN loading image file.
minip4.bit
100% 19MB 1.7MB/s 00:11
fpga configuration failed. DONE PIN is not HIGH
invoked from within
"::tcf::eval -progress ::xsdb::print_progress {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {process_tcf_actions_cache_client ::tcfclient#0::arg}}}"
(procedure "::tcf::cache_eval_with_progress" line 2)
invoked from within
"::tcf::cache_eval_with_progress [dict get $arg chan] [list process_tcf_actions_cache_client $argvar] $progress"
(procedure "process_tcf_actions" line 1)
invoked from within
"process_tcf_actions $arg ::xsdb::print_progress"
(procedure "fpga" line 430)
invoked from within
"fpga -f $bitimage"
(file "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl" line 33)
+ bash /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/pci_rescan_run.sh
Check programming FPGA or Reboot machine !
+ rmmod sume_riffa
rmmod: ERROR: Module sume_riffa is not currently loaded
+ modprobe sume_riffa
+ ifconfig nf0 up
nf0: ERROR while getting interface flags: No such device
+ ifconfig nf1 up
nf1: ERROR while getting interface flags: No such device
+ ifconfig nf2 up
nf2: ERROR while getting interface flags: No such device
+ ifconfig nf3 up
nf3: ERROR while getting interface flags: No such device
+ bash config_writes.sh
nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$
#+END_CENTER
*** TODO 2019-08-04: test nat64: ipv4 checksums
**** DONE Setting table entries: ok
CLOSED: [2019-08-04 Sun 08:55]
#+BEGIN_CENTER
nico@nsg-System:~$ ~/master-thesis/bin/switch-cli.sh
loading libsume..
loading libsume..
loading libcam..
The SimpleSumeSwitch interactive command line tool
type help to see all commands
>> table_cam_add_entry realmain_v4_networks_0 realmain.set_egress_port 167772202 => 16 0 0 0 0
fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)]
action_name = TopPipe.realmain.set_egress_port
field_vals = [1, '16', '0', '0', '0', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020250 = 0xa00002a
WROTE 0x44020280 = 0x0000
WROTE 0x44020284 = 0x0000
WROTE 0x44020288 = 0x10000000
WROTE 0x4402028c = 0x0001
READ 0x44020244 = 0x0001
WROTE 0x44020240 = 0x0001
READ 0x44020244 = 0x0001
READ 0x44020244 = 0x0001
success
>>
>> table_cam_add_entry realmain_v4_networks_0 realmain.set_egress_port 167772164 => 16 0 0 0 0
fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)]
action_name = TopPipe.realmain.set_egress_port
field_vals = [1, '16', '0', '0', '0', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020250 = 0xa000004
WROTE 0x44020280 = 0x0000
WROTE 0x44020284 = 0x0000
WROTE 0x44020288 = 0x10000000
WROTE 0x4402028c = 0x0001
READ 0x44020244 = 0x0001
WROTE 0x44020240 = 0x0001
READ 0x44020244 = 0x0001
READ 0x44020244 = 0x0001
success
>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434182 => 64 0 0 0 0
fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)]
action_name = TopPipe.realmain.set_egress_port
field_vals = [1, '64', '0', '0', '0', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020350 = 0x0006
WROTE 0x44020354 = 0x0000
WROTE 0x44020358 = 0x420000
WROTE 0x4402035c = 0x20010db8
WROTE 0x44020380 = 0x0000
WROTE 0x44020384 = 0x0000
WROTE 0x44020388 = 0x40000000
WROTE 0x4402038c = 0x0001
READ 0x44020344 = 0x0001
WROTE 0x44020340 = 0x0001
READ 0x44020344 = 0x0001
READ 0x44020344 = 0x0001
success
>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434242 => 64 0 0 0 0
fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)]
action_name = TopPipe.realmain.set_egress_port
field_vals = [1, '64', '0', '0', '0', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020350 = 0x0042
WROTE 0x44020354 = 0x0000
WROTE 0x44020358 = 0x420000
WROTE 0x4402035c = 0x20010db8
WROTE 0x44020380 = 0x0000
WROTE 0x44020384 = 0x0000
WROTE 0x44020388 = 0x40000000
WROTE 0x4402038c = 0x0001
READ 0x44020344 = 0x0001
WROTE 0x44020340 = 0x0001
READ 0x44020344 = 0x0001
READ 0x44020344 = 0x0001
success
>>
>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477352206378 => 64 0 0 0 0
fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)]
action_name = TopPipe.realmain.set_egress_port
field_vals = [1, '64', '0', '0', '0', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020350 = 0xa00002a
WROTE 0x44020354 = 0x0000
WROTE 0x44020358 = 0x420000
WROTE 0x4402035c = 0x20010db8
WROTE 0x44020380 = 0x0000
WROTE 0x44020384 = 0x0000
WROTE 0x44020388 = 0x40000000
WROTE 0x4402038c = 0x0001
READ 0x44020344 = 0x0001
WROTE 0x44020340 = 0x0001
READ 0x44020344 = 0x0001
READ 0x44020344 = 0x0001
success
>>
>> table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960998550477352206378 => 42540766411362381960998550477184434176 167772160 42540766411362381960998550477184434176 0
fields = [(u'hit', 1), (u'action_run', 3), (u'v6_src', 128), (u'v4_dst', 32), (u'nat64_prefix', 128), (u'table_id', 16)]
action_name = TopPipe.realmain.nat64_static
field_vals = [2, '42540766411362381960998550477184434176', '167772160', '42540766411362381960998550477184434176', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020050 = 0xa00002a
WROTE 0x44020054 = 0x0000
WROTE 0x44020058 = 0x420000
WROTE 0x4402005c = 0x20010db8
WROTE 0x44020080 = 0x0000
WROTE 0x44020084 = 0x0000
WROTE 0x44020088 = 0x0000
WROTE 0x4402008c = 0xdb80042
WROTE 0x44020090 = 0x2001
WROTE 0x44020094 = 0x0a00
WROTE 0x44020098 = 0x0000
WROTE 0x4402009c = 0x0000
WROTE 0x440200a0 = 0xdb80042
WROTE 0x440200a4 = 0x22001
READ 0x44020044 = 0x0001
WROTE 0x44020040 = 0x0001
READ 0x44020044 = 0x0001
READ 0x44020044 = 0x0001
success
>>
>> table_cam_add_entry realmain_nat46_0 realmain.nat46_static 167772226 => 42540766411362381960998550477184434176 167772160 42540766411362381960998550477184434176 0
fields = [(u'hit', 1), (u'action_run', 3), (u'v6_src', 128), (u'v4_dst', 32), (u'nat64_prefix', 128), (u'table_id', 16)]
action_name = TopPipe.realmain.nat46_static
field_vals = [2, '42540766411362381960998550477184434176', '167772160', '42540766411362381960998550477184434176', '0']
CAM_Init_ValidateContext() - done
WROTE 0x44020150 = 0xa000042
WROTE 0x44020180 = 0x0000
WROTE 0x44020184 = 0x0000
WROTE 0x44020188 = 0x0000
WROTE 0x4402018c = 0xdb80042
WROTE 0x44020190 = 0x2001
WROTE 0x44020194 = 0x0a00
WROTE 0x44020198 = 0x0000
WROTE 0x4402019c = 0x0000
WROTE 0x440201a0 = 0xdb80042
WROTE 0x440201a4 = 0x22001
READ 0x44020144 = 0x0001
WROTE 0x44020140 = 0x0001
READ 0x44020144 = 0x0001
READ 0x44020144 = 0x0001
success
>>
#+END_CENTER
**** TODO Testing translation: v4->v6
#+BEGIN_CENTER
nico@ESPRIMO-P956:~/master-thesis/bin$ ./socat-listen-tcp-v6
nico@ESPRIMO-P956:~/master-thesis$ ./bin/sniff-intf.sh enp2s0f0 netfpga-nat64
nico@ESPRIMO-P956:~/master-thesis$ ./bin/sniff-intf.sh enp2s0f1 netfpga-nat64
nico@ESPRIMO-P956:~/master-thesis/bin$ ./socat-connect-tcp-v4
#+END_CENTER
Result:
#+BEGIN_CENTER
0 packets dropped by kernel
0 packets dropped by kernel
#+END_CENTER
Problem: something removed the ipv4 address on the test host (again)
** References / Follow up
*** RFC 791 IPv4 https://tools.ietf.org/html/rfc791
*** RFC 792 ICMP https://tools.ietf.org/html/rfc792