[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Etch desktop: switching between ppp and ethernet network connections

On Thu, Feb 07, 2008 at 12:31:43AM +0200, Mikko Rapeli wrote:
> I've also tried GNOME's network-admin, but that seems to fail with ppp
> interfaces. All I get is a "Could not enable interface ppp0".

This got resolved as I had broken network profiles which replaced
working configuration files with non-working ones.

Anyway, after some testing and scratching I got this setup working
somewhat reliably on etch:

- gprs ppp options and chat scripts are working with pon and poff
- ppp0 is setup to call provider gprs in /etc/network/interfaces
- eth0 setup with DHCP in /etc/network/interfaces with post-down calling
  'ifup ppp0' when cable gets disconnected and pre-up calling 'ifdown
  ppp0' when cable is connected
- ppp0 and eth0 are not marked auto, instead ufplugd checks for the
  cable at boot time and later on
- a custom udev rule is setup to call 'ifup ppp0' when the Vodafone GPRS
  modem is plugged in, it disconnects automatically -- the rule is based
  on http://www.clasohm.com/blog/one-entry?entry_id=56856
- gnome is setup to show two network-admin applets for the user, one for
  ppp0 and one for eth0 interface, they show the state of the interface
  somewhat reliably and also show which one is actively transmissing

So to recap, udev is handling the plug-in GPRS modem and ifplugd handles the
ethernet cable, resolvconf manages name server changes. 
/e/n/interface tricks enable GPRS when ethernet cable
inserted or removed (or re-enable if lan cable is removed while modem
was already in, which takes care of the default route problem when
multiple connections are active).

Only few problems remain:

- GPRS modem can be unresponsive while udev rule is doing 'ifup ppp0'
  which shows as it replies with IP address and phony DNS server
  name, user can only re-insert the device and hope for the best, adding
  delays prior to ifup does not seem to help
- ifplugd seems a lot slower than network-manager so network changes
  take a few tens of seconds, or more if the modem was just inserted

I hope this helps someone.


Reply to: