From: laredotornado on
Hi,

I'm using Mac 10.6.3. My IP is assigned through DHCP, so it changes
periodically. There are some other machines on my network that need
to access my machine, and so I was wondering if there is a way to
configure my /etc/hosts file to contain an entry for

davemachine xx.xx.xx.xx

where "xx.xx.xx.xx" is the IP address assigned to my machine. Anyone
have an elegant way to do this?

Thanks, - Dave

From: Warren Oates on
In article
<7315f846-9c01-485e-957c-a5e1ad6f49c5(a)w12g2000yqj.googlegroups.com>,
laredotornado <laredotornado(a)zipmail.com> wrote:

> I'm using Mac 10.6.3. My IP is assigned through DHCP, so it changes
> periodically. There are some other machines on my network that need
> to access my machine, and so I was wondering if there is a way to
> configure my /etc/hosts file to contain an entry for

Do you have control over the DHCP assignments? If so, most routers allow
you to "reserve" DHCP addresses, so that davemachine will always have
the same IP address.
--
Very old woody beets will never cook tender.
-- Fannie Farmer
From: Wes Groleau on
On 06-25-2010 12:19, laredotornado wrote:
> I'm using Mac 10.6.3. My IP is assigned through DHCP, so it changes
> periodically. There are some other machines on my network that need
> to access my machine, and so I was wondering if there is a way to
> configure my /etc/hosts file to contain an entry for
>
> davemachine xx.xx.xx.xx

Most routers will accept static IP on the internal LAN.
All of my family's devices, including iPhones, other phones,
iPods, video games, have fixed IPs and entries in all the
computers' hosts files.

This made certain firewall settings, caching web proxy,
and internal DNS much easier to set up.

--
Wes Groleau

Semantic technologies
http://Ideas.Lang-Learn.us/WWW?itemid=97
From: Tom Harrington on
In article
<7315f846-9c01-485e-957c-a5e1ad6f49c5(a)w12g2000yqj.googlegroups.com>,
laredotornado <laredotornado(a)zipmail.com> wrote:

> Hi,
>
> I'm using Mac 10.6.3. My IP is assigned through DHCP, so it changes
> periodically. There are some other machines on my network that need
> to access my machine, and so I was wondering if there is a way to
> configure my /etc/hosts file to contain an entry for
>
> davemachine xx.xx.xx.xx
>
> where "xx.xx.xx.xx" is the IP address assigned to my machine. Anyone
> have an elegant way to do this?

In addition to the other comments about statically assigned IP
addresses-- don't forget about Bonjour's automatic local machine naming.
If you have a Mac named "devmachine" on your LAN, it can be addressed as
"devmachine.local" from any other Mac on the network (maybe
Windows/Linux too, don't know) regardless of what IP address it gets.

--
Tom "Tom" Harrington
Independent Mac OS X developer since 2002
http://www.atomicbird.com/
From: JF Mezei on
laredotornado wrote:
> Hi,
>
> I'm using Mac 10.6.3. My IP is assigned through DHCP, so it changes
> periodically. There are some other machines on my network that need
> to access my machine, and so I was wondering if there is a way to
> configure my /etc/hosts file to contain an entry for


Populating your /etc/hosts file won't magically allow other nodes on the
lan to access your machine by name.

HOWEVER, if the DHCP interfaces to the DNS server for dynamic updates,
it then becomes possible for a DNS entry to be maintained by the DHCP
server for the duration of your DHCP lease.

Another possibility is to get your system manager to give you a fixed Ip
address via DHCP. This way, a fixed entry in the DNS server can be made
to point to your IP address.

Either way, this must be accomplished via the DNS server, not your
/etc/hosts file.