Last active
August 29, 2015 14:26
-
-
Save tcatm/1832c8e4fb6198f0adb3 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 add dev aaa0 type veth peer name aaa1 | |
ip link add dev bbb0 type veth peer name bbb1 | |
for if in aaa0 aaa1 bbb0 bbb1; do ip link set up $if; done | |
ip link set mtu 1300 dev aaa0 | |
ip link set mtu 1300 dev aaa1 | |
ip link set mtu 1400 dev bbb0 | |
ip link set mtu 1400 dev bbb1 | |
batctl -m bat0 if add aaa0 | |
batctl -m bat1 if add aaa1 | |
batctl -m bat1 if add bbb0 | |
batctl -m bat2 if add bbb1 | |
# bat0 bat1 bat2 | |
# ------------------------ | |
# MTU | |
# 1300 | |
# aaa0 ---- aaa1 MTU | |
# 1400 | |
# bbb0 ---- bbb1 | |
ip netns add ns0 | |
ip netns add ns1 | |
ip netns add ns2 | |
ip link set dev bat0 netns ns0 | |
ip link set dev bat1 netns ns1 | |
ip link set dev bat2 netns ns2 | |
ip netns exec ns0 ip link set up bat0 | |
ip netns exec ns1 ip link set up bat1 | |
ip netns exec ns2 ip link set up bat2 | |
ip netns exec ns0 ip address add 10.0.0.1/16 dev bat0 | |
ip netns exec ns1 ip address add 10.0.1.1/16 dev bat1 | |
ip netns exec ns2 ip address add 10.0.2.1/16 dev bat2 | |
# wait a little until the mesh is ready | |
sleep 15 | |
ip netns exec ns0 ping -c 2 10.0.2.1 -s 100 # works | |
ip netns exec ns0 ping -c 2 10.0.2.1 -s 1500 # does not work | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment