network restart

Billy Verreynne (JW) VerreyB at telkom.co.za
Tue Jan 24 08:52:15 UTC 2006


Mike Kenny wrote:
==
I occasionally need to switch my ethernet cable to a direct (ADSL)
connection rather than going through the corporate filrewalls (or not
as the case might be :-). With windows the configuration of eth0 it
update automatically when I switch cables, with various linuxes it may
be update automatically otherwise /etc/init.d/network restart
accomplishes this action.
With Ubuntu 5.10, first there is no /etc/init.d/network, it seems to
ahve been replaced by /etc/init.d/networking and secondly this does
not bring up eth0. I am left with just lo0. A reboot with the same
cable connected brings the system up on the non-corporate n/w.

Any ideas how I can accomplish automatically or at least without
reboot?
==

ADSL usually runs over a PPPOE driver and interface Mike - which is
separate from the eth0 interface (yes the access concentrator if found
via eth0 cable, but the o/s creates a different network device in the
/dev tree for it, usually /dev/ppp0).

Conversely, you can configure multiple Internet protocol stacks on a
single interface, e.g. eth0:0 eth0:1 etc. Each additional config can
have different details.

You can also have both the eth0 and ppp0 devices up at the same time.

I'm not exactly sure what the problem is... If you want to start an
ADSL session, you use the 'pon' command, followed by the config
filename to use (this file will be /etc/ppp/peers). The 'plog' command
shows you the status (success or failure) of the ADSL connection. The
'poff' command turns it off.

So if I read this correctly you can, after unplugging the standard
network cable, down the eth0 interface as that network is no longer
reachable, e.g.
# ifdown eth0

Then you plug in the ADSL cable (which goes into the ADSL
router/modem/whatever) into the network card. Now the ADSL network can
be brought up using:
# pon adsl-provider

It would be much easier running both at the same time though and not
muck about with plugging/unplugging cables. Surely the ADSL router can
be cascaded from your existing ethernet port (cross over UTP likely
needed) - and then you run a normal UTP cable from the ADSL router
into your PC.

--
Billy

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the ubuntu-users mailing list