commit a81b48ef58c0907151d47a7c19cdfc88067e5080 parent 7a6f679fc6580d67d0544513204f3d3d6adb5435 Author: MTRNord <mtrnord1@gmail.com> Date: Sat, 27 Jan 2024 21:06:03 +0100 Switch to gobgpd Diffstat:
| M | nixos/worker-1/configuration.nix | | | 65 | +++++++++++++++++++++++++++++++++++++---------------------------- |
| M | nixos/worker-2/configuration.nix | | | 64 | ++++++++++++++++++++++++++++++++++++---------------------------- |
2 files changed, 73 insertions(+), 56 deletions(-)
diff --git a/nixos/worker-1/configuration.nix b/nixos/worker-1/configuration.nix @@ -502,37 +502,46 @@ in { router-id = "10.0.2.1"; }; }; + defined-sets = { - prefix-sets = { - prefix-set-name = "ps1"; - prefix-list = { - ip-prefix = "10.0.2.25/32"; - }; - }; - neighbor-sets = { - neighbor-set-name = "ns1"; - neighbor-info-list = ["10.0.1.2" "10.0.2.2"]; - }; - }; - policy-definitions = { - name = "pd1"; - statements = { - name = "statement1"; - conditions = { - match-prefix-set = { - prefix-set = "ps1"; - match-set-options = "any"; - }; - match-neighbor-set = { - prefix-set = "ns1"; - match-set-options = "any"; - }; - actions = { - route-disposition = "accept-route"; + prefix-sets = [ + { + prefix-set-name = "ps1"; + prefix-list = { + ip-prefix = "10.0.2.25/32"; }; - }; - }; + } + ]; + neighbor-sets = [ + { + neighbor-set-name = "ns1"; + neighbor-info-list = ["10.0.1.2" "10.0.2.1"]; + } + ]; }; + policy-definitions = [ + { + name = "pd1"; + statements = [ + { + name = "statement1"; + conditions = { + match-prefix-set = { + prefix-set = "ps1"; + match-set-options = "any"; + }; + match-neighbor-set = { + prefix-set = "ns1"; + match-set-options = "any"; + }; + actions = { + route-disposition = "accept-route"; + }; + }; + } + ]; + } + ]; neighbors = [ { config = { diff --git a/nixos/worker-2/configuration.nix b/nixos/worker-2/configuration.nix @@ -551,36 +551,44 @@ in { }; }; defined-sets = { - prefix-sets = { - prefix-set-name = "ps1"; - prefix-list = { - ip-prefix = "10.0.2.25/32"; - }; - }; - neighbor-sets = { - neighbor-set-name = "ns1"; - neighbor-info-list = ["10.0.1.2" "10.0.2.1"]; - }; - }; - policy-definitions = { - name = "pd1"; - statements = { - name = "statement1"; - conditions = { - match-prefix-set = { - prefix-set = "ps1"; - match-set-options = "any"; - }; - match-neighbor-set = { - prefix-set = "ns1"; - match-set-options = "any"; - }; - actions = { - route-disposition = "accept-route"; + prefix-sets = [ + { + prefix-set-name = "ps1"; + prefix-list = { + ip-prefix = "10.0.2.25/32"; }; - }; - }; + } + ]; + neighbor-sets = [ + { + neighbor-set-name = "ns1"; + neighbor-info-list = ["10.0.1.2" "10.0.2.1"]; + } + ]; }; + policy-definitions = [ + { + name = "pd1"; + statements = [ + { + name = "statement1"; + conditions = { + match-prefix-set = { + prefix-set = "ps1"; + match-set-options = "any"; + }; + match-neighbor-set = { + prefix-set = "ns1"; + match-set-options = "any"; + }; + actions = { + route-disposition = "accept-route"; + }; + }; + } + ]; + } + ]; neighbors = [ { config = {