2020-01-10 22:27:21 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-01-11 14:54:19 +00:00
|
|
|
set -x
|
|
|
|
|
2020-01-10 22:27:21 +00:00
|
|
|
netid=100
|
|
|
|
dev=wlp2s0
|
|
|
|
dev=wlp0s20f3
|
2020-01-10 23:24:17 +00:00
|
|
|
#dev=wlan0
|
2020-01-10 22:27:21 +00:00
|
|
|
|
2020-01-10 23:24:17 +00:00
|
|
|
ip=2a0a:e5c1:111:888::48/64
|
2020-01-10 22:27:21 +00:00
|
|
|
vxlandev=vxlan${netid}
|
|
|
|
bridgedev=br${netid}
|
|
|
|
|
|
|
|
ip -6 link add ${vxlandev} type vxlan \
|
|
|
|
id ${netid} \
|
|
|
|
dstport 4789 \
|
|
|
|
group ff05::${netid} \
|
|
|
|
dev ${dev} \
|
|
|
|
ttl 5
|
|
|
|
|
|
|
|
ip link set ${vxlandev} up
|
|
|
|
|
2020-01-10 23:23:55 +00:00
|
|
|
|
2020-01-10 22:27:21 +00:00
|
|
|
ip link add ${bridgedev} type bridge
|
|
|
|
ip link set ${bridgedev} up
|
2020-01-10 22:55:21 +00:00
|
|
|
|
2020-01-10 23:23:55 +00:00
|
|
|
ip link set ${vxlandev} master ${bridgedev} up
|
|
|
|
|
2020-01-10 22:55:21 +00:00
|
|
|
ip addr add ${ip} dev ${bridgedev}
|