Commit 69ff3f36 authored by Pavel Tvrdík's avatar Pavel Tvrdík

Fix IPv6 network

parent 610e7dfb
......@@ -117,3 +117,17 @@ function if_veth()
netns_run $3 ip addr add ${5}.2/24 dev $4
fi
}
function if_veth6()
{
ip link add name $2 netns $1 type veth peer name $4 netns $3
netns_run $1 ip link set $2 up
netns_run $3 ip link set $4 up
if [ -n "${5}" ]
then
netns_run $1 ip addr add ${5}::1/48 dev $2
netns_run $3 ip addr add ${5}::2/48 dev $4
fi
}
......@@ -62,7 +62,8 @@ done
for((i = 1; i < NETLAB_SIZE; i++))
do
if_veth $(eval echo \$m$i) ve1 $(eval echo \$m$((i+1))) ve2 10.1.$i
if_veth $(eval echo \$m$i) ve1 $(eval echo \$m$((i+1))) ve2 10.0.$i
if_veth6 $(eval echo \$m$i) ve1 $(eval echo \$m$((i+1))) ve2 2001:db8:$i
done
netlab_start
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment