send a host name with DHCP request?

mac

send a host name with DHCP request?

Postby georg.schwarz » Fri, 23 Sep 2005 07:59:59 GMT

Can Mac OS 10.4 be configured to send a fixed host name with a DHCP
request? Does it support /etc/dhcp.conf, as other Unix systems?

-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby Troubled Tony » Sat, 24 Sep 2005 22:42:56 GMT



Send it in response to what exact query?

I think it's possible to stuff arbitrary info into DNS,
but you'd have to explicitly query for it.

I now punt to anyone else.

Re: send a host name with DHCP request?

Postby georg.schwarz » Sun, 25 Sep 2005 01:02:33 GMT






send it not in repsonse but as a part of the DHCP client query.


I do not want the dhcp server to sent that information, instead I want
the Mac as a dhcp client to send it as part of its dhcp query.
With *BSD and Linux systems there is or can be created a file
/etc/dhclient.conf which would then contain a line like this:

send host-name "mymac";
 
man dhclient.conf on these systems gives further information.
Is a similar mechanism suppotted with MacOS?
Maybe it even uses the same dhcp client code?
-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby clvrmnky » Sun, 25 Sep 2005 01:51:25 GMT






I'm reasonably sure that Macs send such a string by default.  My DHCP
server associates an IP address with the ethernet address and tells
named to add records associating the host with that IP address so DNS
works.  Of course, you can always setup DHCP to give out the same,
static address to such a host.  I suspect this is what you are trying to
get working...?

It appears to use the "hostname" value when talking DHCP.  That is, it
does not appear to need the DHCP Client ID value set, which we leave
blank in my home network.

Re: send a host name with DHCP request?

Postby Simon Slavin » Sun, 25 Sep 2005 06:42:04 GMT


<1h39mpb.116vly11kjembeN% XXXX@XXXXX.COM >:
 

What ?  That makes no sense.  At the point when it's looking for a DHCP
assignment it doesn't know any host names.

Simon.
-- 
 http://www.**--****.com/ 

Re: send a host name with DHCP request?

Postby georg.schwarz » Mon, 26 Sep 2005 03:00:24 GMT




no, at least mine with 10.4.2 does not. Otherwise my hdcp/DNS server
would notice. If MacOS can be configured to do so, I'd be eager to learn
how.


no.
What I have working is a DHCP server which, if the DHCP client in the
DHCP query sends a host name, uses that host name (plus the local DNS
domain) to tell my local named to create a respective (temporary) DNS
entry for the address the DHCP server assigns.


so, how do I configure that "hostname" for DHCP on Mac OS (i.e. the DHCP
client side)?

-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby georg.schwarz » Mon, 26 Sep 2005 03:00:25 GMT

Simon Slavin < XXXX@XXXXX.COM >




it makes perfect sense in certain environments (not in each and every
one of course).
I have fixed names for my devices.
When a device requests an IP via DHCP it includes its (fixed) name in
the DHCP query. The DHCP server is configured to take that name and,
together with the IP address it assigns in reponse to that query, tell
it to the local DNS server which creates a respective (temporary) entry
for it.
That way I can access my devices via their fixed names (if the given
device is connected) and still need not bother assigning fixed IP
addresses.

Now back to the question: how can I make Mac OS X include a host name in
the DHCP query it sends to the DHCP server?


-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby Tom Stiller » Mon, 26 Sep 2005 04:06:52 GMT

In article <1h3erxb.bzaa7e3e3tikN% XXXX@XXXXX.COM >,




When I dump the DHCP request (using ethereal) from my iMac running Tiger 
10.4.2, I see both its hostname and the optionally specified DHCP Client 
ID in the DHCP request packet.  The DHCP request packet seems to be 
properly constructed, that is, ethereal parses it out without error.

-- 
Tom Stiller

PGP fingerprint =  5108 DDB2 9761 EDE5 E7E3 
                   7BDA 71ED 6496 99C0 C7CF

Re: send a host name with DHCP request?

Postby georg.schwarz » Mon, 26 Sep 2005 06:46:01 GMT




may I ask where you specified your Mac's hostname?

-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby Tom Stiller » Mon, 26 Sep 2005 07:41:48 GMT

In article <1h3f3bq.70cmkv1mu8mcbN% XXXX@XXXXX.COM >,






It's specified in the "Computer Name" field of System 
preferences->Sharing.

-- 
Tom Stiller

PGP fingerprint =  5108 DDB2 9761 EDE5 E7E3 
                   7BDA 71ED 6496 99C0 C7CF

Re: send a host name with DHCP request?

Postby Simon Slavin » Wed, 28 Sep 2005 08:26:02 GMT


<1h3erxb.bzaa7e3e3tikN% XXXX@XXXXX.COM >:
 


No it doesn't.  Here's the spec for DHCP:

 http://www.**--****.com/ 

.  Check it yourself.  And bear in mind that a computer must be able
to make a DHCP request before it has finished booting, so where would
it get its host name from ?


No it doesn't.  The device won't know its hostname until it has
received a proper IP address.  If it knows its hostname before making
the request, why should it bother making the request ?  It could just
look up that name and find out what its IP address was.

