My Linux will get dynamic route entries from neighbor routers sent by RIPv2 advertisement. My Linux is running Qugga and the advertising routers are Cisco on which I have no control.

I will get a route like below automatically inserted into the route table: via dev gre1 proto zebra metric 20

What I need to do is to add a 'src' component to the auto etnry to make it something like: via dev gre1 proto zebra metric 20 src an-addr-other-that-gre1.

The question is, how do I automatically do it anytime when the new route was inserted? Does Quagga config support to do? Or, otherwise, another general mechanism allows me to do it independent to Quagga?

Thanks! woody


Seems like there isn't a way to do it with Quagga. Src attribute of route specifies the source address of local originated packets, those are being sent by this route. Same behaviour you can implement with iptables and nat rule, but it requires the conntack, what will impact the performance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.