Example basic_tunnel, inconsistencies
Following workflow in the example, they tell us in README.md (Step 2, point 5):
The packet should be received at h2. If you examine the received packet you should see that is consists of an Ethernet header, a tunnel header, an IP header, a TCP header, and the message.
After run it out, I can not see the TCP header anywhere. I compare my p4 code with the solution but it's fine... Checking the send.py tool:
if (dst_id is not None):
#Using tunneling
print "sending on interface {} to dst_id {}".format(iface, str(dst_id))
pkt = Ether(src=get_if_hwaddr(iface), dst='ff:ff:ff:ff:ff:ff')
pkt = pkt / MyTunnel(dst_id=dst_id) / IP(dst=addr) / args.message
else:
print "sending on interface {} to IP addr {}".format(iface, str(addr))
pkt = Ether(src=get_if_hwaddr(iface), dst='ff:ff:ff:ff:ff:ff')
pkt = pkt / IP(dst=addr) / TCP(dport=1234, sport=random.randint(49152,65535)) /
args.message
You can see how when you use the tunnel does not add header tcp
Adding 'help wanted' label to this issue in hopes someone with interest can determine whether this is still an issue with the latest tutorials files, or perhaps this was fixed some time ago.
Fixed by changing send.py program to always add a TCP header to the packet sent, with PR https://github.com/p4lang/tutorials/pull/625