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:
21
overlays/bird/vpp/etc/bird/bird.conf.j2
Normal file
21
overlays/bird/vpp/etc/bird/bird.conf.j2
Normal 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";
|
||||
|
6
overlays/bird/vpp/etc/bird/core/bfd.conf.j2
Normal file
6
overlays/bird/vpp/etc/bird/core/bfd.conf.j2
Normal file
@ -0,0 +1,6 @@
|
||||
protocol bfd bfd1 {
|
||||
interface "e*" {
|
||||
interval 100 ms;
|
||||
multiplier 20;
|
||||
};
|
||||
}
|
21
overlays/bird/vpp/etc/bird/core/ospf.conf.j2
Normal file
21
overlays/bird/vpp/etc/bird/core/ospf.conf.j2
Normal 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; };
|
||||
};
|
||||
}
|
20
overlays/bird/vpp/etc/bird/core/static.conf.j2
Normal file
20
overlays/bird/vpp/etc/bird/core/static.conf.j2
Normal 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 %}
|
||||
}
|
||||
|
1
overlays/bird/vpp/etc/bird/manual.conf.j2
Normal file
1
overlays/bird/vpp/etc/bird/manual.conf.j2
Normal file
@ -0,0 +1 @@
|
||||
## Manual configuration for {{ node.hostname }}
|
Reference in New Issue
Block a user