FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-06-2008, 08:01 PM
Mikko Rapeli
 
Default Etch desktop: switching between ppp and ethernet network connections

Ok, I think I've tried everything but I can't get automation and
userfriendlyness into etch based networking, so I'm asking for help.

How to setup ppp/gprs modem connection and ethernet/dhcp in etch so that:

- ethernet connection is used when cable is plugged in and dhcp client
finds a lease,
- ppp/gprs modem connection is used as backup when ethernet is not
available, and most important bit,
- gnome desktop user has some idea which connection is in use (and possibly
can manually switch from ethernet to ppp/gprs, and back)

I can't get network-manager working like described. I have ppp
connection setup and working with pon/poff and configured in
/etc/network/interfaces. Ethernet connection is not setup, so
network-manager should manage it by default. Two problems remain.

One: at boot network-manager does not discover that ethernet cable is not
connected, and thus zero conf kicks in and ethernet seems active. A
round of networking disable and enable does help and now cable is not
found and interfaces remains down. User is confused.
This happens on a HP Omnibook XE3 with a ADMtek Comet rev 17 ethetnet chip.

Second: ppp and network-manager don't work well. It's ok to enable and
disable the ppp interface from the GUI, but it sucks that it doesn't
show anything like 'Connected' status when PPP connection is active.
User is very confused.

gnome-ppp is a bit complicated and it doesn't work with the system wide
ppp settings, which work and which the user can not accidentally screw
up.

ifplugd and automatic ppp setup work, allmost, but lack a gui in gnome.
They work if eth0 is not set as auto while ppp is set as auto. Then ifplugd is
configured to poll the eth0 device. At boot ppp is setup. If cable is
later plugged, ifplugd activates eth0. When cable is unplugged only
/etc/resolv.conf is hosed since the ppp0 stayed up all the time. I hope
I can fix this with resolvconf, although I've had bad experiences with it
in unstable some years ago. But the problem of a missing GUI remains. Is
there some that I've missed?

Long story, but I hope someone knows better...

-Mikko


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-06-2008, 09:31 PM
Mikko Rapeli
 
Default Etch desktop: switching between ppp and ethernet network connections

On Wed, Feb 06, 2008 at 11:01:27PM +0200, Mikko Rapeli wrote:
> gnome-ppp is a bit complicated and it doesn't work with the system wide
> ppp settings, which work and which the user can not accidentally screw
> up.

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".
Somehow 'ifdown eth0 && ifup ppp0' and 'ifdown ppp0 && ifup eth0' work
on command line. Except 'ifup ppp0' doesn't provide feedback if
something goes from with the ppp setup like it often goes with these
GSM/GPRS thingies.

> ifplugd and automatic ppp setup work, allmost, but lack a gui in gnome.
> They work if eth0 is not set as auto while ppp is set as auto. Then ifplugd is
> configured to poll the eth0 device. At boot ppp is setup. If cable is
> later plugged, ifplugd activates eth0. When cable is unplugged only
> /etc/resolv.conf is hosed since the ppp0 stayed up all the time. I hope
> I can fix this with resolvconf, although I've had bad experiences with it

Indeed, resolvconf works as I thought with ppp and ethernet devices.

-Mikko


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-14-2008, 11:05 AM
Mikko Rapeli
 
Default 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
data

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 0.0.0.0 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.

-Mikko


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 01:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org