2024-10-28 12:16:51 +00:00
|
|
|
# Configure logging
|
|
|
|
log syslog all;
|
|
|
|
|
|
|
|
# Set router ID. It is a unique identification of your router, usually one of
|
|
|
|
# IPv4 addresses of the router. It is recommended to configure it explicitly.
|
|
|
|
router id <%= @facts['networking']['interfaces']['default']['ip'] %>;
|
|
|
|
|
|
|
|
# The Device protocol is not a real routing protocol. It does not generate any
|
|
|
|
# routes and it only serves as a module for getting information about network
|
|
|
|
# interfaces from the kernel. It is necessary in almost any configuration.
|
|
|
|
protocol device {
|
|
|
|
}
|
|
|
|
|
|
|
|
# The direct protocol is not a real routing protocol. It automatically generates
|
|
|
|
# direct routes to all network interfaces. Can exist in as many instances as you
|
|
|
|
# wish if you want to populate multiple routing tables with direct routes.
|
|
|
|
protocol direct {
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv4;
|
|
|
|
ipv6;
|
|
|
|
interface "dummy0";
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# The Kernel protocol is not a real routing protocol. Instead of communicating
|
|
|
|
# with other routers in the network, it performs synchronization of BIRD
|
|
|
|
# routing tables with the OS kernel. One instance per table.
|
|
|
|
protocol kernel {
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv4 {
|
|
|
|
import none;
|
|
|
|
export filter { if source = RTS_DEVICE then { reject; } accept; };
|
|
|
|
};
|
|
|
|
# Create ECMP routes in kernel table from multiple paths
|
|
|
|
merge paths;
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protocol kernel {
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv6 {
|
|
|
|
import none;
|
|
|
|
export filter { if source = RTS_DEVICE then { reject; } accept; };
|
|
|
|
};
|
|
|
|
# Create ECMP routes in kernel table from multiple paths
|
|
|
|
merge paths;
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protocol bgp tug_r11_v4 {
|
2024-10-28 12:22:53 +00:00
|
|
|
description "tug-r11-v4";
|
|
|
|
local 130.242.64.233 as 65443;
|
|
|
|
neighbor 130.242.64.232 as 1653;
|
|
|
|
hold time 90;
|
2024-10-28 12:16:51 +00:00
|
|
|
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv4 {
|
2024-10-28 12:26:13 +00:00
|
|
|
import filter {
|
|
|
|
if net ~ [ 0.0.0.0/0 ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
2024-10-28 12:22:53 +00:00
|
|
|
export filter {
|
|
|
|
if net ~ [ 188.240.152.0/24{32,32} ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
|
|
|
};
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protocol bgp tug_r11_v6 {
|
2024-10-28 12:22:53 +00:00
|
|
|
description "tug-r12-v6";
|
|
|
|
local 2001:6b0:2006:74::1 as 65443;
|
|
|
|
neighbor 2001:6b0:2006:74:: as 1653;
|
|
|
|
hold time 90;
|
2024-10-28 12:16:51 +00:00
|
|
|
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv6 {
|
2024-10-28 12:26:13 +00:00
|
|
|
import filter {
|
|
|
|
if net ~ [ ::/0 ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
2024-10-28 12:22:53 +00:00
|
|
|
export filter {
|
|
|
|
if net ~ [ 2001:6b0:2100::/48{128,128} ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
|
|
|
};
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protocol bgp tug_r12_v4 {
|
2024-10-28 12:22:53 +00:00
|
|
|
description "tug-r12-v4";
|
|
|
|
local 130.242.64.235 as 65443;
|
|
|
|
neighbor 130.242.64.234 as 1653;
|
|
|
|
hold time 90;
|
2024-10-28 12:16:51 +00:00
|
|
|
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv4 {
|
2024-10-28 12:26:13 +00:00
|
|
|
import filter {
|
|
|
|
if net ~ [ 0.0.0.0/0 ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
2024-10-28 12:22:53 +00:00
|
|
|
export filter {
|
|
|
|
if net ~ [ 188.240.152.0/24{32,32} ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
|
|
|
};
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protocol bgp tug_r12_v6 {
|
2024-10-28 12:22:53 +00:00
|
|
|
description "tug-r12-v6";
|
|
|
|
local 2001:6b0:2006:75::1 as 65443;
|
|
|
|
neighbor 2001:6b0:2006:75:: as 1653;
|
|
|
|
hold time 90;
|
2024-10-28 12:16:51 +00:00
|
|
|
|
2024-10-28 12:22:53 +00:00
|
|
|
ipv6 {
|
2024-10-28 12:26:13 +00:00
|
|
|
import filter {
|
|
|
|
if net ~ [ ::/0 ] then
|
|
|
|
accept; else reject;
|
|
|
|
};
|
|
|
|
export filter {
|
|
|
|
if net ~ [ 2001:6b0:2100::/48{128,128} ] then
|
|
|
|
accept; else reject;
|
2024-10-28 12:22:53 +00:00
|
|
|
};
|
|
|
|
};
|
2024-10-28 12:16:51 +00:00
|
|
|
}
|