Hello,
when i p4run to start the mininet with p4 switch and tcpreplay to evaluate my p4 function, there are a;ways some unwanted packets from unknown source like below picture in s1-eth2-out and s1-eth1-out.
There is simple topology with one switch and 2 hosts. And if i tcpdump to monitor the interface s1-eth1 and s1-eth2, there are no unwanted packets in the pcap.file.
I have no idea why there are they. The IPv6 is already disable.
Have you any idea about this? Thank you!
I see commands like these in some of the p4lang/tutorials files, but I have not verified whether they are actually run when you run the tutorials, or not. In a mininet environment, there is a separate Linux network namespace created for each emulated switch, and I have not verified whether these commands need to be run in each namespace, and if so, whether they actually are.
$ grep -r disable_ipv6
Binary file .git/index matches
utils/p4_mininet.py: self.cmd("sysctl -w net.ipv6.conf.all.disable_ipv6=1")
utils/p4_mininet.py: self.cmd("sysctl -w net.ipv6.conf.default.disable_ipv6=1")
utils/p4_mininet.py: self.cmd("sysctl -w net.ipv6.conf.lo.disable_ipv6=1")
utils/mininet/p4_mininet.py: self.cmd("sysctl -w net.ipv6.conf.all.disable_ipv6=1")
utils/mininet/p4_mininet.py: self.cmd("sysctl -w net.ipv6.conf.default.disable_ipv6=1")
utils/mininet/p4_mininet.py: self.cmd("sysctl -w net.ipv6.conf.lo.disable_ipv6=1")
exercises/multicast/disable_ipv6.sh:sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
exercises/multicast/disable_ipv6.sh:sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
Hi Andy,
thank you for response. Yes, these commands do need to be run in each namespace.
Yes, when i check these commands, all of them are correctly in the py.files under untils folder. Also, i issued the command: sudo vim /etc/sysctl.conf to add the correspongding command line as the last two line of your post. However, there are still three inet6 when i checked. I dont know where are they from and what could i do for these three network namespace.
Thank you~
Hi all,
I think I found the solution. I am not sure @Lululouisa could make it work, I have no idea. But in my case it work.
Open, form the Ubuntu files (not the namespace):
nano /etc/sysctl.conf
At the end of the file, add:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then activate it with (probably you did not it? @Lululouisa) :
sysctl -p
In principle, ICMPv6 traffic should no longer appear. DNS might also disappear, since it was apparently based on ICMPv6—but I don’t fully remember if that was the case. Let me know if it works for you.
When I tried with the utils approach that was suggested by @andyfingerhut , it unfortunately didn’t work for me.
Cheers,