routing filter problems
Loschyov Oleg
boom at exoft.ru
Mon May 24 08:48:59 CEST 2004
Hello, I`m having some problems in making bird filters.
I have 2 different channels to 2 different providers.
Both of then distribute RIP. So I made the followng filter:
______________________________________________________
filter prov1_preferred {
if net ~ 212.192.121.0/24 then {
if from = 213.183.100.161 then { rip_metric = 10; accept; }
else if from = 217.29.80.1 then accept;
}
else
if net ~ 212.192.122.0/24 then {
if from = 213.183.100.161 then { rip_metric = 10; accept; }
else if from = 217.29.80.1 then accept;
}
else
if net ~ 212.192.123.0/24 then {
if from = 213.183.100.161 then { rip_metric = 10; accept; }
else if from = 217.29.80.1 then accept;
}
else
if net ~ 217.29.80.0/20 then {
if from = 213.183.100.161 then { rip_metric = 10; accept; }
else if from = 217.29.80.1 then accept;
}
else accept;
}
______________________________________________________
217.29.80.1 - first provider GW
213.183.100.161 - second provider GW
eth0 - my eth to 1st provider
eth2 - my eth to 2nd provider
so I import this filter in protocol rip configuration:
protocol rip eXoft_RIP {
debug all;
port 520;
period 20;
garbage time 200;
interface "eth0" { metric 1; mode quiet; };
interface "eth1" { metric 2; mode broadcast; };
interface "eth2" { metric 1; mode quiet; };
honor neighbor;
authentication none;
import filter drop_default;
import filter prov1_preferred;
export filter { print "exporting"; accept; };
}
and i make the following commands:
service bird restart
ip route flush proto bird
#waiting for some time for RIP`s from providers
ip r l |grep 212.192.12
#after that i see following:
212.192.125.0/25 via 213.183.100.161 dev eth2 proto bird
212.192.126.0/24 via 213.183.100.161 dev eth2 proto bird
212.192.123.0/24 via 213.183.100.161 dev eth2 proto bird
212.192.122.0/24 via 213.183.100.161 dev eth2 proto bird
212.192.121.0/24 via 213.183.100.161 dev eth2 proto bird
212.192.120.0/24 via 213.183.100.161 dev eth2 proto bird
but i must be routed via eth0!!!
where is the problem, help me please
Loschyov Oleg
icq:104545374
More information about the Bird-users
mailing list