From 2c6be52ce9114498517a12632942e29301789494 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 4 Jun 2022 12:15:43 +0100 Subject: [PATCH] howl: add BGP for EMFIX --- ops/nixos/howl/default.nix | 32 ++++++++++++++++++++++++++++++++ ops/nixos/lib/bgp.nix | 2 ++ 2 files changed, 34 insertions(+) diff --git a/ops/nixos/howl/default.nix b/ops/nixos/howl/default.nix index 851944eb1a..c01a8b3965 100644 --- a/ops/nixos/howl/default.nix +++ b/ops/nixos/howl/default.nix @@ -10,6 +10,7 @@ in { ../lib/zfs.nix ../lib/graphical-client-wayland.nix ../lib/whitby-distributed.nix + ../lib/bgp.nix ]; boot.initrd.availableKernelModules = [ @@ -189,6 +190,37 @@ in { my.scrapeJournal.enable = false; # Laptop, don't pull too much. + services.lukegbgp = let + local = { + asn = 205479; + v4 = "185.230.223.240"; + v6 = "2a0c:2f07:ffff::79c"; + }; + # .254 / ::1 / 64496 + in { + enable = true; + config = { + local.routerID = "185.230.223.240"; + export = { + v4 = [ "92.118.31.0/24" ]; + v6 = [ "2a09:a443::/48" ]; + }; + peering.emfixrs = { + inherit local; + remote = { + asn = 64496; + export_community = 6000; + must_be_next_hop = false; + routers = [{ + v4 = "185.230.223.254"; + v6 = "2a0c:2f07:ffff::1"; + }]; + }; + }; + }; + }; + + # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you diff --git a/ops/nixos/lib/bgp.nix b/ops/nixos/lib/bgp.nix index 8e3f78d94f..4166e1515e 100644 --- a/ops/nixos/lib/bgp.nix +++ b/ops/nixos/lib/bgp.nix @@ -310,6 +310,7 @@ in { bgp_ext_community.add((ro, 205479, 5007)); bgp_ext_community.add((ro, 205479, 5008)); bgp_ext_community.add((ro, 205479, 5009)); # fastly from blade-tuvok + bgp_ext_community.add((ro, 205479, 6000)); # EMF: EMF-IX Route Server # do not export to clouvider; they do... strange things. bgp_ext_community.add((rt, 0, 62240)); @@ -342,6 +343,7 @@ in { bgp_ext_community.add((ro, 205479, 5007)); # google from blade-tuvok bgp_ext_community.add((ro, 205479, 5008)); # cloudflare from blade-tuvok bgp_ext_community.add((ro, 205479, 5009)); # fastly from blade-tuvok + bgp_ext_community.add((ro, 205479, 6000)); # EMF: EMF-IX Route Server # do not export to clouvider; they do... strange things. bgp_ext_community.add((rt, 0, 62240));