It /is/ possible for a client to pass a piece of information to the
DHCP server.  Under OS X this is called the 'Client ID' and that's
the field in the Network Preferences Panel.  You can use this for
anything.  It's possible that this is the field you're talking about,
but if so, you've described it in a very strange way.


You're talking about RFC2136.  It doesn't work the way you think.  But
at last things are becoming clear.


This has nothing to do with the computer which made the request knowing
the hostname.  It is irrelevant if the DHCP client knows what it's called:
the DNS server has to know what it's called.


Back to the answer I gave previously: at the time it makes the DHCP
request it doesn't have a clue about host names.

If everything is working the way I think you mean, then try putting the
thing you're thinking of as 'hostname' in the 'Client ID' field near
where you set the computer to use DHCP.  I have no idea if this will work.

Simon.
-- 
 http://www.**--****.com/ 

Re: send a host name with DHCP request?

Postby georg.schwarz » Mon, 03 Oct 2005 03:34:00 GMT

Simon Slavin < XXXX@XXXXX.COM >




statically configured, i.e. written in some config file on its hard
disk.



as a matter of fact, I am successfully running such a setup with about a
douzend of computers running *BSD and Linux.


I don't know whether it is that thing, but I doubt it.


the DNS server is told this by the dhcp server which had been told by
the dhcp client.
Unfortunately I only have a link in German that describes the setup with
dhcp and bind:
 http://www.**--****.com/ 


with my present Mac setup, yes; so I need to tell it


I can at least try.


-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby georg.schwarz » Mon, 03 Oct 2005 16:04:57 GMT

Simon Slavin < XXXX@XXXXX.COM >




I tried it, and it does not do the trick. The dhcp client ID is
something different than the dhcp hostname.
See for example the following document from Cisco that describes dhcp
client configuration:

 http://www.**--****.com/ 
/122t/122t8/ftwandhp.htm#1028899

Note that one can not only specify a client-id but also a hostname.
The document explains:
"host-name: (Optional) Name of the host to be placed in the DHCP option
12 field."

This is exactly what I want. Now my question should be: how do I make
MacOS send a host-name parameter in the dhcp option 12 field with a dhcp
query?

I hope this is clear enough



-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Re: send a host name with DHCP request?

Postby nospam » Mon, 03 Oct 2005 16:35:03 GMT

In article <1h3srah.1ivsm6vtze08eN% XXXX@XXXXX.COM >, Georg




system preferences, sharing preference panel - it sends the computer's
name.

Re: send a host name with DHCP request?

Postby georg.schwarz » Tue, 04 Oct 2005 04:02:54 GMT




I tried this, but it does not seem to work.

-- 
Georg Schwarz     http://www.**--****.com/ ~schwarz/
  XXXX@XXXXX.COM   +49 178 8545053

Similar Threads:

1.Question: flushing host name cache to reflect changes in /etc/hosts

I'm in a situation where I regularly need to edit /etc/hosts files on
a variety of machines. My problem is that the changes don't seem to
take effect until after I restart a machine. I'd rather these changes
take place immediately.
I tried:
sudo /sbin/SystemStarter restart Resolver

to no avail.
If I run:
lookupdb -configuration

It indicates the cache is being consulted before flat files. How do I
flush the cache here?

Thanks!

RJB

2.How to assign DHCP reservation to MAC Address of host

Hi,

I'm trying to assign an IP reservation from a DHCP scope to a specific MAC 
Address. I'm sure this is possible, does anyone have a command or reference 
that they can point me to.

Thanks,

-T 


3.Web Hosting, Reseller Hosting, and Dedicated Hosting!!!!!!

4.DHCP client name question

Hello.

I have a Powerbook with an Airport Extreme card communicating with a Linksys
802.11g wireless router. All works fine as far as connectivity goes.

However, I notice that in the DHCP Clients table from the router's
administratoin web page, the Powerbook's DHCP client id doesn't show up.
I've tried stripping out the spaces and apostrophe that must have gone in
the default name (from "Ian's Powerbook" to "ians_powerbook"), but that
hasn't had any effect.

Also, I notice that I'm unable to ping any machine on the network by client
name - IP address works fine, but if I try pinging 'shuttle' (a
Shuttle-based desktop PC) from the Powerbook I don't get a reply. Similarly
I can't ping the printer by name from either the Powerbook or the desktop
PC, though by IP is fine. If I try pinging the PC by name from the PC
itself, I get a response and the correct IP (192.168.1.100, not 127.0.0.1).
Pinging the Powerbook by name from the Powerbook gives unknown host.

Any clues? Thanks in advance for any information.


Cheers,
Ian


5.can't resolve host name

Problem:
    I can't resolve LAN computer names from my imac

Context:
    * imac G5 running Tiger with all updates
    * imac is on a LAN with a linksys wrt54G router
    * win2k machine on same LAN
    * Linksys router performs dhcp services

    * my win2k machine uses a setting, "use NetBIOS setting from DHCP
server"
      to enable me to resolve host names (as I can demonstrate with
Ping hostname)

Question:
     What settings do i make on the imac running Tiger to achieve the
same goal (host name resolution)

Thank you !!!!

Bil

6. Can't resove IP address to host name

7. Host name changing on its own

8. iMac OSX 10.1.5 cant resolve host names but can see IP addresses



Return to mac

 

Who is online

Users browsing this forum: No registered users and 30 guest