|
|
OSPF example
|
|
|
===========
|
|
|
|
|
|
Here is a simple and typical example of BIRD used as an OSPF router. Router has several interfaces: eth0 is connected to the local ethernet switch, eth1 and eth2 are ethernet ptp links to other routers, ath0 is a local wifi AP and ath1, ath2 are wifi ptp links to other routers. Wifi devices are Atheros with madwifi driver, hence athX device names.
|
|
|
|
|
|
Fast ethernet links use cost 5 and (slower) wifi links use cost 100. Default OSPF parameters (_hello_, _dead_, ...) are changed, because default ones are too conservative. _dead_ parameter on wifi links is larger, because these devices sometimes experience a drop-out for tens seconds.
|
|
|
|
|
|
Static protocol is used for leaf networks hidden behind a neighor router that does not speak OSPF. These static routes are propagated to OSPF, because they are accepted in the OPSF export filter, where also type 1 OSPF metric of 1000 is assigned to them.
|
|
|
|
|
|
`
|
|
|
log syslog all;
|
|
|
|
|
|
router id A.B.C.D;
|
|
|
|
|
|
protocol device {
|
|
|
scan time 10;
|
|
|
}
|
|
|
|
|
|
protocol kernel {
|
|
|
export all;
|
|
|
scan time 15;
|
|
|
}
|
|
|
|
|
|
protocol static {
|
|
|
import all;
|
|
|
|
|
|
route 192.168.X.Y/24 via 192.168.A.B;
|
|
|
route 192.168.X.Z/24 via 192.168.A.B;
|
|
|
}
|
|
|
|
|
|
protocol ospf {
|
|
|
import all;
|
|
|
export filter {
|
|
|
ospf_metric1 = 1000;
|
|
|
if source = RTS_STATIC then accept; else reject;
|
|
|
};
|
|
|
|
|
|
area 0 {
|
|
|
interface "eth0" {
|
|
|
cost 5;
|
|
|
type broadcast;
|
|
|
hello 5; retransmit 2; wait 10; dead 20;
|
|
|
authentication cryptographic; password "XXXX";
|
|
|
};
|
|
|
|
|
|
interface "eth1", "eth2" {
|
|
|
cost 5;
|
|
|
type pointopoint;
|
|
|
hello 5; retransmit 2; wait 10; dead 20;
|
|
|
authentication cryptographic; password "XXXX";
|
|
|
};
|
|
|
|
|
|
interface "ath0" {
|
|
|
cost 1000;
|
|
|
type broadcast;
|
|
|
hello 5; retransmit 2; wait 10; dead 60;
|
|
|
authentication cryptographic; password "XXXX";
|
|
|
};
|
|
|
|
|
|
interface "ath1", "ath2" {
|
|
|
cost 100;
|
|
|
type pointopoint;
|
|
|
hello 5; retransmit 2; wait 10; dead 60;
|
|
|
authentication cryptographic; password "XXXX";
|
|
|
};
|
|
|
|
|
|
interface "*" {
|
|
|
cost 1000;
|
|
|
stub;
|
|
|
};
|
|
|
};
|
|
|
}
|
|
|
` |
|
|
\ No newline at end of file |