12

I have a Cisco router. The firmware webpage has a tab the displays the DHCP client table. As the name suggests it lists all of the DHCP clients on the network. The first column in the table is the "Client Name". Some devices have names and some don't.

Where does the Client Name come from?
Is that part of the DHCP protocol?
It it an optional parameter in the protocol?

I am developing my own embedded ethernet device and it is one of the items that does not have a client name listed and I am trying to figure out why.

2
  • 1
    What kind of devices are these, both the ones with names and w/o?
    – user142485
    Commented Aug 24, 2012 at 16:46
  • 1
    @user142485 The ones with names are PC's and an Android phone. One of the ones without a name is my custom device (embedded HTTP server, TCPIP server) and there is one other device without a name that I'm not sure what it is. Commented Aug 24, 2012 at 16:56

4 Answers 4

12

Yes, it probably comes from the DHCP requests.

The DHCP protocol allows a "hostname" field to be added in DHCP requests (for a computer to inform about its name) as well as DHCP acknowledgements (for a DHCP server to assign a different hostname). This is specified in RFC 2132 §3.14 for DHCPv4, and in draft-ietf-dhc-v6opts §3.7 for DHCPv6. Many DHCP servers forward the client-specified hostname to the internal DNS server, and display it in the lease management interfaces.

1

There term for what is happening is called "Reverse Address Resolution" and it can be handled in many ways:

Likely the devices that show up register themselves with the DNS server it has set, then the DHCP client can either just get shared information from the DNS server if the router is also providing DNS or perform a Reverse DNS Lookup on the DNS server if it is not and find the name of the computer.

1
  • Ubuntu: /etc/dhcp3/dhclient.conf
  • Red Hat: /etc/sysconfig/network-scripts/ifcfg-eth0

but on my Red Hat machine that file was not there but I could set the DHCP client ID via the Control Center by opening the Network Connections dialog box and clicking on the relevant wireless connection and hitting Edit. Then I clicked on the IPV4 Settings tab and set the DHCP client ID there. I'm not sure where (which file) this gets stored in though.

HTH

0

This comes from the hostname as pointed already by the accepted answer. I am adding commands on how you change this for Android users. Go to adb shell or from some terminal app with root permission and execute these commands.

view name of the device

getprop net.hostname

It should display the same name that you get in your wifi or router settings for connected clients or active device lists. Now how to change it

su
setprop net.hostname myandroid

now it's set, reboot your device manually or using command

reboot

The rest the changes should be picked by the router now at the start of the device. Please note these commands apply only to Android shell commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .