static routes and 'src' parameter

Saku Ytti saku at ytti.fi
Tue Mar 20 19:44:50 CET 2018


Pilot error, this works:

filter kernel_out {
  if net = 0.0.0.0/0 then {
    #krt_prefsrc from lo;
    krt_prefsrc = 129.250.15.29;
    accept;
  }
  reject;
}

I wish 'krt_prefsrc from lo' would work, as it would require less
tooling to generate config :>. But no biggy. Thanks people!


On 20 March 2018 at 20:22, Saku Ytti <saku at ytti.fi> wrote:
> I want default address to use lo as source for locally originated
> connections. Is this possible?
>
> bird> show route
> 0.0.0.0/0          via 204.141.224.2 on ens224 [static1 18:11:50] * (200)
> 129.250.15.29/32   dev lo [direct1 18:11:50] * (240)
> 129.250.0.0/16     via 204.141.224.2 on ens224 [red 18:17:38] * (100) [AS2914i]
>                    via 204.141.224.0 on ens192 [blue 18:11:56] (100) [AS2914i]
> bird>
>
> protocol static {
>   route 0.0.0.0/0 recursive 129.250.0.0;
> }
>
> terraform00:~# ip route
> default via 204.141.224.2 dev ens224 proto bird metric 64
> default via 204.141.224.0 dev ens192 src 129.250.15.29 metric 200
> default via 204.141.224.2 dev ens224 src 129.250.15.29 metric 205
> 10.20.40.0/24 dev ens256 proto kernel scope link src 10.20.40.1
> 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
> 204.141.224.0/31 dev ens192 proto kernel scope link src 204.141.224.1
> 204.141.224.2/31 dev ens224 proto kernel scope link src 204.141.224.3
> terraform00:~#
>
>
> --
>   ++ytti



-- 
  ++ytti


More information about the Bird-users mailing list