[PLUG] Networking problem. (warning, newbie alert)

simon simon at plumtek.com
Thu Sep 29 23:53:08 WST 2005


Lee Jamieson (leejam at gmail.com) wrote:
>
> Hiya all...
>
> I'm using Ubuntu Breezy and am having a whole stack of problems getting my
> network to run. I have a Windows box and my gateway, connected to a ISDN. I
> have a 8 port switch and 2 NIC's in my linux box.
>
> I have got the network cable plugged into eth0.
>
> I have done some searching on the net and came up with a variety of commands
> that give me a whole heap of information, but I know nothing about how it
> interpret it.
>
> Here is the output from these commands that I found:
>
> lee at kubuntu:~$ sudo dhclient eth0

You are asking the dhcp client to get an IP from a dhcp server on your
network.

> Password:
> There is already a pid file /var/run/dhclient.pid with pid 0
> Internet Systems Consortium DHCP Client V3.0.2
> Copyright 2004 Internet Systems Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/products/DHCP
> sit0: unknown hardware address type 776
> sit0: unknown hardware address type 776
> Listening on LPF/eth0/00:0a:eb:9e:04:ee
> Sending on LPF/eth0/00:0a:eb:9e:04:ee
> Sending on Socket/fallback
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 4
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 5
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 13
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 15
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 11
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 10
> DHCPDISCOVER on eth0 to 255.255.255.255 <http://255.255.255.255> port 67
> interval 3
> No DHCPOFFERS received.

You dont have a DHCP server.

> No working leases in persistent database - sleeping.
> lee at kubuntu:~$ ifconfig eth0

Youre asking for the config of your ethernet card,

> eth0 Link encap:Ethernet HWaddr 00:0A:EB:9E:04:EE

Thats the MAC address

> inet6 addr: fe80::20a:ebff:fe9e:4ee/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:94 errors:0 dropped:0 overruns:0 frame:0
> TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:13249 (12.9 KiB) TX bytes:32868 (32.0 KiB)
> Interrupt:11 Base address:0xec00
> lee at kubuntu:~$ dmesg | grep eth0
> lee at kubuntu:~$ sudo ifconfig eth0 192.168.0.50 <http://192.168.0.50>

Dunno what the http stuff is about, but youre assigning 192.168.0.50 to your
ethernet card.

> lee at kubuntu:~$ ping 192.168.0.1 <http://192.168.0.1>
> PING 192.168.0.1 <http://192.168.0.1> (192.168.0.1 <http://192.168.0.1>)
> 56(84) bytes of data.
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=1 ttl=128 time=
> 0.319 ms
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=2 ttl=128 time=
> 0.314 ms
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=3 ttl=128 time=
> 0.310 ms
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=4 ttl=128 time=
> 0.338 ms
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=5 ttl=128 time=
> 0.339 ms
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=6 ttl=128 time=
> 0.308 ms
> 64 bytes from 192.168.0.1 <http://192.168.0.1>: icmp_seq=7 ttl=128 time=
> 0.322 ms
> --- 192.168.0.1 <http://192.168.0.1> ping statistics ---
> 7 packets transmitted, 7 received, 0% packet loss, time 5999ms
> rtt min/avg/max/mdev = 0.308/0.321/0.339/0.020 ms

Hooray! It works!

> lee at kubuntu:~$ping www.google.com <http://www.google.com>
> ping: unknown host www.google.com <http://www.google.com>

It cant resolve www.google.com - you probably dont have DNS setup.

> lee at kubuntu:~$ dig @192.168.0.1 <http://192.168.0.1>
> ubuntu.com<http://ubuntu.com>
> ; <<>> DiG 9.3.1 <<>> @192.168.0.1 <http://192.168.0.1>
> ubuntu.com<http://ubuntu.com>
>
> ; (1 server found)
> ;
> ; global options: printcmd
> ;; connection timed out; no servers could be reached
> lee at kubuntu:~$

Nope, no DNS (on your win box)


>
> Pinging from my xp box to linux
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\AdministratorLee>ping
> 192.168.0.50<http://192.168.0.50>
>
> Pinging 192.168.0.50 <http://192.168.0.50> with 32 bytes of data:
>
> Reply from 192.168.0.50 <http://192.168.0.50>: bytes=32 time<1ms TTL=64
> Reply from 192.168.0.50 <http://192.168.0.50>: bytes=32 time<1ms TTL=64
> Reply from 192.168.0.50 <http://192.168.0.50>: bytes=32 time<1ms TTL=64
> Reply from 192.168.0.50 <http://192.168.0.50>: bytes=32 time<1ms TTL=64
>
> Ping statistics for 192.168.0.50 <http://192.168.0.50>:
> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
> Approximate round trip times in milli-seconds:
> Minimum = 0ms, Maximum = 0ms, Average = 0ms
>
yay! it still works! :)

> C:\Documents and Settings\AdministratorLee>
>
>
> After that I rebooted my linux box and now I can't access the network
> anymore. I have no idea what I am doing now.

You didnt make the IP permanent.

I dont know specifically about ubuntu, but have a sniff around
/etc/sysconfig/network-scripts. You might find a file in there called
ifcfg-eth0 or similar. Here's one of mine:

[simon at web simon]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.3
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=yes

This is where you can set the IP if you dont want to setup a DHCP server (I
have a DHCP server but I dont ever want this IP to change so I made it static,
its on my webserver).

Notice the gateway isnt set? Thats in /etc/sysconfig/network.

[simon at web simon]$ cat /etc/sysconfig/network
HOSTNAME=web.silan.plumtek.com
NETWORKING=yes
GATEWAY=192.168.1.1

192.168.1.1 is my gateway box, with pppoe running on it. These config files
(/etc/sysconfig/network etc) are read by the boot scripts in /etc/rc.d/init.d,
and they get the values and set everything up, probably doing the exact same
thing as you did manually.... for example, when you did 'ipconfig eth0
192.168.0.50' you were setting the IP address on the card - the boot script
will read the IPADDR value from /etc/sysconfig/network-scripts/ifcfg-eth0 and
probably run exactly that.

>
> I am sure that my gateway is 192.168.0.1 <http://192.168.0.1> - that's the
> xp box - so why is "DHCPDISCOVER on eth0" to
> "255.255.255.255<http://255.255.255.255>"?

255.255.255.255 is what they call a broadcast address. The dhcp client doesnt
know the IP of the DHCP server, so its like a shoutout to all computers asking
if anyone can respond to a DHCP request. Nothing responded.

> Have I not set the gateway somewhere?

See above.

>
> I don't know what to do.

Join the club :) Excuse any typos or lameness, Im knackered.

--
=================
Simon Scott
simon at plumtek.com
mob: 0409113359
=================






More information about the plug mailing list