eth0 and ppp0: how to setup routing?
Hi,
I have both a 3COM Etherlink III (device eth0) and a standard 28.8K
modem (device ppp0). I used the Etherlink III (connected to the network
at the office) to download and install Debian Hamm. This goes really
fast, so I want to keep the network setup I made during the install for
major upgrades of Debian in the future.
At home I can only use the modem. I used pppconfig to setup dialup PPP,
but I've run into this problem: pppd will not replace the existing
default route. I checked the PPP-HOWTO, which tells me that the default
route is already pointing at the eth0 device. A "route add default..."
command in the system's startup scripts is responsible for this. I found
this command in /etc/init.d/network:
#! /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=[deleted]
NETMASK=255.255.255.0
NETWORK=[deleted]
BROADCAST=[deleted]
GATEWAY=[deleted]
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
My primitive solution was to comment out the GATEWAY= line.
This works, but only partially. I am able to connect to hosts using
ppp0, but I can only connect to hosts which are *not* part of the domain
at the office. It seems that routing to these hosts is still going
through the eth0 device.
I really want to be able to connect to hosts at the office using ppp0,
since I often transfer files between home and the office. Can anyone
tell me how to solve this situation, preferably in such a way that the
eth0 configuration is still intact (to retain a "plug&play" ethernet
connection when I'm at the office)?
Thank you,
Ruud Janssen
Reply to: