From c6d883af9a35ed79e04a79d9c464e68122c8e9e8 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 8 May 2020 16:52:04 +0000 Subject: [PATCH] ixvm-fra01: fix up bird config --- ops/nixos/ixvm-fra01/bird.nix | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/ops/nixos/ixvm-fra01/bird.nix b/ops/nixos/ixvm-fra01/bird.nix index 1afd29cabe..1a9c1d2397 100644 --- a/ops/nixos/ixvm-fra01/bird.nix +++ b/ops/nixos/ixvm-fra01/bird.nix @@ -80,8 +80,20 @@ let generateSnippetForIX = { ixName, ix, ... }@args: '' ipv4 table ${ixName}4; ipv6 table ${ixName}6; + protocol pipe ${ixName}pipe_4 { + table ${ixName}4; + peer table master4; + import none; + export all; + }; + protocol pipe ${ixName}pipe_6 { + table ${ixName}6; + peer table master6; + import none; + export all; + }; '' + lib.concatImapStringsSep "\n" ( i: v: generateSnippetForRouter (args // { routerNum = i; router = v; }) ) ix.remote.routers; - enabledSnippet = { enabled ? true, ... }: "disabled ${if enabled then "off" else "on"};"; + enabledSnippet = { enabled ? true, ... }: "disabled ${if enabled then "off" else "on"}"; generateSnippetForRouter = { ixName, ix, routerNum, router, ... }: '' protocol bgp ${ixName}${toString routerNum}_4 { ${enabledSnippet router}; @@ -111,6 +123,23 @@ in { router id 141.98.136.124; ${generateSnippet peering {}} + + protocol kernel { + persist; + ipv4 { + import none; + export none; + }; + }; + protocol kernel { + persist; + ipv6 { + import none; + export none; + }; + }; + protocol device { + }; ''; };