Is it possible to manually activate an eth0 connection?

Nils Kassube kassube at gmx.net
Fri Jan 16 16:46:03 UTC 2009


Bas Roufs wrote:
> (Snip)
>
> > auto lo
> > iface lo inet loopback
> > auto eth0
> > iface eth0 inet static
> > auto eth1
> > iface eth1 inet static
> > address 192.168.1.20
> > netmask 255.255.255.0
> > gateway 192.18.1.1
> >
> > At least the last line is wrong. The gateway should be 192.168.1.1
> > (168 instead of 18) if that is really the case.
>
> The webconfigurator page of the router which I use to connect my
> computers to the ISP, reveals the following "Default Gateway":
> 82.169.255.254.  See list below. Could this be the 'gateway'
> information we are looking for?

OK, so you are using a router. The default gateway you see on the router 
page is what the router uses as it's gateway. However your laptop should 
use the router as a gateway instead.

> The  name of the device is 'Zyxel Prestige 2000 series'. It is a
> router which is the connection between my ISP and my computers. The
> router has 4 access points for RJ-45 connectors and cables.  

Thanks - that clarifies a lot.

> The 'Web 
> configurator' of this modem reveals the following technical basic
> information:
>
> LAN Information
>
> MAC Address:00:13:49:1c:ec:0a
> IP Address: 192.168.1.254
> IP Subnet Mask: 255.255.255.0
> DHCP: Server
> DHCP Start IP: 192.168.1.33
> DHCP Pool Size: 32

So your router has the IP address 192.168.1.254 which you should use as 
the gateway address for your laptop.

> DHCP Table
> ========
> Host Name: Viaconsensus1
>
> IP Address: 192.168.1.33

I suppose this is the address of your desktop because you couldn't reach 
the router with your laptop. The address 192.168.1.20 for your laptop 
should be OK.

> However, I am not really sure whether the RJ-45 access point of my
> laptop is adequate. That is why, I also examine another way I can use
> this cable: to connect it to a ethernet PCMCIA card, with a special
> ethernet RJ45 interface. This results in a connection 'eth1' according
> to both KNETWORKMANAGER and pppoeconf. According to KNETWORKMANAGER,
> the connection status of eth1 at the laptop is 'active' now. However,
> the pppoeconf test for eth1 also fails. Also via a browser, I do not
> manage yet to reach internet from the laptop.

As I understand your setup you don't need pppoeconf on the laptop. The 
router manages the connection to your ISP and you only setup the laptop 
for a LAN connection. If you want to keep the static setup your 
file /etc/network/interfaces should look like this:

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.254

Please note: Now there is no entry for eth0, so you should connect the 
router to the eth1 interface. After changing the file you should restart 
networking with the command

sudo /etc/init.d/networking restart

and then try to ping your router with this command:

ping 192.168.1.254

It should give an output similar to this:

PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
64 bytes from 192.168.1.254: icmp_seq=1 ttl=64 time=0.352 ms
64 bytes from 192.168.1.254: icmp_seq=2 ttl=64 time=0.640 ms
64 bytes from 192.168.1.254: icmp_seq=3 ttl=64 time=0.348 ms

You can stop the command with Ctrl-C. Then you could check if you can 
reach some server at the internet.

But if the output of the ping command is more like this:

PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
From 192.168.1.20 icmp_seq=1 Destination Host Unreachable
From 192.168.1.20 icmp_seq=2 Destination Host Unreachable
From 192.168.1.20 icmp_seq=3 Destination Host Unreachable

Then the connection to your router doesn't work for some reason.


Nils




More information about the ubuntu-users mailing list