[Wylug-help] Help needed setting up server and LAN

Chris Davies MBCS chris.davies at bcs.org.uk
Fri Aug 17 21:49:04 BST 2007


Mike Goodman wrote:
> OK. That means I guessed correctly last night. However, after following 
> your instructions below, I still had to reset it to 192.168.0.1 to get a 
> working internet connection on the workstation - wire plugged in to 
> router, not to the box I am still hoping to make into a server. I could 
> ping an IP address, but not a fqdn, from a terminal.

You need interfaces on both ends of the wire (i.e. Server and Router) to be on 
the same subnet. You'll find that as soon as you change the Router's IP you 
won't be able to talk to it anymore until you've changed the Server's IP 
correspondingly.


>> ifdown eth0        # Don't worry if it says it's already down
>> ifup eth0        # This should "just work" silently
>> You should then have an interface defined for eth0, i.e. "ifconfig 
>> eth0" should show you an IP address, etc.


> On booting up, I got # login: eth1: setting full duplex based on MII#1 
> link partner capability of 4 5e1 (new line after figure 4 so I don't 
> know if there's supposed to be a space)

That's good. I hope you caught my typo in the example /etc/network/interfaces 
- the second "iface eth0 inet static" should of course have referred to "eth1" 
instead of "eth0". Sorry about that.


> Yup. ifonfig eth0 shows the IP address as set, i.e. 192.168.0.1, with 0 
> packet loss and all that.
> 
> Pinged an IP address and no packet loss. Thought it all looked good, to 
> this point.
> 
> Tried apt-get, though, and ping a fqdn and no joy with either. Is there 
> something more to do, or did I go wrong somewhere?

Lastly (!) you need to tell your Server how to resolve names to addresses. 
Because we've stopped using DHCP to assign all this, it has to be done manually.

Assuming you've gone with 192.168.0.254 as your Router's IP address, and your 
internal domain is mikegoodman.zen.co.uk, put these two lines into your 
/etc/resolv.conf (mind there's no second "e" in resolv.conf):

nameserver 192.168.0.254
search mikegoodman.zen.co.uk

If that doesn't work, replace the nameserver line with one of more lines 
containing the IP addresses of the nameservers your ISP has provided you with:

nameserver 1.2.3.4
nameserver 5.6.7.8
search mikegoodman.zen.co.uk


You should be cooking from here. When you get round to building a dhcp 
configuration file for your Server to provide DHCP details to your Clients, 
use the same nameserver entry/entries that work for the Server. Make the 
Server the default gateway for your Clients. Until you start running your own 
internal DNS you'll probably need to use a hosts file (/etc/hosts on Linux, 
somewhere under SYSTEM32 on Windows) to allow your Clients and Server to 
reference each other by name.

A typical entry in /etc/hosts is IP-address FQDN Alias1 Alias2..., e.g.

127.0.0.1	loopback			localhost

192.168.0.254	gw.mikegoodman.zen.co.uk	gw netgear
192.168.0.1	server.mikegoodman.zen.co.uk	server linux
192.168.0.11	bambi.mikegoodman.zen.co.uk	bambi
192.168.0.12	falene.mikegoodman.zen.co.uk	falene


I'm off for a fortnight. Let me know how it works and we'll take it from there 
if needed.

Chris



More information about the Wylug-help mailing list