Refactor generator - allow for multiple types of node (only 'vpp' for now) -- move the vpp overlays into a new 'type'-root; we will read common/ / and / now

This commit is contained in:
Pim van Pelt
2023-05-06 10:57:05 +00:00
parent aa0b042298
commit e9d645cba4
14 changed files with 16 additions and 10 deletions

View File

@ -0,0 +1,21 @@
## Bird2 configuration for {{ node.hostname }}
router id {{ node.loopback.ipv4.split("/")[0] }};
protocol device { scan time 30; }
protocol direct { ipv4; ipv6; check link yes; }
protocol kernel kernel4 {
ipv4 { import none; export where source != RTS_DEVICE; };
learn off;
scan time 300;
}
protocol kernel kernel6 {
ipv6 { import none; export where source != RTS_DEVICE; };
learn off;
scan time 300;
}
include "core/static.conf";
include "core/bfd.conf";
include "core/ospf.conf";
include "manual.conf";

View File

@ -0,0 +1,6 @@
protocol bfd bfd1 {
interface "e*" {
interval 100 ms;
multiplier 20;
};
}

View File

@ -0,0 +1,21 @@
protocol ospf v2 ospf4 {
ipv4 { export where (source = RTS_DEVICE || source = RTS_STATIC); import all; };
area 0 {
interface "loop0" { stub yes; };
interface "e0" { type pointopoint; cost 5; bfd off; };
interface "e1" { type pointopoint; cost 5; bfd off; };
interface "e2" { type pointopoint; cost 5; bfd off; };
interface "e3" { type pointopoint; cost 5; bfd off; };
};
}
protocol ospf v3 ospf6 {
ipv6 { export where (source = RTS_DEVICE || source = RTS_STATIC); import all; };
area 0 {
interface "loop0" { stub yes; };
interface "e0" { type pointopoint; cost 5; bfd off; };
interface "e1" { type pointopoint; cost 5; bfd off; };
interface "e2" { type pointopoint; cost 5; bfd off; };
interface "e3" { type pointopoint; cost 5; bfd off; };
};
}

View File

@ -0,0 +1,20 @@
protocol static static4 {
ipv4 { export all; };
# route 192.0.2.0/24 via 10.0.0.1;
route {{lab.ipv4}} unreachable;
{% if node.id == 0 %}
route 0.0.0.0/0 via 192.168.{{10+lab.id}}.4;
{% endif %}
}
protocol static static6 {
ipv6 { export all; };
# route 2001:db8:cafe::/48 via 2001:db8::1;;
route {{lab.ipv6}} unreachable;
{% if node.id == 0 %}
route ::/0 via 2001:678:d78:2{{lab.id}}1::ffff;
{% endif %}
}

View File

@ -0,0 +1 @@
## Manual configuration for {{ node.hostname }}