[SWLUG] hopefully easy question: naming machines on a tiny network

Neil Greenwood neil.greenwood.lug at gmail.com
Wed Jun 3 07:23:22 UTC 2009


2009/6/3 Mark Summerfield <mark at qtrac.eu>:
> 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!

Hi Mark,

I'm not familiar with the BT Voyager router, but what you need to look
for in its administration pages is 'Static DHCP Allocation' or
something like this.

I'll give a quick outline of how DHCP (Dynamic Host Configuration
Protocol) works - this is how the machines request an IP address from
the router. When the machine boots, it sends a broadcast message on
the LAN asking if anyone gives out IP addresses. The router responds
to this, then the machine sends another message to the router asking
for an address. The router responds with an address that it allocates
from its list - this might be arbitrary, or you can give it
instructions on which one to pick.

The message the machine sends to the router includes something called
the MAC or hardware address. The MAC is a string of 12 hex digits, and
can be represented in a number of ways, e.g. 00-1A-A0-64-B0-70 or
00:1A:A0:64:B0:70 or even 001AA064B070. You can find the machines' MAC
addresses by typing 'ifconfig' in a terminal on Linux - not sure on
Mac OS X, but try the same command.

In the Static DHCP page, you can then enter the machine's MAC address
and assign a fixed IP address to it. The best^H^H^H^Heasiest way to
give the machines names is to add them to /etc/hosts on all the
machines - easy enough when you only have 3 machines, but DNS was
invented to solve this problem for large numbers of machines.

HTH. Any questions?

Cofion,
Gneel.



More information about the Swlug mailing list