Enable bird2 on warwick

This commit is contained in:
Pim Kunis 2024-05-15 22:05:28 +02:00
parent 592fc2a32a
commit 01c57b201b
2 changed files with 69 additions and 9 deletions

40
machines/bird.conf Normal file
View file

@ -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 {
};
}

View file

@ -6,8 +6,14 @@
nixosModule = { nixosModule = {
lab.monitoring.server.enable = true; lab.monitoring.server.enable = true;
services.bird2 = {
enable = true;
config = builtins.readFile ./bird.conf;
};
systemd.network = { systemd.network = {
netdevs.hamgre = { netdevs = {
hamgre = {
netdevConfig = { netdevConfig = {
Name = "hamgre"; Name = "hamgre";
Kind = "gre"; Kind = "gre";
@ -20,8 +26,17 @@
}; };
}; };
# hambr = {
# netdevConfig = {
# Name = "hambr";
# Kind = "bridge";
# };
# };
};
networks = { networks = {
"30-main-nic".networkConfig.Tunnel = "hamgre"; "30-main-nic".networkConfig.Tunnel = "hamgre";
"40-hamgre" = { "40-hamgre" = {
matchConfig.Name = "hamgre"; matchConfig.Name = "hamgre";
@ -29,6 +44,11 @@
Address = "44.137.61.34/30"; Address = "44.137.61.34/30";
}; };
}; };
# "40-hambr" = {
# matchConfig.Name = "hambr";
# };
}; };
}; };
}; };