routing filter problems

Zharovtsev, Anton warm at stack.ru
Mon May 24 09:18:34 CEST 2004


Hi, Oleg.

Try to write two different filters for Your providers and apply them
separatly in 
Exporting from each RIP to master table or even to separate table.

May be You should simply drop nets of first provider coming from second
and visa vesta ?

P.S. I know You are doing load balancing , aren't You ? :-)

-----Original Message-----
From: owner-bird-users at atrey.karlin.mff.cuni.cz
[mailto:owner-bird-users at atrey.karlin.mff.cuni.cz] On Behalf Of Loschyov
Oleg
Sent: Monday, May 24, 2004 1:49 PM
To: bird-users at bird.network.cz
Subject: routing filter problems


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