[SWLUG] hopefully easy question: naming machines on a tiny network
P.G. Richardson
p.g.richardson at phantomjinx.co.uk
Wed Jun 3 07:16:13 UTC 2009
You want to give each machine a static ip address instead of using a dhcp
server to request the address from the router. You don't mention your
distro but most mainstream distros will have some system administration
gui that will make this fairly straightforward to change.
Once you have static IP addresses you can enter hostnames into the file
/etc/hosts. Again, there is normally a gui tool that allows you to do this
for the likes of Fedora, Mandriva and probably Ubuntu. The file is simply
in the form:
#IP address HostName
192.168.1.1 myrouter
192.168.1.2 mydesktop
192.168.1.3 mylaptop
192.168.1.4 mywifeslaptop
Once the file has been saved, you can check if it works by pinging each
host by ip address and by name, eg.
open terminal (such as Konsole)
type ping <ip address> or type ping hostname
PGR
> Hi,
>
> I have a BT Voyager router (a few years old) & 3 machines. The router
> always gives the machines the IP addresses 192.168.1.2, 192.168.1.3, and
> 192.168.1.4. But not always the same number to the same machine. Is it
> possible to tie each IP address to a particular machine (and ideally to
> use names)? Two machines run Linux the other Mac OS X.
>
> I am not terribly good at sysadmin as you can guess...
>
> Thanks!
>
> --
> Mark Summerfield, Qtrac Ltd, www.qtrac.eu
> C++, Python, Qt, PyQt - training and consultancy
> "C++ GUI Programming with Qt 4" - ISBN 0132354160
>
> _______________________________________________
> SWLUG Discussion List - Discuss at swlug.org
> http://swlug.org/mailman/listinfo/discuss
>
--
Laws are partly formed for the sake of good men, in order to instruct them
how they may live on friendly terms with one another, and partly for the
sake of those who refuse to be instructed, whose spirit cannot be subdued,
or softened, or hindered from plunging into evil. [The Laws, Plato]
You fiend! Never have I encountered such corrupt and foul-minded
perversity
Have you ever considered a career in the church?
Bishop of Bath and Wells (Blackadder II)
A clear conscience? When did you acquire such luxuries, Bernard? (Sir
Humphrey, Yes Prime Minister)
More information about the Swlug
mailing list