From 294f280521a6741b0266f85e78d81fb23ca6b316 Mon Sep 17 00:00:00 2001 From: Louis Navarre Date: Fri, 1 Oct 2021 20:23:56 +0200 Subject: [PATCH 01/85] Add SRv6 files --- mininet/switch/configs/forward_sw1.click | 7 +++++ mininet/switch/configs/forward_sw2.click | 7 +++++ mininet/switch/srv6-fec_topo.py | 33 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 mininet/switch/configs/forward_sw1.click create mode 100644 mininet/switch/configs/forward_sw2.click create mode 100644 mininet/switch/srv6-fec_topo.py diff --git a/mininet/switch/configs/forward_sw1.click b/mininet/switch/configs/forward_sw1.click new file mode 100644 index 0000000000..cbcc88eec1 --- /dev/null +++ b/mininet/switch/configs/forward_sw1.click @@ -0,0 +1,7 @@ +fd1 :: FromDevice(sw1-eth0, SNIFFER false); +td1 :: ToDevice(sw1-eth1); +fd1 -> p1 :: Print -> Queue -> td1 ; + +fd2 :: FromDevice(sw1-eth1, SNIFFER false); +td2 :: ToDevice(sw1-eth0); +fd2 -> p2 :: Print -> Queue -> td2 ; \ No newline at end of file diff --git a/mininet/switch/configs/forward_sw2.click b/mininet/switch/configs/forward_sw2.click new file mode 100644 index 0000000000..4ae61e3702 --- /dev/null +++ b/mininet/switch/configs/forward_sw2.click @@ -0,0 +1,7 @@ +fd1 :: FromDevice(sw2-eth0, SNIFFER false); +td1 :: ToDevice(sw2-eth1); +fd1 -> p1 :: Print -> Queue -> td1 ; + +fd2 :: FromDevice(sw2-eth1, SNIFFER false); +td2 :: ToDevice(sw2-eth0); +fd2 -> p2 :: Print -> Queue -> td2 ; \ No newline at end of file diff --git a/mininet/switch/srv6-fec_topo.py b/mininet/switch/srv6-fec_topo.py new file mode 100644 index 0000000000..885062110e --- /dev/null +++ b/mininet/switch/srv6-fec_topo.py @@ -0,0 +1,33 @@ +from mininet.topo import Topo +from mininet.net import Mininet +from mininet.util import dumpNodeConnections +from mininet.cli import CLI + +import sys +import time + + +class MyTopo(Topo): + def build(self): + self.h1 = self.addHost("h1", ip="babe:1::5/64") + self.h2 = self.addHost("h2", ip="babe:1::10/64") + self.sw1 = self.addHost("sw1", ip="babe:1::6/64") + self.sw2 = self.addHost("sw2", ip="babe:1::8/64") + self.addLink(self.h1, self.sw1) + self.addLink(self.h2, self.sw2) + self.addLink(self.sw1, self.sw2) + + +def simpleRun(): + topo = MyTopo() + net = Mininet(topo) + net.start() + + dumpNodeConnections(net.hosts) + + CLI(net) + net.stop() + + +if __name__ == "__main__": + simpleRun() \ No newline at end of file From 5fc2ea99af04953db3383cc0ee61950b2cef7e34 Mon Sep 17 00:00:00 2001 From: Tom Barbette Date: Wed, 6 Oct 2021 15:07:28 +0000 Subject: [PATCH 02/85] Do not fail if File::Which is not available --- doc/click-elem2man | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/click-elem2man b/doc/click-elem2man index a076dd91bc..a6f2877049 100755 --- a/doc/click-elem2man +++ b/doc/click-elem2man @@ -1326,8 +1326,13 @@ sub process_comment ($$$) { # close output file & make links if appropriate if ($filename_func) { close OUT; - use File::Which; - $zcat = which("gzcat") ? "gzcat" : "zcat"; + $zcat = "gzcat"; + eval + { + require File::Which; + $zcat = File::Which::which("gzcat") ? "gzcat" : "zcat"; + }; + if ($gzip ? open(INX, "-|", $zcat, $main_outname) : open(INX, "<", $main_outname)) { $gzip ? open(OUTX, "-|", $zcat, $main_outname . "~") : open(OUTX, "<", $main_outname . "~"); local($/) = undef; From da77e896d6d2c8ba0560d859d55a508fada388e5 Mon Sep 17 00:00:00 2001 From: Louis Navarre Date: Wed, 6 Oct 2021 18:57:09 +0200 Subject: [PATCH 03/85] Add default mininet config to transmit packets --- mininet/switch/srv6-fec_topo.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mininet/switch/srv6-fec_topo.py b/mininet/switch/srv6-fec_topo.py index 885062110e..b62bbfe0ee 100644 --- a/mininet/switch/srv6-fec_topo.py +++ b/mininet/switch/srv6-fec_topo.py @@ -24,6 +24,10 @@ def simpleRun(): net.start() dumpNodeConnections(net.hosts) + + # Add default routes to see the packets + net["h1"].cmd("ip -6 route add default dev h1-eth0") + net["h2"].cmd("ip -6 route add default dev h2-eth0") CLI(net) net.stop() From 1972f53fc48802628efd62f63f1c2c00ff1571f6 Mon Sep 17 00:00:00 2001 From: Louis Navarre Date: Wed, 6 Oct 2021 19:09:20 +0200 Subject: [PATCH 04/85] Add IPv6 addresses by default --- mininet/switch/srv6-fec_topo.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mininet/switch/srv6-fec_topo.py b/mininet/switch/srv6-fec_topo.py index b62bbfe0ee..3708529317 100644 --- a/mininet/switch/srv6-fec_topo.py +++ b/mininet/switch/srv6-fec_topo.py @@ -28,6 +28,10 @@ def simpleRun(): # Add default routes to see the packets net["h1"].cmd("ip -6 route add default dev h1-eth0") net["h2"].cmd("ip -6 route add default dev h2-eth0") + + # Add IPv6 addresses to h1 and h2 + net["h1"].cmd("ifconfig h1-eth0 add babe:1::5/64") + net["h2"].cmd("ifconfig h2-eth0 add babe:2::5/64") CLI(net) net.stop() From 16fd9c70055550de5f031fa3466437c81723778a Mon Sep 17 00:00:00 2001 From: Tom Barbette Date: Wed, 6 Oct 2021 22:21:10 +0200 Subject: [PATCH 05/85] Vagrant: Use last version of DPDK and fix pip --- mininet/fastclick/Vagrantfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mininet/fastclick/Vagrantfile b/mininet/fastclick/Vagrantfile index a951d5e277..25bbb324d9 100644 --- a/mininet/fastclick/Vagrantfile +++ b/mininet/fastclick/Vagrantfile @@ -1,7 +1,8 @@ $init = <