[NTLUG:Discuss] routing to temp dial up connection and permanent connection

Seth Daniel seth at ti.com
Sun May 14 09:33:31 CDT 2000


Stephen,

On Sun, May 14, 2000 at 03:34:57AM -0500, Stephen Klein wrote:
> I'll see if I can at least point you in the right direction.  I know
> what needs to be done, but I just can't think of how to do it (someone
> please help here) in a proper fashion.  I'm a little short on sleep
> right now, sorry (soon to be rectified).

No problem.  :o)

> 
> Seth Daniel wrote:
> > 
> > All,
> > 
> > I have a permanent connection to the internet via ADSL.  I also dial-in
> > occasionally to work using a 56k modem w/ ppp.
> > 
> > Whenever I have to dial-in I need to take down my eth0 interface otherwise
> > the routing becomes messed up.  My question is this: how do I have this
> > temporary dial-up *and* still be able to access the outside world through the
> > DSL while I'm dialed up?
> > 
> > Something related to this is the pppd usepeerdns option.  From what I can tell
> > it makes a backup of /etc/resolv.conf and then proceeds to make a new resolv.conf
> > file with the dns ip numbers for the dial-up.  Is there anyway to tell pppd to
> > append this information to the current resolv.conf?  Otherwise I'll need to make
> > some script which does this for me.
> > 
> > Pertinant info:
> > --this is the routing before I dial-up:
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> > 10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
> > 0.0.0.0         10.0.0.1        0.0.0.0         UG    1      0        0 eth0
> > 
> > --this is the routing after dial-up if I have not brought down eth0
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> > 192.168.134.1   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
> > 10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
> > 0.0.0.0         10.0.0.1        0.0.0.0         UG    1      0        0 eth0
> 
> 
> You have a route entry for the ppp dialup server (put there by pppd),
> now you need an entry for TI's internal network.  At the moment I can't
> think of how to do set it up upon dialup (need sleep), but you should be
> able to do it manually with the command:
> 
> route add -net 192.0.0.0 netmask 255.0.0.0 gw 192.168.134.1 ppp0

True, but I am looking for an automatic way to do all of this in case
it ever changes in the future.

> I have no way of testing this at the moment, so it may or may not work. 
> If you're dialing up via script, and the gateway always has the same IP
> address, you can just insert this command into the script as a temporary
> hack (remember to do a "route del -net 192.0.0.0" when you disconnect). 
> I'm not sure how to do it if you're using a dialer prog. like KPPP, but
> I'm sure there's a way.  Does someone else know?

I use Debian so I used pppconfig to configure everything and then I use
pon and poff to dial-up/connect.

> You might check the IP-Subnetworking HOWTO at
> http://www.linuxdoc.org/HOWTO/mini/IP-Subnetworking.html, and other
> related documents at linuxdoc.org (and other places which I can't
> remember).  Also, I know it's kinda redundant, but check the man pages
> on route and pppd, you never know what you'll find a second time.

I'll check out the HOWTO.  I had initially looked at the routing and
networking HOWTO, but I couldn't find anything relevant.

> 
> > 
> > --relavent pppd options
> > defaultroute
> > noipdefault
> > usepeerdns
> 
> Probably the only pppd option you should use in this case would be
> "nodefaultroute".
> You should experiment with different options for pppd, try and see what
> works and what doesn't.

I'll try it out.

> Hope I was at least a little help,
> Stephen

Thanks for delaying sleep to answer my questions!
-- 
seth daniel  |  Texas Instruments DMOS4/5
seth at ti.com  |   Automation Engineering




More information about the Discuss mailing list