diff --git a/machines/bird.conf b/machines/bird.conf new file mode 100644 index 0000000..22c784c --- /dev/null +++ b/machines/bird.conf @@ -0,0 +1,40 @@ +log syslog all; +debug protocols all; + +router id 44.137.17.110; + +protocol bgp hamgre { + local as 4220401706; + neighbor 44.137.61.33 as 4220406100; + source address 44.137.61.34; + multihop; + ipv4 { + import all; + export none; + }; +} + +protocol device { +} + +protocol direct { + interface "lo"; + ipv4 { + }; +} + +protocol kernel { + metric 0; + learn; + ipv4 { + import none; + export all; + }; +} + +protocol static { + route 44.137.17.96/28 via 44.137.61.33; + ipv4 { + }; +} + diff --git a/machines/warwick.nix b/machines/warwick.nix index 05eab41..27cd866 100644 --- a/machines/warwick.nix +++ b/machines/warwick.nix @@ -6,22 +6,37 @@ nixosModule = { lab.monitoring.server.enable = true; + services.bird2 = { + enable = true; + config = builtins.readFile ./bird.conf; + }; + systemd.network = { - netdevs.hamgre = { - netdevConfig = { - Name = "hamgre"; - Kind = "gre"; - MTUBytes = "1468"; + netdevs = { + hamgre = { + netdevConfig = { + Name = "hamgre"; + Kind = "gre"; + MTUBytes = "1468"; + }; + + tunnelConfig = { + Remote = "145.220.78.4"; + #Local = "192.145.57.90"; + }; }; - tunnelConfig = { - Remote = "145.220.78.4"; - #Local = "192.145.57.90"; - }; + # hambr = { + # netdevConfig = { + # Name = "hambr"; + # Kind = "bridge"; + # }; + # }; }; networks = { "30-main-nic".networkConfig.Tunnel = "hamgre"; + "40-hamgre" = { matchConfig.Name = "hamgre"; @@ -29,6 +44,11 @@ Address = "44.137.61.34/30"; }; }; + + # "40-hambr" = { + # matchConfig.Name = "hambr"; + + # }; }; }; };