add bundle:bird
This commit is contained in:
parent
fe44417b14
commit
30d4d989fc
3 changed files with 134 additions and 0 deletions
41
bundles/bird/files/bird.conf
Normal file
41
bundles/bird/files/bird.conf
Normal file
|
@ -0,0 +1,41 @@
|
|||
log syslog all;
|
||||
router id ${node.metadata.get('bird/my_ip')};
|
||||
debug protocols all;
|
||||
|
||||
ipv4 table master4;
|
||||
|
||||
protocol device {
|
||||
}
|
||||
|
||||
protocol kernel {
|
||||
scan time 30;
|
||||
ipv4 {
|
||||
export where source != RTS_STATIC;
|
||||
};
|
||||
}
|
||||
% if node.metadata.get('bird/static_routes', set()):
|
||||
|
||||
protocol static {
|
||||
ipv4;
|
||||
|
||||
% for route in sorted(node.metadata.get('bird/static_routes', set())):
|
||||
route ${route} via ${node.metadata.get('bird/my_ip')};
|
||||
% endfor
|
||||
}
|
||||
% endif
|
||||
% for name, config in sorted(node.metadata.get('bird/bgp_neighbors', {}).items()):
|
||||
|
||||
protocol bgp '${name}' {
|
||||
local ${config['local_ip']} as ${config['local_as']};
|
||||
neighbor ${config['neighbor_ip']} as ${config['neighbor_as']};
|
||||
hold time ${config.get('hold_time', 15)};
|
||||
error wait time 5, 10;
|
||||
direct;
|
||||
|
||||
ipv4 {
|
||||
next hop self;
|
||||
import all;
|
||||
export all;
|
||||
};
|
||||
}
|
||||
% endfor
|
Loading…
Add table
Add a link
Reference in a new issue