[plug] David's ADSL Problem

Daniel Foote freefoote at gmail.com
Fri Dec 23 09:49:44 WST 2005


>
> TO THE REST OF THE PLUG LIST:  Supposing that a modem is working and
> connected and attached to you Debian Sarge based PC via Ethernet, what would
> be the steps (1, 2, 3, 4 etc.) that you would do in an X Windows session to
> tell your computer to use 192.168.1.1 as the Default Gateway with
> transparent proxy and DNS from the modem and to ignore your dial-up
> connection and use the Ethernet instead.
>  Can some people who are more familiar with this OS than I am please post
> some really simple steps to help make the changes required.
>  This is the bit that I will still need help with from the rest of the PLUG
> list... anyone?

Er... it's probably been quiet because there is not a defined GUI way
to do this with Debian Sarge. If you had KDE installed, you might be
able to do it through that. If you had GNOME installed, you might be
able to do it through that. If you didn't have certain packages in
both cases, then it wouldn't work.

I personally edit my config files. I get away with it because I use
the machines myself and I am quite happy to get in there and edit it.
(Alright, I'll admit, I'm a command line freak in training). Also,
this is why I can use Debian, but won't recommend it to non-technical
people (unless I install, configure and support it myself). I also
don't recommend it to people with fear of a command line (or a
particular preference to eye candy, like some people I know).

(I don't know why there is Debian Sarge on this machine; and I do not
say that it is a bad choice. I assume it is there for a reason. I am
merely trying to say that Debian doesn't hand-hold at all.)

I've just had a look at a GNOME under stable, and it doesn't appear to
have a way of setting these settings. I can't speak for KDE, as it is
not installed on the machine and can not be installed at the moment
(lack of suitable internet connection).

To make this occur on Debian, you'll need a command line. An XTerm
will do, or log on to the local console (CTRL+ALT+F1 to go to VT,
CTRL+ALT+F7 to return to X).

(I am assuming here that we're working on the client having a static
IP. If DHCP was enabled on the ADSL modem, we could just use that.)

1. Become root
$ su root
Password: ******

1a. Log on as root if on local console
Login: root
Password:
#

2. Bring down eth0
# ifdown eth0

You can confirm that you need to set the gateway by setting the
interface up manually, temporarily.

3. Confirm by bringing up eth0 with a gateway (assuming host IP is .1.2)
# ifconfig eth0 address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 up

4. Try the connection to see if it works. It should at this point. If
not, something was entered wrong. Use:
# ifconfig eth0 down
before trying step 3 again.

4a. A method of testing it will be to enter the following command:
# ping 64.233.187.99
You should see lines appear, one a second, that start with:
64 bytes from 64.233.187.99...
Stop it with "CTRL+C".

(For the curious, this IP is Google, as resolved by me a few moments
ago. Yes, I know it's one of many IPs that it returns. I'm trying to
make this simple.)

4b. To save head banging, try this command:
# ping google.com
If it replies with "host not found", then you have DNS issues as well.
To fix the DNS issues, you'll have to edit /etc/resolv.conf
# pico /etc/resolv.conf
(or, if that fails:)
# nano /etc/resolv.conf
At the top of the file, add the lines:
nameserver x.x.x.x
nameserver y.y.y.y
Where x.x.x.x is the primary DNS server, and y.y.y.y is the secondary.
These are given by the ISP. (The ADSL modem might know them, too).
CTRL+O, and enter will save the file, CTRL+X will quit the editor.
Then you can retry the above ping. If that fails, you might have the
wrong addresses for x.x.x.x and y.y.y.y.

5. When working, you will have to make changes to /etc/network/interfaces
# pico /etc/network/interfaces
(or if that line fails:)
# nano /etc/network/interfaces

6. This would have started up an editor to edit the file. In the file
will be a section like this:
iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0

It may also be followed/preceeded by other lines.
After the "netmask" line, add this line:

<TAB>gateway 192.168.1.1

Where <TAB> is pressing the TAB key.

7. Save the file. To do this, press CTRL+O, and then press enter.

8. Exit the editor. Press CTRL+X.

9. Bring up the interface again.
# ifup eth0

10. Try the connection again.

11. If it doesn't work, something is not right in
/etc/network/interfaces. Once edited, it should look like this:
iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1

It will have other lines of text before it, and may have other lines
of text after it. These should not be touched.

12. Done.

As you can see, this is not easy to explain to another person, or to
have them do. For all we know, the root password might be unknown,
which means it all stops at step 1.

If you think it will help, pass it on.

Daniel.



More information about the plug mailing list