add "src" attribute to kernel route

Alexander Zubkov green at qrator.net
Tue Jan 22 09:47:50 CET 2019


Hi,

Yes, it is possible. Take a look at the docs:

https://bird.network.cz/?get_doc&v=16&f=bird-6.html#rta-krt-prefsrc

On Tue, Jan 22, 2019 at 9:41 AM Volodymyr Litovka <doka.ua at gmail.com> wrote:
>
> Hi colleagues,
>
> in Linux it is possible to specify source IP address for all packets
> with undefined this field, like:
>
> root at n1:~# ip route
> 10.0.0.0/24 dev eth1 proto kernel scope link src 10.0.0.1
> 10.1.0.2 via 10.0.0.2 dev eth1 src 10.1.0.1
>
> using the command
>
> root at n1:~# ip route add 10.1.0.2/32 src 10.1.0.1 nexthop via 10.0.0.2
> dev eth1
>
> (note "src" parameter)
>
> This configuration instructs kernel to assign specified source address
> for all outgoing packets which travel to specified destination, if
> source address in the packet is unspecified. This quite important in
> order to provide reliability for applications which can't specify source
> IP address. in general, for such apps Linux chooses IP address of
> outgoing interface and, when this interface gone, all sessions go away
> as well since they're binded to interface's address. If I will be able
> to assign Loopback address, I will always have sessions active
> regardless of physical interfaces' state.
>
> Whether it's possible to configure Bird (We're using 1.6 on Ubuntu 18)
> in same way - when installing routes into the kernel, add "src"
> parameter like in the example above?
>
> Thank you.
>
> --
> Volodymyr Litovka
>    "Vision without Execution is Hallucination." -- Thomas Edison
>


More information about the Bird-users mailing list