router id 172.22.120.3; table prauscher; table gateway_prauscher; table main; table gateway_main; log "/tmp/bird4.log" all; filter is_gateway { if net.len < 2 then accept; reject; } filter is_not_gateway { if net.len >= 2 then accept; reject; } protocol device { scan time 10; } protocol pipe { table prauscher; peer table master; import none; export filter is_not_gateway; } protocol pipe { table prauscher; peer table gateway_prauscher; import none; export filter is_gateway; } protocol pipe { table main; peer table master; import none; export filter is_not_gateway; } protocol pipe { table main; peer table gateway_main; import none; export filter is_gateway; } protocol kernel k_master { table master; scan time 20; import none; export all; kernel table 1; # we have the default route before usual main-routingtable, so we need to insert device routes by hand device routes; } protocol kernel k_gateway_prauscher { table gateway_prauscher; scan time 20; import none; export all; kernel table 2; } protocol kernel k_gateway_main { table gateway_main; scan time 20; import none; export all; kernel table 3; } protocol kernel k_main { table main; scan time 20; import all; export none; learn; device routes; # export filter { krt_prefsrc = 172.22.120.3; accept; }; } protocol direct d_main { table main; import all; interface "*"; } ####################################### protocol static { table prauscher; import all; route 192.168.0.0/16 via "tun.jupis"; route 172.16.0.0/16 via "tun.jupis"; } protocol direct { table prauscher; import all; interface "br-lan", "tun.server", "br-wan"; } protocol ospf { table prauscher; import all; export all; area 0.0.0.0 { interface "tun.sheldon" { cost 12; hello 60; dead 80; type ptp; }; interface "tun.rajesh" { hello 60; dead 80; type ptp; }; }; }