WIFI and network namespaces
Posted Wed 11 Nov 2020 12:18:22 PM CET
Florian Lohoff
Just to document this. And probably somebody else finds this useful. This is a way to use an redundant Wifi Module and put it into a seperate namespace and connect it somewhere. Now one can monitor e.g. the Wifi Performance without beeing actually dependent on it. Next coming up would be Smokeping.
auto wlp2s0
iface wlp2s0 inet manual
pre-up ip netns add freifunk || true
pre-up iw phy phy0 set netns name freifunk || true
pre-up ip netns exec freifunk ip link set wlp2s0 up || true
pre-up ip netns exec freifunk iw dev wlp2s0 connect Freifunk || true
pre-up ip netns exec freifunk dhclient wlp2s0 || true
down ip netns exec freifunk ip link set wlp2s0 down
down ip netns exec freifunk iw phy phy0 set netns 1
down ip netns del freifunk