Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

DHCPREQUEST with hostname

Hi,


We see some strange behaviour of the Macs in our network. We want it to be default, that the Macs send their Hostnames when doing a DHCPREQUEST.

For example, here (10.6.8) it does:

Jul 14 09:19:29 gw01 dhcpd: DHCPREQUEST for 192.168.3.24 from e8:06:88:bc:f1:0a (Xxxx-MacBook) via eth0


And here (also 10.6.8) on another Mac it doesn't:

Jul 14 14:47:45 gw01 dhcpd: DHCPREQUEST for 192.168.2.41 from c8:2a:14:30:2a:7b via eth0


So there needs to be an option or flag or whatever where I can tell my mac, to send its hostname!


Does anyone know what to do to get the macs send their hostname when they do a DHCPREQUEST?

Mac OS X (10.6.8)

Posted on Jul 14, 2011 6:07 AM

Reply
Question marked as Best reply

Posted on Aug 2, 2011 2:23 AM

I can not believe that there is no solution for this problem.

Something must have changed, cause all newer macs we have here don't send their hostname while doing a DHCPREQUEST.

I don't think I am the only one with this problem...


Well, maybe I have more luck this time, since my post should be up at the latest posts again now 😉

3 replies
Question marked as Best reply

Aug 2, 2011 2:23 AM in response to lfronius

I can not believe that there is no solution for this problem.

Something must have changed, cause all newer macs we have here don't send their hostname while doing a DHCPREQUEST.

I don't think I am the only one with this problem...


Well, maybe I have more luck this time, since my post should be up at the latest posts again now 😉

Nov 28, 2013 3:20 AM in response to lfronius

I discovered that Macs sometimes send their hostname in the request, and sometimes do not. In particular I found that if the computer name (Control Panel > Sharing -> Computer name) contains a space, then NO hostname will be sent (under OS X 10.6). If it does NOT contain a space, then it WILL be sent.


I compared the DHCP requests using tcpdump, with and without a space in the computer name.


With the computer name `chris-macbook-space`:


11:13:41.939462 IP (tos 0x0, ttl 255, id 36007, offset 0, flags [none], proto UDP (17), length 328)

0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:17:f2:xx:xx:xx, length 300, xid 0x9b57c74c, secs 1, Flags [none]

Client-Ethernet-Address 00:17:f2:xx:xx:xx

Vendor-rfc1048 Extensions

Magic Cookie 0x63825363

DHCP-Message Option 53, length 1: Discover

Parameter-Request Option 55, length 10:

Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name

Option 119, LDAP, Option 252, Netbios-Name-Server

Netbios-Node, Netbios-Scope

MSZ Option 57, length 2: 1500

Client-ID Option 61, length 7: ether 00:17:f2:xx:xx:xx

Lease-Time Option 51, length 4: 7776000

Hostname Option 12, length 19: "chris-macbook-space"


With the computer name `chris-macbook space`:


11:07:13.077664 IP (tos 0x0, ttl 255, id 36003, offset 0, flags [none], proto UDP (17), length 328)

0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:17:f2:xx:xx:xx, length 300, xid 0x432cbbda, secs 2, Flags [none]

Client-Ethernet-Address 00:17:f2:xx:xx:xx

Vendor-rfc1048 Extensions

Magic Cookie 0x63825363

DHCP-Message Option 53, length 1: Discover

Parameter-Request Option 55, length 10:

Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name

Option 119, LDAP, Option 252, Netbios-Name-Server

Netbios-Node, Netbios-Scope

MSZ Option 57, length 2: 1500

Client-ID Option 61, length 7: ether 00:17:f2:xx:xx:xx

Lease-Time Option 51, length 4: 7776000


Note the missing `Hostname Option 12, length 19: "chris-macbook-space"` in the latter case.


So you could try removing spaces and any other special characters from the computer name, to see if that enables it to be resolved on the network.

DHCPREQUEST with hostname

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.