try to emit on ANY other port
This commit is contained in:
parent
eed0f3c56e
commit
62e0279b25
3 changed files with 41 additions and 2 deletions
23
doc/plan.org
23
doc/plan.org
|
@ -7992,6 +7992,29 @@ listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
|
|||
00:13:59.182948 ARP, Request who-has 10.0.0.201 tell 10.0.0.200, length 46
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
*** TODO 2019-07-29: after recompiling with default = 16, icmp4 seen on eth1 of nsg
|
||||
eth1@nsg:
|
||||
|
||||
#+BEGIN_CENTER
|
||||
09:18:17.411700 IP6 2001:db8:42::42 > 2001:db8:42::1: ICMP6, echo request, seq 1, length 64
|
||||
09:18:18.413405 IP6 2001:db8:42::42 > 2001:db8:42::1: ICMP6, echo request, seq 2, length 64
|
||||
09:18:19.437540 IP6 2001:db8:42::42 > 2001:db8:42::1: ICMP6, echo request, seq 3, length 64
|
||||
09:18:20.461534 IP6 2001:db8:42::42 > 2001:db8:42::1: ICMP6, echo request, seq 4, length 64
|
||||
09:18:21.485394 IP6 2001:db8:42::42 > 2001:db8:42::1: ICMP6, echo request, seq 5, length 64
|
||||
|
||||
09:18:46.452656 IP 10.0.0.200 > 10.0.0.1: ICMP echo request, id 4648, seq 1, length 64
|
||||
09:18:47.469570 IP 10.0.0.200 > 10.0.0.1: ICMP echo request, id 4648, seq 2, length 64
|
||||
09:18:48.493577 IP 10.0.0.200 > 10.0.0.1: ICMP echo request, id 4648, seq 3, length 64
|
||||
|
||||
#+END_CENTER
|
||||
|
||||
reflashing switch
|
||||
|
||||
*** TODO 2019-07-29: try to set egress to anything that is not 1
|
||||
- ..hardcoded: sets to 4 (default) 16 (natted v4->v6) 64 (natted
|
||||
v6->v4)
|
||||
- ... dummy: 1 for arp, 1 for v4, 16 for v6
|
||||
** The NetPFGA saga
|
||||
Problems encountered:
|
||||
- The logfile for a compile run is 10k+ lines
|
||||
|
|
|
@ -6,6 +6,21 @@ action send_to_port1() {
|
|||
sume_metadata.dst_port = 16;
|
||||
}
|
||||
|
||||
action select_port_by_type() {
|
||||
/*
|
||||
>>> 0x86dd >> 11 v6
|
||||
16
|
||||
>>> 0x0800 >> 11 v4
|
||||
1
|
||||
>>> 0x0806 >> 11 ARP
|
||||
1
|
||||
|
||||
*/
|
||||
|
||||
sume_metadata.dst_port = hdr.ethernet.ethertype >> 11;
|
||||
}
|
||||
|
||||
|
||||
table dummy_table_for_netpfga {
|
||||
key = {
|
||||
hdr.ethernet.dst_addr: exact;
|
||||
|
@ -13,9 +28,10 @@ table dummy_table_for_netpfga {
|
|||
|
||||
actions = {
|
||||
send_to_port1;
|
||||
select_port_by_type;
|
||||
}
|
||||
size = 64;
|
||||
default_action = send_to_port1;
|
||||
default_action = select_port_by_type; //send_to_port1;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -42,5 +42,5 @@ if(hdr.ipv6.isValid()) {
|
|||
|
||||
set_egress_port(v6_out);
|
||||
} else {
|
||||
set_egress_port(1);
|
||||
set_egress_port(4);
|
||||
}
|
Loading…
Reference in a new issue