This is a draft version. Hopefully I’ll update it with more details on OSPF configuration and a simple OSPF adjacency scenario between different machines.
BIRD or Bird Internet Routing Daemon, is one of the simplest Linux routing daemons with just one configuration file for IPv4 and one for IPv6.
Personally, I prefer Quagga because it uses a CLI very similar to Cisco IOS, but more configuration files has to be managed to get it running.
The first step would be to install the daemon:
apt-get install bird
or aptitude install bird
Then you have to edit the configuration per your requirements.
- IPv4:
/etc/bird.conf
- IPv6:
/etc/bird6.conf
A simple OSPF configuration follows:
log syslog all; router id 1.1.1.1; # Define a route filter... filter test_filter { if net = 0.0.0.0/0 then reject; if net = 1.1.1.2/32 then reject; else accept; } # Define another routing table #table main; protocol direct { interface "*"; # Restrict network interfaces it works with } protocol kernel { import all; learn; # Learn all alien routes from the kernel # persist; # Don't remove routes on bird shutdown scan time 20; # Scan kernel routing table every 20 seconds # import none; # Default is import all export all; # Default is export none # kernel table 254; # Kernel table to synchronize with (default: ain) } protocol device { scan time 10; # Scan interfaces every 10 seconds } protocol static { # import all; # export all; # table main; # Connect to a non-default table route 1.1.1.1:255.255.255.255 via "eth0"; } # Pipe protocol connects two routing tables... Beware of loops. #protocol pipe { # peer table testable; # Define what routes do we export to this protocol / import from it. # import all; # default is all # export all; # default is none # import none; # If you wish to disable imports # import filter test_filter; # Use named filter # import where source = RTS_DEVICE; # Use explicit filter #} protocol ospf MyOSPF { # tick 2; rfc1583compat yes; import filter test_filter; export filter test_filter; area 0.0.0.0 { stub no; interface "gre1" { hello 10; retransmit 6; cost 10; transmit delay 5; dead count 5; wait 50; type pointopoint; authentication simple; password "pass"; }; interface "eth1" { hello 10; retransmit 6; cost 10; transmit delay 5; dead count 5; wait 50; type broadcast; }; }; }