b27f1b62f3
some kernels do that automatically, some don't
19 lines
289 B
Bash
19 lines
289 B
Bash
#!/bin/sh
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "$0 vxlanid dev"
|
|
echo "f.i. $0 100 eth0"
|
|
exit 1
|
|
fi
|
|
|
|
netid=$1; shift
|
|
dev=$1; shift
|
|
|
|
ip -6 link add vxlan${netid} type vxlan \
|
|
id ${netid} \
|
|
dstport 4789 \
|
|
group ff05::${netid} \
|
|
dev ${dev} \
|
|
ttl 5
|
|
|
|
ip link set ${dev} up
|