From a53f121fb4d9a21d46f53238593731d9c87c595e Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Fri, 22 Nov 2024 17:52:08 +0100 Subject: [PATCH 01/25] corerouter: use patched version of bird2 and add proper inbound metrics Switch to using a patched version of the BIRD daemon (`bird2-babelpatch`) maintained in our own repository. This version includes modifications to the Babel protocol, allowing route filtering based on specific interfaces and neighbors, while exporting all Babel routes to BIRD's core for enhanced flexibility. Link: https://bird.network.cz/pipermail/bird-users/2023-February/016705.html Link: https://github.com/freifunk-berlin/bbb-configs/pull/1087 --- group_vars/role_corerouter/imageprofile.yml | 2 +- .../templates/corerouter/bird.conf.j2 | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/group_vars/role_corerouter/imageprofile.yml b/group_vars/role_corerouter/imageprofile.yml index 7dad0602c..9be0ee496 100644 --- a/group_vars/role_corerouter/imageprofile.yml +++ b/group_vars/role_corerouter/imageprofile.yml @@ -1,6 +1,6 @@ --- role_corerouter__packages__to_merge: - - bird2 + - bird2-babelpatch - bird2c - collectd-mod-dhcpleases - collectd-mod-olsrd diff --git a/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 b/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 index 2345f259f..664029de0 100644 --- a/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 @@ -27,7 +27,23 @@ protocol babel { ipv6 sadr { table v6_main; # Import only /56 location aggregates and default routes - import where (net.len = 56) || (net = ::/0 from {{ freifunk_global_prefix }} ); + import filter { + if ! (net.len = 56 || net = ::/0 from {{ freifunk_global_prefix }}) then reject; +{% for nw in networks | selectattr('role', 'equalto', 'mesh') %} + {# metrics for 2 GHz adhoc get a penalty over 5 GHz adhoc so 5 GHz is preferred #} + {% set default_mesh_metric = hostvars[inventory_hostname].get('mesh_metric_adhoc_' ~ nw.get('mesh_radio'), mesh_metric_default_in) %} + if ifname = "{{ libnetwork.getIfname(nw) }}" then { + babel_metric = babel_metric + {{ nw.get('mesh_metric', default_mesh_metric) }}; + } +{% endfor %} +{% for nw in networks | selectattr('role', 'equalto', 'tunnel') %} + if ifname = "{{ nw.get('ifname') }}" then { + babel_metric = babel_metric + {{ nw.get('mesh_metric', mesh_metric_tunnel_in) }}; + } +{% endfor %} + accept; + }; + export filter { if net = {{ ipv6_prefix }} from ::/0 then accept; if source = RTS_BABEL then accept; @@ -40,19 +56,15 @@ protocol babel { }; # Mesh interfaces -{# metrics for 2 GHz adhoc get a penalty over 5 GHz adhoc so 5 GHz is preferred #} {% for nw in networks | selectattr('role', 'equalto', 'mesh') %} - {% set default_mesh_metric = hostvars[inventory_hostname].get('mesh_metric_adhoc_' ~ nw.get('mesh_radio'), mesh_metric_default_in) %} interface "{{ libnetwork.getIfname(nw) }}" { type wireless; - rxcost {{ nw.get('mesh_metric', default_mesh_metric) }}; }; {% endfor %} # Tunnel interfaces provided by tunspace {% for nw in networks | selectattr('role', 'equalto', 'tunnel') %} interface "{{ nw.get('ifname') }}" { type wireless; - rxcost {{ nw.get('mesh_metric', mesh_metric_tunnel_in) }}; }; {% endfor %} } From a58668da5eb4a3d29e1a143f30a49bdd15dd1967 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Fri, 22 Nov 2024 18:28:06 +0000 Subject: [PATCH 02/25] metrics: adjustments and removal of unnecessary settings --- locations/bilgi.yml | 2 -- locations/chris.yml | 4 ---- locations/colbe15.yml | 1 - locations/cralle.yml | 3 +-- locations/dragonkiez-adlerhalle.yml | 3 +-- locations/dragonkiez-dorfplatz.yml | 6 ++---- locations/dragonkiez-kiezraum.yml | 3 +-- locations/dragonkiez-rathausblock-miami.yml | 6 ++---- locations/e16outdoor.yml | 3 +-- locations/eberswalder7.yml | 3 +-- locations/elsekiehl.yml | 3 +-- locations/fffw-lebenshilfe.yml | 4 ---- locations/funkigel.yml | 3 +-- locations/gruni73.yml | 3 --- locations/habersaath.yml | 1 - locations/hirschhof.yml | 8 +++----- locations/huette.yml | 3 +-- locations/jup.yml | 4 ++-- locations/k11.yml | 3 +-- locations/k12-h1-h3n.yml | 3 +-- locations/k12-h1.yml | 5 ++--- locations/k12-h2.yml | 10 ++++------ locations/k12-h3-v0s.yml | 3 +-- locations/k12-h3-v2s.yml | 3 +-- locations/k12-h3.yml | 9 +++------ locations/k12-h4.yml | 5 +++-- locations/k9.yml | 5 ++--- locations/kiehl71.yml | 3 +-- locations/kiehlufer.yml | 5 ----- locations/knallt-m42.yml | 3 +-- locations/kotti.yml | 3 +-- locations/kts13.yml | 1 - locations/mahalle.yml | 2 -- locations/mlk-nk.yml | 6 ------ locations/noki.yml | 6 ++---- locations/perle.yml | 1 - locations/rev99.yml | 3 +-- locations/rio.yml | 2 -- locations/scharni.yml | 2 -- locations/segen.yml | 4 ---- locations/spitta13.yml | 1 - locations/tempelwg.yml | 3 +-- locations/vaterhaus.yml | 1 - locations/w38b.yml | 8 +++----- locations/weidenbaum.yml | 3 +-- locations/wilgu10.yml | 1 - locations/zwingli.yml | 5 ----- 47 files changed, 46 insertions(+), 126 deletions(-) diff --git a/locations/bilgi.yml b/locations/bilgi.yml index a08ac86a7..3023cc0b3 100644 --- a/locations/bilgi.yml +++ b/locations/bilgi.yml @@ -32,7 +32,6 @@ networks: mesh_ap: bilgi-core mesh_radio: 11a_standard mesh_iface: mesh - mesh_metric: 1024 - vid: 21 role: mesh @@ -42,7 +41,6 @@ networks: mesh_ap: bilgi-core mesh_radio: 11g_standard mesh_iface: mesh - mesh_metric: 1024 - vid: 40 role: dhcp diff --git a/locations/chris.yml b/locations/chris.yml index 5df4302ad..e8366cbdd 100644 --- a/locations/chris.yml +++ b/locations/chris.yml @@ -105,7 +105,6 @@ networks: name: 11s_n_2ghz prefix: 10.230.18.167/32 ipv6_subprefix: -7 - mesh_metric: 1024 mesh_ap: chris-n-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -115,7 +114,6 @@ networks: name: 11s_o_2ghz prefix: 10.230.18.169/32 ipv6_subprefix: -9 - mesh_metric: 1024 mesh_ap: chris-o-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -125,7 +123,6 @@ networks: name: 11s_s_2ghz prefix: 10.230.18.170/32 ipv6_subprefix: -10 - mesh_metric: 1024 mesh_ap: chris-s-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -135,7 +132,6 @@ networks: name: 11s_w_2ghz prefix: 10.230.18.171/32 ipv6_subprefix: -11 - mesh_metric: 1024 mesh_ap: chris-w-2ghz mesh_radio: 11g_standard mesh_iface: mesh diff --git a/locations/colbe15.yml b/locations/colbe15.yml index 47e3f5c7d..3fce8ab08 100644 --- a/locations/colbe15.yml +++ b/locations/colbe15.yml @@ -28,7 +28,6 @@ networks: name: mesh_scharni prefix: 10.31.52.237/32 ipv6_subprefix: -3 - mesh_metric: 2048 mesh_ap: colbe15-ap1 mesh_radio: 11a_standard mesh_iface: mesh diff --git a/locations/cralle.yml b/locations/cralle.yml index ec2d1df0a..4c266dd62 100644 --- a/locations/cralle.yml +++ b/locations/cralle.yml @@ -65,8 +65,7 @@ networks: name: mesh_2ghz prefix: 10.31.113.89/32 ipv6_subprefix: -2 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: cralle-core mesh_radio: 11g_standard diff --git a/locations/dragonkiez-adlerhalle.yml b/locations/dragonkiez-adlerhalle.yml index 6718d3bdb..d41cee0c9 100644 --- a/locations/dragonkiez-adlerhalle.yml +++ b/locations/dragonkiez-adlerhalle.yml @@ -62,8 +62,7 @@ networks: name: mesh_2ghz prefix: 10.31.23.32/32 ipv6_subprefix: -3 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: dragonkiez-adlerhalle mesh_radio: 11g_standard diff --git a/locations/dragonkiez-dorfplatz.yml b/locations/dragonkiez-dorfplatz.yml index d92aa99e1..94297506a 100644 --- a/locations/dragonkiez-dorfplatz.yml +++ b/locations/dragonkiez-dorfplatz.yml @@ -69,8 +69,7 @@ networks: name: mesh_2ghz prefix: 10.31.28.245/32 ipv6_subprefix: -3 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: dragonkiez-dorfplatz mesh_radio: 11g_standard @@ -92,8 +91,7 @@ networks: name: mesh2_ap1 prefix: 10.31.28.247/32 ipv6_subprefix: -5 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: dragonkiez-dorfplatz-ap1 mesh_radio: 11g_standard diff --git a/locations/dragonkiez-kiezraum.yml b/locations/dragonkiez-kiezraum.yml index da4358fbc..b9305e49d 100644 --- a/locations/dragonkiez-kiezraum.yml +++ b/locations/dragonkiez-kiezraum.yml @@ -68,8 +68,7 @@ networks: name: mesh_2ghz prefix: 10.31.92.242/32 ipv6_subprefix: -3 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: dragonkiez-kiezraum mesh_radio: 11g_standard diff --git a/locations/dragonkiez-rathausblock-miami.yml b/locations/dragonkiez-rathausblock-miami.yml index bf66b9522..d9c546b92 100644 --- a/locations/dragonkiez-rathausblock-miami.yml +++ b/locations/dragonkiez-rathausblock-miami.yml @@ -74,8 +74,7 @@ networks: name: mesh2_ap1 prefix: 10.31.30.25/32 ipv6_subprefix: -3 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: dragonkiez-rathausblock-miami-ap1 mesh_radio: 11g_standard @@ -97,8 +96,7 @@ networks: name: mesh2_ap2 prefix: 10.31.30.27/32 ipv6_subprefix: -5 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: dragonkiez-rathausblock-miami-ap2 mesh_radio: 11g_standard diff --git a/locations/e16outdoor.yml b/locations/e16outdoor.yml index 7dbf12184..4aa48838f 100644 --- a/locations/e16outdoor.yml +++ b/locations/e16outdoor.yml @@ -77,8 +77,7 @@ networks: name: mesh_11s_2ghz prefix: 10.31.142.33/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: e16outdoor-core mesh_radio: 11g_standard diff --git a/locations/eberswalder7.yml b/locations/eberswalder7.yml index 43719ddb2..193a29128 100644 --- a/locations/eberswalder7.yml +++ b/locations/eberswalder7.yml @@ -55,8 +55,7 @@ networks: name: mesh_11s_2g prefix: 10.31.238.210/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: eberswalder7-core mesh_radio: 11g_standard diff --git a/locations/elsekiehl.yml b/locations/elsekiehl.yml index b34ee439c..e22281e4b 100644 --- a/locations/elsekiehl.yml +++ b/locations/elsekiehl.yml @@ -66,8 +66,7 @@ networks: name: mesh_11s_2ghz prefix: 10.31.179.33/32 ipv6_subprefix: -2 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: elsekiehl-core mesh_radio: 11g_standard diff --git a/locations/fffw-lebenshilfe.yml b/locations/fffw-lebenshilfe.yml index 231cf8685..59b87a484 100644 --- a/locations/fffw-lebenshilfe.yml +++ b/locations/fffw-lebenshilfe.yml @@ -56,7 +56,6 @@ networks: name: mesh_nno prefix: 10.30.96.43/32 ipv6_subprefix: -1 - mesh_metric: 1024 mesh_ap: fffw-lebenshilfe-nno-ap-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -66,7 +65,6 @@ networks: name: mesh_nw prefix: 10.30.96.44/32 ipv6_subprefix: -2 - mesh_metric: 1024 mesh_ap: fffw-lebenshilfe-nw-ap-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -76,7 +74,6 @@ networks: name: mesh_sso prefix: 10.30.96.45/32 ipv6_subprefix: -3 - mesh_metric: 1024 mesh_ap: fffw-lebenshilfe-sso-ap-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -86,7 +83,6 @@ networks: name: mesh_ono prefix: 10.30.96.46/32 ipv6_subprefix: -4 - mesh_metric: 1024 mesh_ap: fffw-lebenshilfe-ono-ap-2ghz mesh_radio: 11g_standard mesh_iface: mesh diff --git a/locations/funkigel.yml b/locations/funkigel.yml index 17ce9a0c0..38d82c95a 100644 --- a/locations/funkigel.yml +++ b/locations/funkigel.yml @@ -64,8 +64,7 @@ networks: name: mesh_2g prefix: 10.248.9.210/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2.4 GHz worse than 5 GHz - mesh_metric: 1024 + # make mesh_metric for 2.4 GHz worse than 5 GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: funkigel mesh_radio: 11g_standard diff --git a/locations/gruni73.yml b/locations/gruni73.yml index 2cba1bde4..1ce2bde51 100644 --- a/locations/gruni73.yml +++ b/locations/gruni73.yml @@ -98,7 +98,6 @@ networks: name: mesh_11s_o5 prefix: 10.31.156.40/32 ipv6_subprefix: -6 - mesh_metric: 1024 mesh_ap: gruni73-nf-o-5ghz mesh_radio: 11a_standard mesh_iface: mesh @@ -109,7 +108,6 @@ networks: name: mesh_11s_s5 prefix: 10.31.156.41/32 ipv6_subprefix: -7 - mesh_metric: 1024 mesh_ap: gruni73-nf-s-5ghz mesh_radio: 11a_standard mesh_iface: mesh @@ -120,7 +118,6 @@ networks: name: mesh_11s_w5 prefix: 10.31.156.42/32 ipv6_subprefix: -8 - mesh_metric: 1024 mesh_ap: gruni73-nf-w-5ghz mesh_radio: 11a_standard mesh_iface: mesh diff --git a/locations/habersaath.yml b/locations/habersaath.yml index 8e9d2164c..87763b539 100644 --- a/locations/habersaath.yml +++ b/locations/habersaath.yml @@ -103,7 +103,6 @@ networks: mesh_ap: habersaath-w-nf-5ghz mesh_radio: 11a_standard mesh_iface: mesh - mesh_metric: 1024 mesh_metric_lqm: - default 0.12 # Penalty so local uplink is preferred diff --git a/locations/hirschhof.yml b/locations/hirschhof.yml index 892d0afc4..fc8b7c267 100644 --- a/locations/hirschhof.yml +++ b/locations/hirschhof.yml @@ -32,8 +32,7 @@ networks: name: mesh_5ghz prefix: 10.31.159.128/32 ipv6_subprefix: -20 - # make mesh_metric(s) for 2GHz omni worse than 2GHz directional - mesh_metric: 1024 + # make mesh_metric for 2GHz omni worse than 2GHz directional mesh_metric_lqm: ['default 0.8'] mesh_ap: hirschhof-core mesh_radio: 11a_standard @@ -45,8 +44,7 @@ networks: name: mesh_2ghz prefix: 10.31.159.129/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz omni worse than 5GHz omni - mesh_metric: 2048 + # make mesh_metric for 2GHz omni worse than 5GHz omni mesh_metric_lqm: ['default 0.6'] mesh_ap: hirschhof-core mesh_radio: 11g_standard @@ -58,7 +56,7 @@ networks: name: mesh_k12 prefix: 10.31.159.130/32 ipv6_subprefix: -22 - # adjust mesh_metric(s) to prefer this route + # adjust mesh_metric to prefer this route mesh_metric: 512 mesh_ap: hirschhof-k12 mesh_radio: 11g_standard diff --git a/locations/huette.yml b/locations/huette.yml index b9c79da0d..1cba76c63 100644 --- a/locations/huette.yml +++ b/locations/huette.yml @@ -44,8 +44,7 @@ networks: # name: mesh_11s_2ghz # prefix: 10.31.114.2/32 # ipv6_subprefix: -21 - # # make mesh_metric(s) for 2GHz worse than 5GHz - # mesh_metric: 1024 + # # make mesh_metric for 2GHz worse than 5GHz # mesh_metric_lqm: ['default 0.8'] # mesh_ap: huette-core # mesh_radio: 11g_standard diff --git a/locations/jup.yml b/locations/jup.yml index b1f99351c..5128dd888 100644 --- a/locations/jup.yml +++ b/locations/jup.yml @@ -65,8 +65,8 @@ networks: name: mesh_bht prefix: 10.31.147.128/32 ipv6_subprefix: -1 - mesh_metric: 2048 - mesh_metric_lqm: ['default 0.25'] + mesh_metric: 1024 + mesh_metric_lqm: ['default 0.5'] ptp: true - vid: 11 diff --git a/locations/k11.yml b/locations/k11.yml index c3ca80b2d..c8188299b 100644 --- a/locations/k11.yml +++ b/locations/k11.yml @@ -42,8 +42,7 @@ networks: name: mesh_2ghz prefix: 10.31.185.129/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k11-core mesh_radio: 11g_standard diff --git a/locations/k12-h1-h3n.yml b/locations/k12-h1-h3n.yml index 504636f13..31beceacc 100644 --- a/locations/k12-h1-h3n.yml +++ b/locations/k12-h1-h3n.yml @@ -41,8 +41,7 @@ networks: name: mesh_core_2g prefix: 10.248.19.241/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h1-h3n mesh_radio: 11g_standard diff --git a/locations/k12-h1.yml b/locations/k12-h1.yml index 19faaeaf6..1b54515e1 100644 --- a/locations/k12-h1.yml +++ b/locations/k12-h1.yml @@ -42,8 +42,7 @@ networks: name: mesh_core_2g prefix: 10.31.226.146/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h1-core mesh_radio: 11g_standard @@ -55,7 +54,7 @@ networks: name: mesh_lan prefix: 10.31.226.147/32 ipv6_subprefix: -30 - # adjust mesh_metric(s) to prefer this + # adjust mesh_metric to prefer this mesh_metric: 128 # DHCP with filtering and isolation diff --git a/locations/k12-h2.yml b/locations/k12-h2.yml index 9d52fa8ae..1c4de2ed6 100644 --- a/locations/k12-h2.yml +++ b/locations/k12-h2.yml @@ -71,8 +71,7 @@ networks: name: mesh_core_2g prefix: 10.31.158.130/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h2-core mesh_radio: 11g_standard @@ -94,8 +93,7 @@ networks: name: mesh_h1s_2g prefix: 10.31.158.132/32 ipv6_subprefix: -23 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h2-h1s mesh_radio: 11g_standard @@ -107,7 +105,7 @@ networks: name: mesh_cpe prefix: 10.31.158.133/32 ipv6_subprefix: -24 - # adjust mesh_metric(s) to prefer this route + # adjust mesh_metric to prefer this route mesh_metric: 256 mesh_ap: k12-h2-cpe mesh_radio: 11a_standard @@ -119,7 +117,7 @@ networks: name: mesh_lan prefix: 10.31.226.134/32 ipv6_subprefix: -30 - # adjust mesh_metric(s) to prefer this route + # adjust mesh_metric to prefer this route mesh_metric: 128 # DHCP diff --git a/locations/k12-h3-v0s.yml b/locations/k12-h3-v0s.yml index f846a406e..364544fc4 100644 --- a/locations/k12-h3-v0s.yml +++ b/locations/k12-h3-v0s.yml @@ -42,8 +42,7 @@ networks: name: mesh_core_2g prefix: 10.31.227.145/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h3-v0s mesh_radio: 11g_standard diff --git a/locations/k12-h3-v2s.yml b/locations/k12-h3-v2s.yml index 6d1c50b09..5948793ce 100644 --- a/locations/k12-h3-v2s.yml +++ b/locations/k12-h3-v2s.yml @@ -42,8 +42,7 @@ networks: name: mesh_core_2g prefix: 10.248.19.145/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h3-v2s mesh_radio: 11g_standard diff --git a/locations/k12-h3.yml b/locations/k12-h3.yml index 107049022..0cbac503b 100644 --- a/locations/k12-h3.yml +++ b/locations/k12-h3.yml @@ -48,8 +48,7 @@ networks: name: mesh_core_2g prefix: 10.31.226.210/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h3-core mesh_radio: 11g_standard @@ -71,8 +70,7 @@ networks: name: mesh_h3n_2g prefix: 10.31.226.212/32 ipv6_subprefix: -23 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h3-h3n mesh_radio: 11g_standard @@ -94,8 +92,7 @@ networks: # name: mesh_v2s_2g # prefix: 10.31.226.214/32 # ipv6_subprefix: -25 - # # make mesh_metric(s) for 2GHz worse than 5GHz - # mesh_metric: 1024 + # # make mesh_metric for 2GHz worse than 5GHz # mesh_metric_lqm: ['default 0.8'] # mesh_ap: k12-h3-v2s # mesh_radio: 11g_standard diff --git a/locations/k12-h4.yml b/locations/k12-h4.yml index 2fbca322c..ef42c1535 100644 --- a/locations/k12-h4.yml +++ b/locations/k12-h4.yml @@ -63,6 +63,8 @@ networks: name: mesh_hirsch prefix: 10.31.157.162/32 ipv6_subprefix: -22 + # prefer this link towards Hirschhof + mesh_metric: 512 mesh_ap: k12-h4-hirschhof mesh_radio: 11g_standard mesh_iface: mesh @@ -83,8 +85,7 @@ networks: name: mesh_h0s_2g prefix: 10.31.157.164/32 ipv6_subprefix: -24 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: k12-h4-h0s mesh_radio: 11g_standard diff --git a/locations/k9.yml b/locations/k9.yml index 5026aabf0..e2c5624f1 100644 --- a/locations/k9.yml +++ b/locations/k9.yml @@ -72,7 +72,7 @@ networks: name: mesh_k9int prefix: 10.31.9.240/28 ipv6_subprefix: -20 - mesh_metric: 64 + mesh_metric: 128 mesh_metric_lqm: ['default 0.2'] # Ignore Uplink one Hop away / requires 0.2 LQM assignments: @@ -94,8 +94,7 @@ networks: name: mesh_2g prefix: 10.31.9.228/32 ipv6_subprefix: -22 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: k9-core mesh_radio: 11g_standard diff --git a/locations/kiehl71.yml b/locations/kiehl71.yml index d2a0e97c0..920ea2424 100644 --- a/locations/kiehl71.yml +++ b/locations/kiehl71.yml @@ -66,8 +66,7 @@ networks: name: mesh_11s_2ghz prefix: 10.31.178.225/32 ipv6_subprefix: -2 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: kiehl71-core mesh_radio: 11g_standard diff --git a/locations/kiehlufer.yml b/locations/kiehlufer.yml index e66f1117a..b92e82b9c 100644 --- a/locations/kiehlufer.yml +++ b/locations/kiehlufer.yml @@ -120,7 +120,6 @@ networks: name: mesh_nf_wbp1 prefix: 10.31.151.115/32 ipv6_subprefix: -4 - mesh_metric: 2048 mesh_ap: kiehlufer-nf-wbp1 mesh_radio: 11a_standard mesh_iface: mesh @@ -129,7 +128,6 @@ networks: name: mesh_nf_wbp2 prefix: 10.31.151.116/32 ipv6_subprefix: -5 - mesh_metric: 2048 mesh_ap: kiehlufer-nf-wbp2 mesh_radio: 11a_standard mesh_iface: mesh @@ -138,7 +136,6 @@ networks: name: mesh_nf_wbp3 prefix: 10.31.151.117/32 ipv6_subprefix: -6 - mesh_metric: 2048 mesh_ap: kiehlufer-nf-wbp3 mesh_radio: 11a_standard mesh_iface: mesh @@ -148,7 +145,6 @@ networks: name: mesh_huet_5g prefix: 10.31.151.118/32 ipv6_subprefix: -7 - mesh_metric: 2048 mesh_ap: kiehlufer-huette mesh_radio: 11a_standard mesh_iface: mesh @@ -157,7 +153,6 @@ networks: name: mesh_nf_wbp4 prefix: 10.31.151.119/32 ipv6_subprefix: -8 - mesh_metric: 2048 mesh_ap: kiehlufer-nf-wbp4 mesh_radio: 11a_standard mesh_iface: mesh diff --git a/locations/knallt-m42.yml b/locations/knallt-m42.yml index 70f214058..bb95d2761 100644 --- a/locations/knallt-m42.yml +++ b/locations/knallt-m42.yml @@ -50,8 +50,7 @@ networks: name: mesh_2ghz prefix: 10.248.0.99/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: knallt-m42-core mesh_radio: 11g_standard diff --git a/locations/kotti.yml b/locations/kotti.yml index 445f3082c..317b6afef 100644 --- a/locations/kotti.yml +++ b/locations/kotti.yml @@ -52,8 +52,7 @@ networks: name: mesh_2g prefix: 10.31.167.218/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: kotti-core mesh_radio: 11g_standard diff --git a/locations/kts13.yml b/locations/kts13.yml index 11780a07e..7eb8c1614 100644 --- a/locations/kts13.yml +++ b/locations/kts13.yml @@ -43,7 +43,6 @@ networks: name: mesh_ap1 prefix: '10.31.166.194/32' ipv6_subprefix: -2 - mesh_metric: 1024 mesh_ap: kts13-ap1 mesh_radio: 11a_standard mesh_iface: mesh diff --git a/locations/mahalle.yml b/locations/mahalle.yml index cab88bb2b..71aa00af7 100644 --- a/locations/mahalle.yml +++ b/locations/mahalle.yml @@ -42,7 +42,6 @@ networks: mesh_ap: mahalle-nf-w mesh_radio: 11a_standard mesh_iface: mesh - mesh_metric: 1024 - vid: 21 role: mesh @@ -52,7 +51,6 @@ networks: mesh_ap: mahalle-nf-o mesh_radio: 11a_standard mesh_iface: mesh - mesh_metric: 1024 - vid: 40 role: dhcp diff --git a/locations/mlk-nk.yml b/locations/mlk-nk.yml index 75cc7bc3b..c74e4ab84 100644 --- a/locations/mlk-nk.yml +++ b/locations/mlk-nk.yml @@ -53,9 +53,7 @@ networks: name: mesh_nno_5 prefix: 10.31.69.33/32 ipv6_subprefix: -11 - mesh_metric: 1024 mesh_metric_lqm: ['default 0.6'] - ptp: true # Nanostation M5 - Airos 6 - Orientation Sonnenallee - vid: 12 @@ -63,9 +61,7 @@ networks: name: mesh_so_5 prefix: 10.31.69.34/32 ipv6_subprefix: -12 - mesh_metric: 1024 mesh_metric_lqm: ['default 0.7'] - ptp: true # 802.11s mesh links (VID 20-29) # 802.11s mesh nf - SXTsq5ac - Orientation Rhnk @@ -84,7 +80,6 @@ networks: name: mesh_nf_wbp2 prefix: 10.31.69.36/32 ipv6_subprefix: -21 - mesh_metric: 2048 mesh_ap: mlk-nk-nf-wbp2 mesh_radio: 11g_standard mesh_iface: mesh @@ -95,7 +90,6 @@ networks: name: mesh_nf_wbp3 prefix: 10.31.69.37/32 ipv6_subprefix: -22 - mesh_metric: 2048 mesh_ap: mlk-nk-nf-wbp3 mesh_radio: 11g_standard mesh_iface: mesh diff --git a/locations/noki.yml b/locations/noki.yml index 2bca0d26b..e53b23681 100644 --- a/locations/noki.yml +++ b/locations/noki.yml @@ -77,8 +77,7 @@ networks: name: mesh_2g_core prefix: 10.31.215.35/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: noki-core mesh_radio: 11g_standard @@ -100,8 +99,7 @@ networks: name: mesh_2g_ap prefix: 10.31.215.37/32 ipv6_subprefix: -23 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: noki-ap mesh_radio: 11g_standard diff --git a/locations/perle.yml b/locations/perle.yml index c04daa9ab..aa0c03e7f 100644 --- a/locations/perle.yml +++ b/locations/perle.yml @@ -58,7 +58,6 @@ networks: name: mesh_2g prefix: 10.31.205.138/32 ipv6_subprefix: -21 - mesh_metric: 1024 mesh_metric_lqm: ['default 0.5'] mesh_ap: perle-core mesh_radio: 11g_standard diff --git a/locations/rev99.yml b/locations/rev99.yml index ae02ce6ca..b790eb12a 100644 --- a/locations/rev99.yml +++ b/locations/rev99.yml @@ -52,8 +52,7 @@ networks: name: mesh_2g prefix: 10.31.214.138/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: rev99-core mesh_radio: 11g_standard diff --git a/locations/rio.yml b/locations/rio.yml index c1a77658d..9dab57dbb 100644 --- a/locations/rio.yml +++ b/locations/rio.yml @@ -64,7 +64,6 @@ networks: name: mesh_rio prefix: 10.31.134.18/32 ipv6_subprefix: -3 - mesh_metric: 2048 mesh_ap: rio-sxt mesh_radio: 11a_standard mesh_iface: mesh @@ -74,7 +73,6 @@ networks: name: mesh_ubnt prefix: 10.31.134.19/32 ipv6_subprefix: -4 - mesh_metric: 2048 mesh_ap: rio-ubnt mesh_radio: 11a_standard mesh_iface: mesh diff --git a/locations/scharni.yml b/locations/scharni.yml index 5744e5bda..935274a8d 100644 --- a/locations/scharni.yml +++ b/locations/scharni.yml @@ -65,7 +65,6 @@ networks: name: mesh_zwingli prefix: 10.31.252.193/32 ipv6_subprefix: -3 - mesh_metric: 512 ptp: true - vid: 20 @@ -73,7 +72,6 @@ networks: name: mesh_ap3 prefix: 10.31.252.194/32 ipv6_subprefix: -4 - mesh_metric: 2048 mesh_ap: scharni-ap3 mesh_radio: 11a_standard mesh_iface: mesh diff --git a/locations/segen.yml b/locations/segen.yml index 54c933f49..0df52d69b 100644 --- a/locations/segen.yml +++ b/locations/segen.yml @@ -223,7 +223,6 @@ networks: name: mesh_11s_n2 prefix: 10.31.6.72/32 ipv6_subprefix: -9 - mesh_metric: 2048 mesh_metric_lqm: ['default 0.4'] mesh_ap: segen-n-nf-2ghz mesh_radio: 11g_standard @@ -234,7 +233,6 @@ networks: name: mesh_11s_o2 prefix: 10.31.6.73/32 ipv6_subprefix: -10 - mesh_metric: 2048 mesh_metric_lqm: ['default 0.4'] mesh_ap: segen-o-nf-2ghz mesh_radio: 11g_standard @@ -245,7 +243,6 @@ networks: name: mesh_11s_s2 prefix: 10.31.6.74/32 ipv6_subprefix: -11 - mesh_metric: 2048 mesh_metric_lqm: ['default 0.4'] mesh_ap: segen-s-nf-2ghz mesh_radio: 11g_standard @@ -256,7 +253,6 @@ networks: name: mesh_11s_w2 prefix: 10.31.6.75/32 ipv6_subprefix: -12 - mesh_metric: 2048 mesh_metric_lqm: ['default 0.4'] mesh_ap: segen-w-nf-2ghz mesh_radio: 11g_standard diff --git a/locations/spitta13.yml b/locations/spitta13.yml index 98fc4fb26..2d7c6a2d5 100644 --- a/locations/spitta13.yml +++ b/locations/spitta13.yml @@ -88,7 +88,6 @@ networks: mesh_radio: 11g_standard mesh_iface: mesh mesh_metric_lqm: ['default 0.3'] # prefer 5 GHz mesh - mesh_metric: 1024 - vid: 21 role: mesh diff --git a/locations/tempelwg.yml b/locations/tempelwg.yml index bfbc6f16b..a3c6a8dd4 100644 --- a/locations/tempelwg.yml +++ b/locations/tempelwg.yml @@ -46,8 +46,7 @@ networks: name: mesh_2g prefix: 10.248.17.17/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.8'] mesh_ap: tempelwg-core mesh_radio: 11g_standard diff --git a/locations/vaterhaus.yml b/locations/vaterhaus.yml index 50dba6181..9f7811759 100644 --- a/locations/vaterhaus.yml +++ b/locations/vaterhaus.yml @@ -137,7 +137,6 @@ networks: name: mesh_11s_no prefix: 10.230.192.230/32 ipv6_subprefix: -7 - mesh_metric: 2048 mesh_ap: vaterhaus-n-nf-2ghz mesh_radio: 11g_standard mesh_iface: mesh diff --git a/locations/w38b.yml b/locations/w38b.yml index faff51161..3b90c223d 100644 --- a/locations/w38b.yml +++ b/locations/w38b.yml @@ -79,8 +79,7 @@ networks: name: mesh_2g prefix: 10.31.212.36/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: w38b-core mesh_radio: 11g_standard @@ -102,8 +101,7 @@ networks: name: mesh_ap1_2g prefix: 10.31.212.38/32 ipv6_subprefix: -23 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: w38b-ap1 mesh_radio: 11g_standard @@ -116,7 +114,7 @@ networks: prefix: 10.31.212.39/32 ipv6_subprefix: -30 # adjust mesh_metric(s) to prefer other links - mesh_metric: 2048 + mesh_metric: 4096 mesh_metric_lqm: ['default 0.25'] # DHCP with filtering and isolation diff --git a/locations/weidenbaum.yml b/locations/weidenbaum.yml index e7a9df17f..42d9f790a 100644 --- a/locations/weidenbaum.yml +++ b/locations/weidenbaum.yml @@ -54,8 +54,7 @@ networks: name: mesh_2g prefix: 10.31.204.148/32 ipv6_subprefix: -21 - # make mesh_metric(s) for 2GHz worse than 5GHz - mesh_metric: 1024 + # make mesh_metric for 2GHz worse than 5GHz mesh_metric_lqm: ['default 0.5'] mesh_ap: weidenbaum-core mesh_radio: 11g_standard diff --git a/locations/wilgu10.yml b/locations/wilgu10.yml index d3f9643fd..7c7a5b31a 100644 --- a/locations/wilgu10.yml +++ b/locations/wilgu10.yml @@ -72,7 +72,6 @@ networks: name: mesh_east_2g prefix: 10.230.210.106/32 ipv6_subprefix: -3 - mesh_metric: 2048 mesh_ap: wilgu10-east-nf-2ghz mesh_radio: 11g_standard mesh_iface: mesh diff --git a/locations/zwingli.yml b/locations/zwingli.yml index 4c4831b5f..7f295db30 100644 --- a/locations/zwingli.yml +++ b/locations/zwingli.yml @@ -193,7 +193,6 @@ networks: name: mesh_11s_o2 prefix: 10.31.115.42/32 ipv6_subprefix: -11 - mesh_metric: 1024 mesh_ap: zwingli-ost-nf-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -205,7 +204,6 @@ networks: name: mesh_11s_w2 prefix: 10.31.115.44/32 ipv6_subprefix: -13 - mesh_metric: 1024 mesh_ap: zwingli-west-nf-2ghz mesh_radio: 11g_standard mesh_iface: mesh @@ -219,7 +217,6 @@ networks: name: mesh_11s_n5 prefix: 10.31.115.45/32 ipv6_subprefix: -14 - mesh_metric: 1024 mesh_ap: zwingli-nord-nf-5ghz mesh_radio: 11a_standard mesh_iface: mesh @@ -231,7 +228,6 @@ networks: name: mesh_11s_o5 prefix: 10.31.115.46/32 ipv6_subprefix: -15 - mesh_metric: 1024 mesh_ap: zwingli-ost-nf-5ghz mesh_radio: 11a_standard mesh_iface: mesh @@ -243,7 +239,6 @@ networks: name: mesh_11s_w5 prefix: 10.31.115.48/32 ipv6_subprefix: -17 - mesh_metric: 1024 mesh_ap: zwingli-west-nf-5ghz mesh_radio: 11a_standard mesh_iface: mesh From 87724718d7dc3a17b5c77180b47aa1e9662c0075 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Mon, 25 Nov 2024 13:41:52 +0000 Subject: [PATCH 03/25] w38b: next try to fix olsr route flapping --- locations/w38b.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locations/w38b.yml b/locations/w38b.yml index 3b90c223d..ad3fde4c3 100644 --- a/locations/w38b.yml +++ b/locations/w38b.yml @@ -52,7 +52,7 @@ networks: ptp: true # prefer routing via RHNK over SAMA mesh_metric: 256 - mesh_metric_lqm: ['default 0.8'] + mesh_metric_lqm: ['default 0.5'] # MESH - RHNK - vid: 11 From c904a5315c405d794ed767a97731597cd2f6c561 Mon Sep 17 00:00:00 2001 From: Tom Jannek Date: Mon, 25 Nov 2024 19:46:31 +0100 Subject: [PATCH 04/25] readme: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e44312b34..3e8b03620 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The image compilation takes the variables defined by the hosts and location file e.g. some drivers expect network config concerning the distributed switching architecture, and some use the legacy sw-config format. Based on the predefined roles, core-router, access point, and gateway, a customized set of tasks are executed. The last step is to download the correct OpenWrt-Imagebuilder for the host and give it all generated config files. The Imagebuilder generates a binary image embedded with the customized config for this one host in the particular location. Flashing this image to a router will set the router after boot directly in the correct operating state. Further, this router will not be able to lose any of its configurations since it is embedded into its image. -If we need someone to reproduce our setup, the person can just generate the image for the involved routers, aka hosts, and provision them. Everyone can reproduce our setup and can work with us on our configurations from all other the world. In the future, it may be possible to abstract the actual router hardware with QEMU opening new interesting use cases. +If we need someone to reproduce our setup, the person can just generate the image for the involved routers, aka hosts, and provision them. Everyone can reproduce our setup and can work with us on our configurations from all over the world. In the future, it may be possible to abstract the actual router hardware with QEMU opening new interesting use cases. ## Developers and Maintainers From 3afa3e4e7d0bb500256f14e23cf1936fe5457e01 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Wed, 27 Nov 2024 06:27:52 +0000 Subject: [PATCH 05/25] zwingli: further adjust metric to avoid sama link --- locations/zwingli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locations/zwingli.yml b/locations/zwingli.yml index 7f295db30..be80ec709 100644 --- a/locations/zwingli.yml +++ b/locations/zwingli.yml @@ -159,7 +159,7 @@ networks: ipv6_subprefix: -5 # prefer routing via emma over sama to use ohlauer as gateway) mesh_metric: 256 - mesh_metric_lqm: ['default 0.8'] + mesh_metric_lqm: ['default 0.5'] ptp: true - vid: 16 From 96e4ad91b835ced1d27a04869a174686e86b1c9a Mon Sep 17 00:00:00 2001 From: Packet Please Date: Wed, 27 Nov 2024 12:52:25 +0100 Subject: [PATCH 06/25] treewide: switch debugged hosts from snapshot to 24.10 --- locations/huette.yml | 2 +- locations/hway.yml | 2 +- locations/kiehlufer.yml | 4 ++-- locations/kub.yml | 2 +- locations/suedblock.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/locations/huette.yml b/locations/huette.yml index 1cba76c63..be0240102 100644 --- a/locations/huette.yml +++ b/locations/huette.yml @@ -16,7 +16,7 @@ hosts: role: corerouter model: "zyxel_nwa55axe" wireless_profile: freifunk_default - openwrt_version: snapshot + openwrt_version: 24.10-SNAPSHOT log_size: 1024 ipv6_prefix: '2001:bf7:830:2600::/56' diff --git a/locations/hway.yml b/locations/hway.yml index 3f773145b..4900fe4e6 100644 --- a/locations/hway.yml +++ b/locations/hway.yml @@ -39,7 +39,7 @@ hosts: role: ap wireless_profile: hway model: zyxel_nwa50ax - openwrt_version: snapshot + openwrt_version: 24.10-SNAPSHOT log_size: 1024 snmp_devices: diff --git a/locations/kiehlufer.yml b/locations/kiehlufer.yml index b92e82b9c..fe066294b 100644 --- a/locations/kiehlufer.yml +++ b/locations/kiehlufer.yml @@ -30,14 +30,14 @@ hosts: role: corerouter model: "cudy_x6-v1" wireless_profile: freifunk_default - openwrt_version: snapshot + openwrt_version: 24.10-SNAPSHOT log_size: 1024 - hostname: kiehlufer-huette role: ap model: "zyxel_nwa55axe" wireless_profile: kiehlufer5g - openwrt_version: snapshot + openwrt_version: 24.10-SNAPSHOT log_size: 1024 - hostname: kiehlufer-nf-wbp1 diff --git a/locations/kub.yml b/locations/kub.yml index 2b4c9b2a0..955651f1a 100644 --- a/locations/kub.yml +++ b/locations/kub.yml @@ -17,7 +17,7 @@ hosts: - hostname: kub-ap1 role: ap model: "cudy_x6-v1" - openwrt_version: snapshot + openwrt_version: 24.10-SNAPSHOT log_size: 1024 snmp_devices: diff --git a/locations/suedblock.yml b/locations/suedblock.yml index ed0ae61ee..eaae4c0a0 100644 --- a/locations/suedblock.yml +++ b/locations/suedblock.yml @@ -19,7 +19,7 @@ hosts: model: "cudy_x6-v1" wireless_profile: freifunk_default dhcp_no_ping: false - openwrt_version: snapshot + openwrt_version: 24.10-SNAPSHOT log_size: 1024 # 10.248.13.0/24 From cbc3c65a15b61e39cd38d3d517062cd92ddabf18 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Fri, 29 Nov 2024 12:31:46 +0000 Subject: [PATCH 07/25] workflows: add ipv6_subprefix duplicate check --- .github/checks/check-duplicates.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/checks/check-duplicates.sh b/.github/checks/check-duplicates.sh index 3c00edccc..358c27c4a 100755 --- a/.github/checks/check-duplicates.sh +++ b/.github/checks/check-duplicates.sh @@ -68,6 +68,9 @@ for file in $location_files; do # Check for name duplicates within networks check_duplicates 'select(.networks != null) | .networks[] | select(.name != null) | .name' "name within networks" "$file" + # Check for ipv6_subprefix duplicates within networks + check_duplicates 'select(.networks != null) | .networks[] | select(.ipv6_subprefix != null) | .ipv6_subprefix' "ipv6_subprefix within networks" "$file" + done # Exit with a non-zero status code if any errors were found From 01976425463a2a30184510b9cf747540e5def0f9 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Fri, 29 Nov 2024 12:33:47 +0000 Subject: [PATCH 08/25] w38b: fix ipv6_subprefix duplicate --- locations/w38b.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locations/w38b.yml b/locations/w38b.yml index ad3fde4c3..f986b9f13 100644 --- a/locations/w38b.yml +++ b/locations/w38b.yml @@ -158,7 +158,7 @@ networks: name: private_2 inbound_filtering: true prefix: 10.31.212.112/28 - ipv6_subprefix: 3 + ipv6_subprefix: 4 assignments: w38b-core: 1 # 10.31.212.113 w38b-ds: 2 # 10.31.212.114 From 1933d57466e9a8c8d15620a88710c3ed53c52ab5 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Sat, 30 Nov 2024 07:16:03 +0000 Subject: [PATCH 09/25] bht, jup: fix routing This fixes the routing in the triangle bht<->jup<->segen and also assures that bht routes via perleberger36->strom instead of using segen->saarbruecker or chris/mela->teufelsberg->ak36. --- locations/bht.yml | 7 +++++++ locations/jup.yml | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/locations/bht.yml b/locations/bht.yml index 48d2d7f86..88c6a382e 100644 --- a/locations/bht.yml +++ b/locations/bht.yml @@ -140,6 +140,7 @@ networks: prefix: 10.230.23.128/32 ipv6_subprefix: -10 ptp: true + # Prefer routing via perleberger36 over segen mesh_metric: 1024 mesh_metric_lqm: ['default 0.2'] @@ -149,6 +150,9 @@ networks: prefix: 10.230.23.129/32 ipv6_subprefix: -11 ptp: true + # Prefer routing via perleberger36 over segen, chris, mela + mesh_metric: 256 + - vid: 12 role: mesh @@ -173,6 +177,9 @@ networks: name: mesh_jup prefix: 10.230.23.133/32 ipv6_subprefix: -15 + # Set metrics similar as for mesh_segen so path via jup is always worse + mesh_metric: 1024 + mesh_metric_lqm: ['default 0.25'] - vid: 16 role: mesh diff --git a/locations/jup.yml b/locations/jup.yml index 5128dd888..1f35a080d 100644 --- a/locations/jup.yml +++ b/locations/jup.yml @@ -65,8 +65,6 @@ networks: name: mesh_bht prefix: 10.31.147.128/32 ipv6_subprefix: -1 - mesh_metric: 1024 - mesh_metric_lqm: ['default 0.5'] ptp: true - vid: 11 From ce95e916f41189cc588f447ef86e6565b34d688f Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Sat, 30 Nov 2024 09:29:38 +0000 Subject: [PATCH 10/25] k12: fix mesh ips and metrics for backup uplink --- locations/k12-h2.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/locations/k12-h2.yml b/locations/k12-h2.yml index 1c4de2ed6..5c8485833 100644 --- a/locations/k12-h2.yml +++ b/locations/k12-h2.yml @@ -59,7 +59,7 @@ networks: - vid: 20 role: mesh name: mesh_core_5g - prefix: 10.31.158.1129/32 + prefix: 10.31.158.129/32 ipv6_subprefix: -20 mesh_ap: k12-h2-core mesh_radio: 11a_standard @@ -115,7 +115,7 @@ networks: - vid: 30 role: mesh name: mesh_lan - prefix: 10.31.226.134/32 + prefix: 10.31.158.134/32 ipv6_subprefix: -30 # adjust mesh_metric to prefer this route mesh_metric: 128 @@ -155,12 +155,18 @@ networks: mtu: 1280 prefix: 10.31.158.224/32 wireguard_port: 51820 + # Make sure tunnel is only last resort backup + mesh_metric: 2304 + mesh_metric_lqm: ['default 0.6'] - role: tunnel ifname: ts_wg1 mtu: 1280 prefix: 10.31.158.225/32 wireguard_port: 51821 + # Make sure tunnel is only last resort backup + mesh_metric: 2304 + mesh_metric_lqm: ['default 0.6'] # AP-id, wifi-channel, bandwidth, txpower location__channel_assignments_11a_standard__to_merge: @@ -186,3 +192,13 @@ dns_servers: - 1.0.0.1 - 2606:4700:4700::1111 - 2606:4700:4700::1001 + +# Switch Ports +# 1: uplink +# 2: AP +# 3: +# 4: CORE +# 5: AP +# 6: AP +# 7: k12-h1-core, VLAN 30 +# 8: segen From fa01e9b4cad3f43db55da485a811322d35f94546 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Fri, 29 Nov 2024 13:38:37 +0100 Subject: [PATCH 11/25] gateways: switch to patched bird2. change metrics: - Use bird2-babelpatch (See a53f121fb4d9a21d46f53238593731d9c87c595e) - Switch Mesh Interfaces to inbound metrics - Use inbound and outbound metric for wireguard tunnels - Leave GRE unchanged --- group_vars/role_gateway/imageprofile.yml | 2 +- .../templates/gateway/bird.conf.j2 | 20 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/group_vars/role_gateway/imageprofile.yml b/group_vars/role_gateway/imageprofile.yml index 5a8b5903b..4d513f708 100644 --- a/group_vars/role_gateway/imageprofile.yml +++ b/group_vars/role_gateway/imageprofile.yml @@ -23,7 +23,7 @@ role_uplink_gw__packages__to_merge: - luci-app-falter-owm-gui - iptables-mod-ipopt - kmod-ipt-ipopt - - bird2 + - bird2-babelpatch - bird2c - ip-full - gre diff --git a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 index e1ccf29d1..ac31fd204 100644 --- a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 @@ -78,7 +78,20 @@ protocol babel babel_mesh { ipv6 sadr { table v6_main; # Import only /56 location aggregates and default routes - import where net.len = 56 || net = {{ V6_SADR_DEFAULT_ROUTE }}; + import filter { + if ! (net.len = 56 || net = {{ V6_SADR_DEFAULT_ROUTE }}) then reject; +{% for interface in mesh_links %} + if ifname = "{{ interface['ifname'] }}" then { + babel_metric = babel_metric + {{ interface.get('mesh_metric', mesh_metric_default_in) }}; + accept; + } +{% endfor %} + if ifname ~ "wg_*" then { + babel_metric = babel_metric + {{ mesh_metric_tunnel_in }}; + accept; + } + accept; + }; export where source = RTS_BABEL || net = {{ ipv6_prefix }} from ::/0 || net = {{ V6_SADR_DEFAULT_ROUTE }}; }; ipv4 { @@ -91,7 +104,6 @@ protocol babel babel_mesh { {% for interface in mesh_links %} interface "{{ interface['ifname'] }}" { type wireless; - rxcost {{ interface.get('mesh_metric', mesh_metric_default_in) }}; }; {% endfor %} @@ -99,14 +111,14 @@ protocol babel babel_mesh { {% for gateway in groups['role_gateway'] | difference([inventory_hostname]) | sort %} interface "gre4-{{ hostvars[gateway]['gre_tunnel_alias'] }}" { type wireless; - rxcost {{ gre_metric }}; + rxcost {{ gre_metric }}; # Keep for now, could be implemented as export filter later }; {% endfor %} # Wireguard tunnel links which are dynamically established interface "wg_*" { type wireless; - rxcost {{ mesh_metric_tunnel_in }}; + rxcost {{ mesh_metric_tunnel_in }}; # Keep for now, could be implemented as export filter later }; } From 25e6b72105e5328a02b9cd87a5ec0aa10a75d920 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Fri, 29 Nov 2024 13:47:49 +0100 Subject: [PATCH 12/25] gateway: fix BGP bypass in firewall --- roles/cfg_openwrt/templates/gateway/config/firewall.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/cfg_openwrt/templates/gateway/config/firewall.j2 b/roles/cfg_openwrt/templates/gateway/config/firewall.j2 index 413188ab8..41d4ec7bc 100644 --- a/roles/cfg_openwrt/templates/gateway/config/firewall.j2 +++ b/roles/cfg_openwrt/templates/gateway/config/firewall.j2 @@ -66,7 +66,9 @@ config rule option src uplink option src_ip '{{ uplink['ipv6'] | ansible.utils.ipaddr('peer') }}' option proto tcp - option dest_port 179 +# Dont match on destination Port +# BGP Session is not always initiated by ourselves +# option dest_port 179 option target ACCEPT {% endif %} From 6c382d6802035c69605e6f37f44199521132d9eb Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Sun, 1 Dec 2024 15:01:23 +0100 Subject: [PATCH 13/25] gateway: match gre rxcost with default RX cost, to prefer mesh for similar Cost --- group_vars/role_gateway/general.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/role_gateway/general.yml b/group_vars/role_gateway/general.yml index 40df4d703..71eee2222 100644 --- a/group_vars/role_gateway/general.yml +++ b/group_vars/role_gateway/general.yml @@ -37,7 +37,7 @@ wireguard_wg_pub: '/etc/wireguard/wg.pub' # If it is set wireguard_wg_key and wireguard_wg_pub are not used. wireguard_wg_tmp_key: false -gre_metric: 64 +gre_metric: 256 # Match default RX Cost ## FIREWALL SECTION From fd23b6c14962a41bd59cbf63838d59b48ce44333 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Sun, 1 Dec 2024 15:04:34 +0100 Subject: [PATCH 14/25] gw/wireguard: increase Tunnel cost to 1024*3 to prefer bbb This is subject to change, and probably needs some overhaul in regards of a general concept. But for now this change will increase the reliability of our BBB Core network --- group_vars/all/general.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/group_vars/all/general.yml b/group_vars/all/general.yml index eb54748b7..9a62918e2 100644 --- a/group_vars/all/general.yml +++ b/group_vars/all/general.yml @@ -50,8 +50,8 @@ freifunk_global_prefix: 2001:bf7::/32 # Default mesh metric in inbound direction (rxcost) for normal mesh links mesh_metric_default_in: 512 -# Default mesh metric in inbound direction (rxcost) for tunnels -mesh_metric_tunnel_in: 1024 +# Default mesh metric in all directions for tunnels +mesh_metric_tunnel_in: 3072 # Default mesh metrics in inbound direction (rxcost) for adhoc like interfaces mesh_metric_adhoc_11a_standard: 2024 From c81262388d34d0009e5022fb70226fbee5f58e08 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Mon, 2 Dec 2024 08:29:10 +0000 Subject: [PATCH 15/25] k12: remove metric lower than default --- locations/k12-h2.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/locations/k12-h2.yml b/locations/k12-h2.yml index 5c8485833..09c3d5600 100644 --- a/locations/k12-h2.yml +++ b/locations/k12-h2.yml @@ -156,7 +156,6 @@ networks: prefix: 10.31.158.224/32 wireguard_port: 51820 # Make sure tunnel is only last resort backup - mesh_metric: 2304 mesh_metric_lqm: ['default 0.6'] - role: tunnel @@ -165,7 +164,6 @@ networks: prefix: 10.31.158.225/32 wireguard_port: 51821 # Make sure tunnel is only last resort backup - mesh_metric: 2304 mesh_metric_lqm: ['default 0.6'] # AP-id, wifi-channel, bandwidth, txpower From e35b3d5e488ef007bb9f2185fae669d4a06bfb38 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Tue, 3 Dec 2024 07:28:41 +0000 Subject: [PATCH 16/25] bht, mela: adjust routing metrics --- locations/bht.yml | 4 +++- locations/mela.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/locations/bht.yml b/locations/bht.yml index 88c6a382e..680007107 100644 --- a/locations/bht.yml +++ b/locations/bht.yml @@ -150,7 +150,7 @@ networks: prefix: 10.230.23.129/32 ipv6_subprefix: -11 ptp: true - # Prefer routing via perleberger36 over segen, chris, mela + # Prefer routing via perleberger36 over segen, chris, mela, weidenbaum mesh_metric: 256 @@ -204,6 +204,8 @@ networks: name: mesh_west prefix: 10.230.23.137/32 ipv6_subprefix: -19 + # Prefer routing via perleberger36 over chris, mela, weidenbaum + mesh_metric: 1024 - vid: 40 role: dhcp diff --git a/locations/mela.yml b/locations/mela.yml index 0b02a4a30..b39e22e39 100644 --- a/locations/mela.yml +++ b/locations/mela.yml @@ -83,6 +83,8 @@ networks: name: mesh_ono prefix: 10.36.70.35/32 ipv6_subprefix: -12 + # ensure this link is only used as backup + mesh_metric: 2048 # 802.11s Mesh - vid: 20 From 18f487310e0f3fc01a2b173f4921ca5745216de1 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Mon, 2 Dec 2024 22:25:04 +0100 Subject: [PATCH 17/25] gateway: announce IPv4 default route into babel --- roles/cfg_openwrt/templates/gateway/bird.conf.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 index ac31fd204..7764bccbe 100644 --- a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 @@ -32,9 +32,10 @@ protocol kernel kernel_v6_main { protocol kernel kernel_v4_main { ipv4 { table v4_main; - import none; + import where net = 0.0.0.0/0; # Import Default Gateway from kernel export none; }; + learn all; } protocol kernel kernel_v4_babel_ff { @@ -97,7 +98,7 @@ protocol babel babel_mesh { ipv4 { table v4_main; import all; - export where source = RTS_BABEL; # For now only advertise routes learned from babel + export where source = RTS_BABEL || net = 0.0.0.0/0; # Readvertise Babel routes and advertise default route }; # Mesh interfaces From 63cdd162d8f1372586541041a09376987c144194 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Mon, 2 Dec 2024 22:35:37 +0100 Subject: [PATCH 18/25] gateways: drop IPv4 Routes learned via GRE --- roles/cfg_openwrt/templates/gateway/bird.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 index 7764bccbe..ddcce1038 100644 --- a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 @@ -97,7 +97,7 @@ protocol babel babel_mesh { }; ipv4 { table v4_main; - import all; + import where ifname !~ "gre4-*"; # Drop IPv4 routes learned via GRE, which remains a rather dirty hack for IPv6 export where source = RTS_BABEL || net = 0.0.0.0/0; # Readvertise Babel routes and advertise default route }; From 19aa1ab7324e692fd8eb0ae9398ab5ebf3d9245a Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Mon, 2 Dec 2024 23:00:47 +0100 Subject: [PATCH 19/25] Core/Gateway: Babel: add metrics for IPv4 --- .../templates/corerouter/bird.conf.j2 | 16 +++++++++++++++- roles/cfg_openwrt/templates/gateway/bird.conf.j2 | 15 ++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 b/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 index 664029de0..c34cf3832 100644 --- a/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 @@ -51,7 +51,21 @@ protocol babel { }; }; ipv4 { - import all; + import filter { +{% for nw in networks | selectattr('role', 'equalto', 'mesh') %} + {# metrics for 2 GHz adhoc get a penalty over 5 GHz adhoc so 5 GHz is preferred #} + {% set default_mesh_metric = hostvars[inventory_hostname].get('mesh_metric_adhoc_' ~ nw.get('mesh_radio'), mesh_metric_default_in) %} + if ifname = "{{ libnetwork.getIfname(nw) }}" then { + babel_metric = babel_metric + {{ nw.get('mesh_metric', default_mesh_metric) }}; + } +{% endfor %} +{% for nw in networks | selectattr('role', 'equalto', 'tunnel') %} + if ifname = "{{ nw.get('ifname') }}" then { + babel_metric = babel_metric + {{ nw.get('mesh_metric', mesh_metric_tunnel_in) }}; + } +{% endfor %} + accept; + }; export where source = RTS_BABEL; # For now only advertise routes learned from babel }; diff --git a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 index ddcce1038..2b352eef7 100644 --- a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 @@ -97,7 +97,20 @@ protocol babel babel_mesh { }; ipv4 { table v4_main; - import where ifname !~ "gre4-*"; # Drop IPv4 routes learned via GRE, which remains a rather dirty hack for IPv6 + import filter { + if ifname ~ "gre4-*" then reject; +{% for interface in mesh_links %} + if ifname = "{{ interface['ifname'] }}" then { + babel_metric = babel_metric + {{ interface.get('mesh_metric', mesh_metric_default_in) }}; + accept; + } +{% endfor %} + if ifname ~ "wg_*" then { + babel_metric = babel_metric + {{ mesh_metric_tunnel_in }}; + accept; + } + accept; + }; export where source = RTS_BABEL || net = 0.0.0.0/0; # Readvertise Babel routes and advertise default route }; From be08863fdf2c2c2aaf062339a40edcc1eafdf9de Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Tue, 3 Dec 2024 13:28:40 +0100 Subject: [PATCH 20/25] gateway: bird: increase preference of static default route --- roles/cfg_openwrt/templates/gateway/bird.conf.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 index 2b352eef7..e8fa6bbc9 100644 --- a/roles/cfg_openwrt/templates/gateway/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/gateway/bird.conf.j2 @@ -32,7 +32,11 @@ protocol kernel kernel_v6_main { protocol kernel kernel_v4_main { ipv4 { table v4_main; - import where net = 0.0.0.0/0; # Import Default Gateway from kernel + import filter { + if net != 0.0.0.0/0 then reject; # Import only Default Gateway from kernel + preference = 200; # Increase preference to beat babel route + accept; + }; export none; }; learn all; From 95ba76f05a587d69ee78796b5ededec58b390717 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Tue, 3 Dec 2024 22:02:36 +0100 Subject: [PATCH 21/25] corerouter: advertise IPv4 via Babel --- roles/cfg_openwrt/templates/corerouter/bird.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 b/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 index c34cf3832..a9c78a7ec 100644 --- a/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 +++ b/roles/cfg_openwrt/templates/corerouter/bird.conf.j2 @@ -16,10 +16,10 @@ protocol device { }; protocol direct { - interface "lo"; ipv6 sadr { table v6_main; }; + ipv4; } protocol babel { @@ -66,7 +66,7 @@ protocol babel { {% endfor %} accept; }; - export where source = RTS_BABEL; # For now only advertise routes learned from babel + export where source = RTS_BABEL || net ~ [ 10.0.0.0/8{21,32} ]; # Readvertise learned routes and advertise local networks from 10/8 }; # Mesh interfaces From 81fab4e9916ad6b3b53625f346f45e935e4d1c29 Mon Sep 17 00:00:00 2001 From: Tobias Schwarz Date: Wed, 4 Dec 2024 11:54:34 +0000 Subject: [PATCH 22/25] w38b: backup uplink, metrics changes --- locations/w38b.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/locations/w38b.yml b/locations/w38b.yml index f986b9f13..ee3f8a01a 100644 --- a/locations/w38b.yml +++ b/locations/w38b.yml @@ -79,8 +79,6 @@ networks: name: mesh_2g prefix: 10.31.212.36/32 ipv6_subprefix: -21 - # make mesh_metric for 2GHz worse than 5GHz - mesh_metric_lqm: ['default 0.5'] mesh_ap: w38b-core mesh_radio: 11g_standard mesh_iface: mesh @@ -101,8 +99,6 @@ networks: name: mesh_ap1_2g prefix: 10.31.212.38/32 ipv6_subprefix: -23 - # make mesh_metric for 2GHz worse than 5GHz - mesh_metric_lqm: ['default 0.5'] mesh_ap: w38b-ap1 mesh_radio: 11g_standard mesh_iface: mesh @@ -113,9 +109,6 @@ networks: name: mesh_lan prefix: 10.31.212.39/32 ipv6_subprefix: -30 - # adjust mesh_metric(s) to prefer other links - mesh_metric: 4096 - mesh_metric_lqm: ['default 0.25'] # DHCP with filtering and isolation - vid: 40 @@ -163,6 +156,16 @@ networks: w38b-core: 1 # 10.31.212.113 w38b-ds: 2 # 10.31.212.114 + # UPLK - 10.31.212.64/27 as /32 + - vid: 50 + role: uplink + + - role: tunnel + ifname: ts_wg0 + mtu: 1280 + prefix: 10.31.212.64/32 + wireguard_port: 51820 + # MGMT - vid: 434 role: mgmt From 06235437088e2ed9304af608597a078fba48b9c5 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Tue, 3 Dec 2024 12:55:05 +0100 Subject: [PATCH 23/25] gateway/core: install and configure bgpdisco --- group_vars/role_corerouter/imageprofile.yml | 2 ++ group_vars/role_gateway/imageprofile.yml | 2 ++ .../common/config/bgpdisco_nameservice.j2 | 31 +++++++++++++++++++ .../corerouter/config/bgpdisco_nameservice.j2 | 1 + .../gateway/config/bgpdisco_nameservice.j2 | 1 + 5 files changed, 37 insertions(+) create mode 100644 roles/cfg_openwrt/templates/common/config/bgpdisco_nameservice.j2 create mode 120000 roles/cfg_openwrt/templates/corerouter/config/bgpdisco_nameservice.j2 create mode 120000 roles/cfg_openwrt/templates/gateway/config/bgpdisco_nameservice.j2 diff --git a/group_vars/role_corerouter/imageprofile.yml b/group_vars/role_corerouter/imageprofile.yml index 9be0ee496..2c576c5a3 100644 --- a/group_vars/role_corerouter/imageprofile.yml +++ b/group_vars/role_corerouter/imageprofile.yml @@ -2,6 +2,8 @@ role_corerouter__packages__to_merge: - bird2-babelpatch - bird2c + - bgpdisco + - bgpdisco-plugin-nameservice - collectd-mod-dhcpleases - collectd-mod-olsrd - collectd-mod-conntrack diff --git a/group_vars/role_gateway/imageprofile.yml b/group_vars/role_gateway/imageprofile.yml index 4d513f708..de154c63d 100644 --- a/group_vars/role_gateway/imageprofile.yml +++ b/group_vars/role_gateway/imageprofile.yml @@ -25,6 +25,8 @@ role_uplink_gw__packages__to_merge: - kmod-ipt-ipopt - bird2-babelpatch - bird2c + - bgpdisco + - bgpdisco-plugin-nameservice - ip-full - gre - wireguard-tools diff --git a/roles/cfg_openwrt/templates/common/config/bgpdisco_nameservice.j2 b/roles/cfg_openwrt/templates/common/config/bgpdisco_nameservice.j2 new file mode 100644 index 000000000..9f0cfef42 --- /dev/null +++ b/roles/cfg_openwrt/templates/common/config/bgpdisco_nameservice.j2 @@ -0,0 +1,31 @@ +package 'bgpdisco-plugin-nameservice' + +config general + option domain 'ff' + option hosts_file '/var/hosts/ffnameservice' + option cmd_on_update 'killall -SIGHUP dnsmasq' +{% if inventory_hostname in groups['role_gateway'] %} + list exclude_interface_self '{{ uplink['ifname'] }}' +{% endif %} + +{%- if mgmt['assignments'] is defined and mgmt['assignments']|length>0 -%} + +{# Gateway ... #} +{% for host, ip_num in mgmt['assignments'].items() if host != inventory_hostname %} +config static-entry + option host '{{ host }}' + list ip '{{ mgmt['ipv4'] | ansible.utils.ipaddr(ip_num) | ansible.utils.ipaddr('address') }}' + +{% endfor %} +{% else %} + +{# Core-Router #} +{% for network in networks | selectattr('assignments', 'mapping') %} +{% for host, ip_num in network['assignments'].items() if host != inventory_hostname %} +config static-entry + option host '{{ host }}' + list ip '{{ network['prefix'] | ansible.utils.ipaddr(ip_num) | ansible.utils.ipaddr('address') }}' + +{% endfor %} +{% endfor %} +{%- endif %} diff --git a/roles/cfg_openwrt/templates/corerouter/config/bgpdisco_nameservice.j2 b/roles/cfg_openwrt/templates/corerouter/config/bgpdisco_nameservice.j2 new file mode 120000 index 000000000..4e632e062 --- /dev/null +++ b/roles/cfg_openwrt/templates/corerouter/config/bgpdisco_nameservice.j2 @@ -0,0 +1 @@ +../../common/config/bgpdisco_nameservice.j2 \ No newline at end of file diff --git a/roles/cfg_openwrt/templates/gateway/config/bgpdisco_nameservice.j2 b/roles/cfg_openwrt/templates/gateway/config/bgpdisco_nameservice.j2 new file mode 120000 index 000000000..4e632e062 --- /dev/null +++ b/roles/cfg_openwrt/templates/gateway/config/bgpdisco_nameservice.j2 @@ -0,0 +1 @@ +../../common/config/bgpdisco_nameservice.j2 \ No newline at end of file From 74f61814b3d9261189b341a96f7d18ff2650b12d Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Tue, 3 Dec 2024 12:56:47 +0100 Subject: [PATCH 24/25] core/gateway: olsr: change nameservice domain to ff --- roles/cfg_openwrt/templates/corerouter/config/olsrd.j2 | 2 +- roles/cfg_openwrt/templates/gateway/config/olsrd.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/cfg_openwrt/templates/corerouter/config/olsrd.j2 b/roles/cfg_openwrt/templates/corerouter/config/olsrd.j2 index f23d0f457..c59e7b72d 100644 --- a/roles/cfg_openwrt/templates/corerouter/config/olsrd.j2 +++ b/roles/cfg_openwrt/templates/corerouter/config/olsrd.j2 @@ -4,7 +4,7 @@ config LoadPlugin config LoadPlugin option library 'olsrd_nameservice' - option suffix '.olsr' + option suffix '.ff' option hosts_file '/tmp/hosts/olsr' option latlon_file '/var/run/latlon.js' option services_file '/var/etc/services.olsr' diff --git a/roles/cfg_openwrt/templates/gateway/config/olsrd.j2 b/roles/cfg_openwrt/templates/gateway/config/olsrd.j2 index 47c58d0cc..07def42af 100644 --- a/roles/cfg_openwrt/templates/gateway/config/olsrd.j2 +++ b/roles/cfg_openwrt/templates/gateway/config/olsrd.j2 @@ -4,7 +4,7 @@ config LoadPlugin config LoadPlugin option library 'olsrd_nameservice' - option suffix '.olsr' + option suffix '.ff' option hosts_file '/tmp/hosts/olsr' option latlon_file '/var/run/latlon.js' option services_file '/var/etc/services.olsr' From a2637ac45f71ed3dd52dc55bf1efa3cf09d266c8 Mon Sep 17 00:00:00 2001 From: Simon Polack Date: Tue, 3 Dec 2024 12:59:46 +0100 Subject: [PATCH 25/25] core/gateway: drop olsrd6 config --- .../templates/corerouter/config/olsrd6.j2 | 53 ------------------- .../templates/gateway/config/olsrd6.j2 | 49 ----------------- 2 files changed, 102 deletions(-) delete mode 100644 roles/cfg_openwrt/templates/corerouter/config/olsrd6.j2 delete mode 100644 roles/cfg_openwrt/templates/gateway/config/olsrd6.j2 diff --git a/roles/cfg_openwrt/templates/corerouter/config/olsrd6.j2 b/roles/cfg_openwrt/templates/corerouter/config/olsrd6.j2 deleted file mode 100644 index c05004569..000000000 --- a/roles/cfg_openwrt/templates/corerouter/config/olsrd6.j2 +++ /dev/null @@ -1,53 +0,0 @@ -#jinja2: trim_blocks: "true", lstrip_blocks: "true" -config LoadPlugin - option library 'olsrd_nameservice' - option suffix '.olsr' - option hosts_file '/tmp/hosts/olsr6' - option latlon_file '/tmp/_unused_olsr6_latlon.js' - option services_file '/tmp/_unused_olsr6_services' - -config LoadPlugin - option accept '::' - option ipv6only 'true' - option library 'olsrd_jsoninfo' - option ignore '0' - -config olsrd - option IpVersion '6' - option FIBMetric 'flat' - option AllowNoInt 'yes' - option TcRedundancy '2' - option NatThreshold '0.75' - option LinkQualityAlgorithm 'etx_ff' - option SmartGateway 'no' - option Pollrate '0.025' - option LinkQualityLevel '2' - option OlsrPort '698' - option Willingness '3' - option TosValue '16' - option RtTable '666' - option RtTableDefault '666' - -config InterfaceDefaults - option MidValidityTime '500.0' - option TcInterval '2.0' - option HnaValidityTime '125.0' - option HelloValidityTime '125.0' - option TcValidityTime '500.0' - option MidInterval '50.0' - option HelloInterval '15.0' - option HnaInterval '30.0' - -{% for network in networks | selectattr('role', 'equalto', 'mesh') %} -config Interface - option ignore '0' - option interface '{{ network['name'] if 'name' in network else network['role'] }}' - option Mode '{{ 'ether' if network.get('ptp') else 'mesh' }}' -{% endfor %} - -{% for tunnel in networks | selectattr('role', 'equalto', 'tunnel') %} -config Interface - option interface '{{ tunnel['ifname'] }}' - option Mode 'ether' - option ignore 0 -{% endfor %} diff --git a/roles/cfg_openwrt/templates/gateway/config/olsrd6.j2 b/roles/cfg_openwrt/templates/gateway/config/olsrd6.j2 deleted file mode 100644 index 83e1e29e1..000000000 --- a/roles/cfg_openwrt/templates/gateway/config/olsrd6.j2 +++ /dev/null @@ -1,49 +0,0 @@ -#jinja2: trim_blocks: "true", lstrip_blocks: "true" -config LoadPlugin - option library 'olsrd_nameservice' - option suffix '.olsr' - option hosts_file '/tmp/hosts/olsr6' - option latlon_file '/tmp/_unused_olsr6_latlon.js' - option services_file '/tmp/_unused_olsr6_services' - -config LoadPlugin - option accept '::' - option ipv6only 'true' - option library 'olsrd_jsoninfo' - option ignore '0' - -config olsrd - option IpVersion '6' - option FIBMetric 'flat' - option AllowNoInt 'yes' - option TcRedundancy '2' - option NatThreshold '0.75' - option LinkQualityAlgorithm 'etx_ff' - option SmartGateway 'no' - option Pollrate '0.025' - option LinkQualityLevel '2' - option OlsrPort '698' - option Willingness '3' - option TosValue '16' - option RtTable '666' - option RtTableDefault '666' - -config InterfaceDefaults - option MidValidityTime '500.0' - option TcInterval '2.0' - option HnaValidityTime '125.0' - option HelloValidityTime '125.0' - option TcValidityTime '500.0' - option MidInterval '50.0' - option HelloInterval '15.0' - option HnaInterval '30.0' - -{% if mesh_links is defined and mesh_links|length>0 %} - {% for interface in mesh_links %} -config Interface - option ignore '0' - option interface '{{ interface['name'] }}' - option Mode '{{ 'ether' if interface.get('ptp') else 'mesh' }}' - {% endfor %} -{% endif %} -