Re: preserving l2tp
Roy Marples
Fri Dec 31 13:41:35 2010
On Fri, 2010-12-31 at 15:04 +0200, Niv Wiser wrote:
> I think I've solve the default route issue, please see below. however I
> still seek two answers:
> 1. ISP default route, when eth0 comes up I it to have access to the
> internet even before l2tp was achieved. so I added this line to the
> postup() in /etc/conf.d/net:
> ip ro | grep -q default || ip ro add default via $WAN_GW
> is this the right way? wont it be better to solve this in the dhcpcd
> scripts, using the reason var?
I think you're going about things the wrong way.
I would assume that l2tp would give a default route if none present
correct? And this would take precedence. dhcpcd will give *all* it's
routes a metric, so when the l2tp default route comes up it will be used
and when it's down the dhcpcd default route will work.
Does this satisfy you?
> 2. ISP DNS servers, before l2tp is established I want to use the ISP dns
> servers, yet I use "-C resolv.conf" to prevent it overwriting the l2tp
> dns servers info.
I also make a package called openresolv (resolvconf clone) which manages
DNS information from multiple sources. dhcpcd supports resolvconf out of
the box. Install that and integrate l2tp with resolvconf.
Thanks
Roy
Archive administrator: postmaster@marples.name