bundlewrap/bundles/bird/files/bird.conf

44 lines
950 B
Text
Raw Permalink Normal View History

2021-09-29 17:45:18 +00:00
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())):
% for name, config in sorted(node.metadata.get('bird/bgp_neighbors', {}).items()):
route ${route} via ${config['local_ip']};
% endfor
2021-09-29 17:45:18 +00:00
% 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