[NTLUG:Discuss] routing to temp dial up connection and permanent connection
Stephen Klein
jaguar at cyberramp.net
Sun May 14 03:34:57 CDT 2000
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).
Just a note: double check any network settings (IP addresses and
netmasks), most likely at least one thing will be wrong (statistics you
know ;P). I do remember a little bit from my time as a contractor (DFW
computer technician) at DMOS4/5 however.
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
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?
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.
>
> --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.
>
> --
> seth daniel | Texas Instruments DMOS4/5
> seth at ti.com | Automation Engineering
>
> _______________________________________________
> http://ntlug.org/mailman/listinfo/discuss
Hope I was at least a little help,
Stephen
p.s. I apologize if something I said makes little or now sense, like I
said, I need some sleep badly.
<Zzzzzzzzzzz>
More information about the Discuss
mailing list