Developing lightweight computation at the DSG edge

Commit a9e63695 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[qmp-system] Do not use VLANs by default on Ethernet interfaces



Since devices started to have switched Ethernet devices (namely, eth0.1
and eth0.2), using VLANs for the routing protocols (i.e., VLAN12 for
BMX6) became a challenge. The 802.1ad (QinQ) VLANs solution was cool,
but the MTU had to be changed to fit the extra 4 bytes, and it never
quite worked well. Therefore, it seems better to not use VLAN for the
routing protocol by default.
Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent e40b9f0f
......@@ -253,6 +253,7 @@ qmp_configure_smart_network() {
[ "$dev" == "$ddev" ] && {
lan="$lan $dev"
mesh="$mesh $dev"
novlan="$novlan $dev"
continue
}
done
......@@ -260,6 +261,7 @@ qmp_configure_smart_network() {
[ "$dev" == "$ddev" ] && {
wan="$wan $dev"
mesh="$mesh $dev"
novlan="$novlan $dev"
continue
}
done
......@@ -278,14 +280,20 @@ qmp_configure_smart_network() {
done
} && continue
# If its not wireless nor a default wan/lan, set it to mesh
# If it's not wireless nor a default wan/lan, set it to mesh
[ "$dev" != "$default_lan" ] && [ "$dev" != "$default_wan" ] && {
inmesh="0"
innovlan="0"
# A small trick to avoid duplicates when $default_xan = "eth1 eth2" (e.g., APUs)
for mdev in $mesh; do
[ "$mdev" == "$dev" ] && inmesh="1"
done
[ "$inmesh" == "0" ] && mesh="$dev $mesh"
for mdev in $novlan; do
[ "$mdev" == "$dev" ] && innovlan="1"
done
[ "$innovlan" == "0" ] && novlan="$dev $novlan"
}
done
......@@ -294,11 +302,13 @@ qmp_configure_smart_network() {
echo "- LAN $lan"
echo "- MESH $mesh"
echo "- WAN $wan"
echo "- NO VLAN $novlan"
# Writes the devices to the config
qmp_uci_set interfaces.lan_devices "$(echo $lan | sed -e s/"^ "//g -e s/" $"//g)"
qmp_uci_set interfaces.mesh_devices "$(echo $mesh | sed -e s/"^ "//g -e s/" $"//g)"
qmp_uci_set interfaces.wan_devices "$(echo $wan | sed -e s/"^ "//g -e s/" $"//g)"
qmp_uci_set interfaces.no_vlan_devices "$(echo $novlan | sed -e s/"^ "//g -e s/" $"//g)"
qmp_uci_set interfaces.ignore_devices "$ignore_devs"
}
......
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