-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbird.conf
56 lines (47 loc) · 1.41 KB
/
bird.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
log syslog all;
router id $NODE_IP;
# Device is a special protocol that has no channels.
# it is to configure BIRD to scan network devices in OS.
# One Device protocol instance should be included in bird.conf
protocol device {
interface "$INTERFACE";
}
# also a special protocol that has no channels.
# It is always used alongside with other routing protocols
# such as BGP to detect link failures very fast.
protocol bfd {
interface "*" {
interval 50 ms;
};
}
# Direct is to import routes automatically generated by the kernel.
#protocol direct {
# ipv4;
#}
# Kernel protocol is to exchange routes between a BIRD routing table and a kernel routing table (FIB).
protocol kernel {
ipv4 {
export filter {
if proto = "direct" then reject;
accept;
};
};
}
# "static" protocol is used to define routes that are manually configured
# instead of being learned dynamically through a routing protocol.
# it should be blackholed (dropped) instead of being forwarded.
protocol static {
ipv4;
route ${TO_BRIDGE_SUBNET} via ${TO_NODE_IP};
}
# configures an BGP instance that exchanges IPv4 routes between an iBGP peer
# running at $TO_NODE_IP
# It imports all IPv4 routes from the peer router and exports all routes in master4 (default bgp routing table)
protocol bgp $HOSTNAME {
local $NODE_IP as 65000;
neighbor $TO_NODE_IP as 65000;
ipv4 {
import all;
export all;
};
}