Created
May 23, 2016 19:03
-
-
Save mrizvic/8306a9fe76521b2225932ccdd427f77c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip link set up dev p1p1 | |
ip link set up dev p1p2 | |
ip netns add foo | |
ip netns add bar | |
ip link add veth0 type veth peer name veth1 | |
ip link set veth1 netns foo | |
ip link add veth2 type veth peer name veth3 | |
ip link set veth3 netns bar | |
brctl addbr br0 | |
brctl addif br0 p1p1 | |
brctl addif br0 veth0 | |
brctl addbr br1 | |
brctl addif br1 p1p2 | |
brctl addif br1 veth2 | |
ip link set up dev br0 | |
ip link set up dev br1 | |
ip link set up dev veth0 | |
ip link set up dev veth2 | |
ip netns exec bar ip addr add 192.168.5.20/24 dev veth3 | |
ip netns exec foo ip addr add 192.168.5.10/24 dev veth1 | |
ip netns exec bar ip link set up dev veth3 | |
ip netns exec foo ip link set up dev veth1 | |
ip netns exec foo iperf3 -s | |
ip netns exec bar iperf3 -c 192.168.5.10 | |
ip netns exec bar iperf3 -c 192.168.5.10 -R | |
ip link set mtu 9000 dev p1p1 | |
ip link set mtu 9000 dev p1p2 | |
ip link set mtu 9000 dev veth0 | |
ip link set mtu 9000 dev veth2 | |
ip netns exec foo ip link set mtu 9000 dev veth1 | |
ip netns exec bar ip link set mtu 9000 dev veth3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment