D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Hostname woes



Julian Hall wrote:
Hi All,

I'm setting up NFS between my laptop (geri) and desktop (natalie). However, I can only get it to work with the IP addresses, which is a
right pain because the network uses DHCP off my Bb router.

Can't you switch off the DHCP server or tell it that certain IP addresses are reserved. If it's designed sensibly it won't attempt
to assign an IP address which is already in use on the network.



At the moment I have (for example) an NFS mount point on natalie of /home/julian, so the files are set up as:

/etc/exports
/home/julian *(rw)

You probably don't want to do that, if there is any wireless networking involved you really don't want to do that.
Something like "/home/julian 192.168.1.* (rw)" or "/home/julian 192.168.1.N (rw)"

and on geri the /etc/fstab has: 192.168.1.2:/home/julian /home/jules/nfs/desktop

This worked yesterday, in fact both machines were talking to each other
and sharing files.  However because it's using DHCP it won't work today

What IP address does natalie have currently? Most likely it isn't 192.168.1.2


after a reset, so I am trying to setup the hostnames.

on natalie the /etc/hosts file has:

127.0.0.1 natalie.tartarus localhost.localdomain localhost natalie

(all on one line)

That isn't going to help much, it's also overcomplex and will slow hostname lookups down.


the /etc/sysconfig/network-scripts/ifcfg-eth0 has:

DHCP_HOSTNAME="natalie.tartarus"

But the hostname does not survive a reboot.  I try pinging natalie or
geri and get unknown host.

It dosn't matter if it does or it dosn't, since what you are trying has no chance of working. It dosn't really matter what hostname is set on natalie, since all geri cares about is the IP address of the server.


You appear to be confusing unix hostnames with NETBIOS hostnames. Unix machines do not broadcast their hostnames to the local network. (I suppose you could install samba on both machines and have them use the WINS method.)

Any ideas gratefully received :)

Either natalie needs to have a fixed IP address or you need some kind of dynamic DNS.


The former being rather easier than the latter.

Attachment: signature.asc
Description: OpenPGP digital signature


Lynx friendly