|
|
|
@ -32,7 +32,7 @@ For all test cases the following network settings on esprimo:
|
|
|
|
|
\end{verbatim} |
|
|
|
|
|
|
|
|
|
\subsection{Test 1: IPv4 egress settings work} |
|
|
|
|
Scenario: simple egress port setting |
|
|
|
|
Scenario: simple egress port setting for the IPv4 addresses |
|
|
|
|
|
|
|
|
|
Step 1: getting correct values for table entries from python: |
|
|
|
|
|
|
|
|
@ -189,6 +189,107 @@ listening on enp2s0f1, link-type EN10MB (Ethernet), capture size 262144 bytes
|
|
|
|
|
|
|
|
|
|
Result: success, packet is seen twice. |
|
|
|
|
|
|
|
|
|
% ------------------------------------------------------------------------------ |
|
|
|
|
\subsection{Test 3: NAT64} |
|
|
|
|
|
|
|
|
|
Additionally to the preparations done in test 1 and 2, the following |
|
|
|
|
steps were taken: |
|
|
|
|
|
|
|
|
|
Step 1: getting IP address values via Python |
|
|
|
|
|
|
|
|
|
\begin{verbatim} |
|
|
|
|
>>> int(ipaddress.IPv6Address(u"2001:db8:42::2a")) |
|
|
|
|
42540766411362381960998550477184434218L |
|
|
|
|
|
|
|
|
|
>>> int(ipaddress.IPv6Address(u"2001:db8:42::")) |
|
|
|
|
42540766411362381960998550477184434176L |
|
|
|
|
|
|
|
|
|
>>> int(ipaddress.IPv4Address(u"10.0.0.0")) |
|
|
|
|
167772160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>>> int(ipaddress.IPv4Address(u"10.0.0.66")) |
|
|
|
|
167772226 |
|
|
|
|
|
|
|
|
|
\end{verbatim} |
|
|
|
|
|
|
|
|
|
Add table entry for 2001:db8:42:2a to be translated to 10.0.0.42: |
|
|
|
|
|
|
|
|
|
\begin{verbatim} |
|
|
|
|
>> table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960998550477184434218 => 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 = 0x002a |
|
|
|
|
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 |
|
|
|
|
>> |
|
|
|
|
|
|
|
|
|
\end{verbatim} |
|
|
|
|
|
|
|
|
|
Add table entry for 10.0.0.66 to be translated to 2001:db8:42:42: |
|
|
|
|
|
|
|
|
|
\begin{verbatim} |
|
|
|
|
>> 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{verbatim} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Step 3: setting neighbor entries |
|
|
|
|
|
|
|
|
|
\begin{verbatim} |
|
|
|
|
root@ESPRIMO-P956:~# ip neigh add 10.0.0.66 lladdr f8:f2:1e:09:62:d1 dev enp2s0f0 |
|
|
|
|
nico@ESPRIMO-P956:~$ sudo ip -6 neigh add 2001:db8:42::2a lladdr f8:f2:1e:09:62:d0 dev enp2s0f1 |
|
|
|
|
\end{verbatim} |
|
|
|
|
|
|
|
|
|
Step 4: ping test should translate, but fail with wrong checksum: |
|
|
|
|
|
|
|
|
|
\begin{verbatim} |
|
|
|
|
\end{verbatim} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\begin{verbatim} |
|
|
|
|
\end{verbatim} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\chapter{\label{appendixB}Appendix B?} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|