Suppose the following network layout:
R1: R2:
10.1.1.0/24 <--- 10.1.1.1, 192.168.1.1 <----------> 192.168.1.2, 10.1.2.1 ---> 10.1.2.0/24
BIRD is installed on both R1 and R2. All information about the network topology is automatically given. It was my understanding that BIRD would automatically redistribute this information so that all stations can connect. But it does not seem as straight forward: R1 and R2 both automatically create "dynamic" routes for their respective subnets but they do not get handled automatically.
The device protocol does not import/export routes. The docs say about the direct protocol:
[...] Although there are some use cases that use the direct protocol (like abusing eBGP as an IGP routing protocol), in most cases it is not needed to have these device routes in BIRD routing table and to use the direct protocol. [...]
I thought the kernel protocol would automatically import these routes because they are part of the kernel routing table. But the documentation states:
Unfortunately, there is one thing that makes the routing table synchronization a bit more complicated. In the kernel routing table there are also device routes for directly connected networks. These routes are usually managed by OS itself (as a part of IP address configuration) and we don't want to touch that. They are completely ignored during the scan of the kernel tables and also the export of device routes from BIRD tables to kernel routing tables is restricted to prevent accidental interference.
So nobody (no protocol) wants to be responsible for distributing the very routes which would make the two networks connect. What's left is static but they I would need to recreate the whole connectivity of a router in the bird config file, something I thought OSPF over BIRD would do for me. Is this what I am supposed to do?
How should the config files for R1 and R2 look like?
router id 192.168.1.1;
protocol device {
scan time 10;
}
protocol direct {
interface "*"; # should I use this?
}
protocol kernel {
learn;
export all;
import all;
device routes true; # OR SHALL I USE THIS?
}
# I would like to avoid doing this:
#protocol static {
# export all;
# route 10.1.1.0/24 via 192.168.1.1;
#}
protocol ospf {
import all;
export all;
area 0 {
interface "eth0", "eth1" {
cost 10; hello 10; transmit 2; wait 5; dead 40;
type broadcast;
authentication cryptographic;
password "1234567890";
};
};
}
And:
router id 192.168.1.2;
protocol device {
scan time 10;
}
protocol direct {
interface "*"; # should I use this?
}
protocol kernel {
learn;
export all;
import all;
device routes true; # OR SHALL I USE THIS?
}
# I would like to avoid doing this:
#protocol static {
# export all;
# route 10.1.2.0/24 via 192.168.1.2;
#}
protocol ospf {
import all;
export all;
area 0 {
interface "eth0", "eth1" {
cost 10; hello 10; transmit 2; wait 5; dead 40;
type broadcast;
authentication cryptographic;
password "1234567890";
};
};
}
0 Answers