Hi all,
I am trying to connect a Hard-Disk-installed Knoppix (which is said to be a true Debian unstable/testing) via PPPoE / DSL. The system acts as a router for a private local network. DSL is connected via eth1 / ppp0, LAN via eth0. I keep the connection up all the time but get disconnected by my provider once a day (dynamic IP address).
Symptom: After successfully establishing the DSL connection the routing table looks like this:
access1-dsl-m.n * 255.255.255.255 UH 0 0 0 ppp0
127.0.0.1 * 255.255.255.255 UH 0 0 0 lo
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
The first entry is automatically added by (I guess) pppd when bringing the DSL connection up. "access1-dsl-m.n" is the provider's accesss point.
Problem:
The first entry should rather look as follows for my system to work:
default * 0.0.0.0 U 0 0 0 ppp0
When entering this route thru the console, everything works fine. Unfortunately I don't know how to integrate this into my start scripts in an intelligent way. During boot, the init script calls ifup, which in turn reads /etc/network/interfaces. So the first idea was to modify this file, e.g. as follows:
...
auto eth1
iface eth1 inet ppp
up pppd call dsl-provider
up route add default dev ppp0
down route del default dev ppp0
down ifconfig ppp0 down
...
This didn't work:
- pppd call dsl-provider is called by another start script in the boot process, so it would have been called twice during boot.
- The dsl-provider conf-file contains a "defaultroute" directive, so there should be no need to add a default route at all
- Further, I am not really sure, wether ifup / ifdown is called in case of a connection breakdown / reconnect.
Second idea was to modify the ppp start script directly, e.g. adding the default route statement directly after pppd call dsl-provider. For reasons unknown to me, this didn't work, too.
Why doesn't the "defaultroute" directive in /etc/ppp/peers/dsl-provider work as expected ?
What is the recommended way to set up a default route to a ppp target which may go down temporarily?
Thank you for your help in advance
Thomas