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

Alex Nordstrom lx at se.linux.org
Fri Sep 30 00:56:58 WST 2005


Thursday, 29 September 2005 23:53 skrev simon:
> Lee Jamieson (leejam at gmail.com) wrote:
> > 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.

<snip>

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

That looks like Geemail being silly and clobbering the plaintext version 
when sending messages with mime HTML garbage attached. Yet another 
reason to turn off the noise generation misfeature.

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

Not in Debian and derived distros (such as Ubunubununtu). There, it's 
normally /etc/network/interfaces, which has a different format 
altogether. See 'man 5 interfaces'. This is used by ifup and ifdown, 
which are probably run at boot.

Lee, before you get into modifying that, it may be nice to get things 
working solidly manually, though, and understanding what you did to 
make it work, so you know exactly what to put there.

Find out if you want static routing or dynamic assignment using DHCP. 
The latter is usually easier to work with, but requires a router 
capable of and configured to assign IP addresses and other network 
details as requested.

If you want static routing, find out what IP address and subnet mask you 
should use to fit into your LAN configuration. Then as root (or using 
sudo), do something like:

ifconfig eth0 up 192.168.0.2 netmask 255.255.255.0
route add default gw 192.168.0.1

Assuming you want the IP address 192.168.0.2, the subnet mask 
255.255.255.0, and use 192.168.0.1 as your gateway. Consult your 
router's configuration for details on suitable numbers. The IP address 
should be unique to your LAN and the mask should be the same for the 
whole LAN. The above commands are reasonably well-documented in the man 
pages.

This should be enough to let you ping IP addresses locally on the 
internet. Try pinging your router, then another box on the network, 
then 216.239.37.99, which is Google.

If that works, try pinging a domain name, like google.com. If it doesn't 
work, you may have to edit /etc/resolv.conf to include the IP address 
of your ISP's DNS server. Consult 'man 5 resolv.conf' for details on 
its format.

(Alternatively, you may want to run a DNS server locally, which has some 
advantages. To do this, install the bind9 package using aptitude. This 
is by no means required.)

When things work, you may wish to incorporate this 
in /etc/network/interfaces.

As an alternative to the above, you may, as mentioned, run DHCP. Make 
sure your router is configured to provide DHCP services, and install 
the dhcpcd (DHCP client daemon) package. Marvel at how easy that was.

(If you did opt for DHCP *and* you want to run a local DNS, you may find 
that dhcpcd prefers the nameserver provided by the DHCP server (often 
itself). To override this, edit /etc/dhclient.conf and restart the 
client daemon.)

-- 
Alex Nordstrom
http://lx.n3.net/
Please do not CC me in followups; I am subscribed to plug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20050930/b2209075/attachment.pgp>


More information about the plug mailing list