ppp
ppp copied to clipboard
Add VRF binding support
Hi Paul,
I am one of the mainters of VyOS an open source, Linux (Debian) based network operating system. We utilize pppd to provide dial-up (pppoe) connections for the users. We have added VRF support in our upcoming 1.3 release by using ip-up/ip-down scripts to move an interface into the appropriate VRF - that somehow works but could be nicer.
Why?
The flakyness now comes into play when routes should be installed by pppd, pppd will always install the route into the main routing table - no problem - we can workaround this in an ip-up/down helper, too.
Feature Request
Could a new configuration item named vrf be added into the peer configuration file? If that vrf is defined, and the vrf exists, pppd can then automatically assign the interface into the appropriate VRF without the need for additional external helpers.
@paulusmack, @enaess: What do you think?
Sounds reasonable. Do you have a patch?
I do not have a patch but I would provide one. As I am not familiar with the codebase maybe you can point me to the file which needs to be extended.
- I would implement this only for Linux
- I would name the config option for the peer file
vrfwhich defaults tomasterwhich is the Linux default. - VRF assignment must be done prior to installing routes, as they nedd to go into the appropriate VRF.
From https://www.kernel.org/doc/Documentation/networking/vrf.txt
Applications
------------
Applications that are to work within a VRF need to bind their socket to the
VRF device:
setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);
@c-po: Have you looked?
Hi @Neustradamus,
I have workarounded the issue by calling a custom script which does all the VRF handling once the interface was dialed. IMHO not that nice but it works