LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Getting hostname to show up in DHCP network (https://www.linuxquestions.org/questions/linux-networking-3/getting-hostname-to-show-up-in-dhcp-network-524824/)

awatts 02-01-2007 08:08 PM

Getting hostname to show up in DHCP network
 
Hello, I'm a bit of a n00b, but I have a Linux expert (10+ yrs) in house who works for me and since he's run out of ideas in programming an appliance we are creating, I thought I'd turn here for possible answers.

Distro is Slackware, kernel is 2.6.18 we are using that due to support for ACPI and other things we need for appliance.

We are running on a Via mini-itx EPIA MB which has a built in 10/100 NIC, (eth0) plus we have added a Realtek based wireless NIC (ra0) and both work fine, no connectivity issues with either. eth0 is normally not connected.

Problem is that we can't seem to get the Linux "hostname" to show up in any networking we do. For example in two different wireless routers, the hostname for this box (and another we tested) in wireless router DHCP table the hostname of the Linux appliance is displayed as the gateway address (192.168.2.1) instead of the actual hostname. Windows machines on the same wireless network show hostnames correctly. We've done the usual refreshes/reboots etc to make sure its not a declaration issue.

iwconfig also shows hostname correctly under ra0 in the "nickname" field.

I'm pretty sure we have the /etc/dhcpcd.conf file setup correctly, and using the hostname -s returns the correct hostname on the appliance.

The reason this is important to us is that for our application, we need to run multiples of these appliances on network, and we have a Windows based client control program that we need to figure out what the hostnames are related to what ip adress is assigned when DHCP changes things around. End users for this product will be ultra n00bs so can't expect them to ssh to these boxes to figure it out each time something changes.

Any ideas anybody?

fur 02-01-2007 10:00 PM

I have read over your post a few times, and can't really figure out what you are doing.


Quote:

Problem is that we can't seem to get the Linux "hostname" to show up in any networking we do. For example in two different wireless routers, the hostname for this box (and another we tested) in wireless router DHCP table the hostname of the Linux appliance is displayed as the gateway address (192.168.2.1) instead of the actual hostname.

Do you want the clients to send dynamic DNS updates?

awatts 02-02-2007 11:17 AM

Thanks for the reply, I'm sorry that I was not clear in my explanation.

What I'm looking for is the ability for the Linux appliance box to report its hostname properly to the network, such as is done in Windows "network neighborhood", where the machines are listed by name.

In the wireless routers we've tested, Linksys WRGT54 and Netgear, you can view the DHCP clients table visually. It shows hostnames and IP addresses and MAC addresses for each machine in the wireless network.

here is what it looks like:http://www.norcalblogs.com/watts/per...DHCP_table.png

This dialog shown above is created in the Linksys router, which is also a Linux appliance.

Note that there are two entries for hostnames that are 192.168.2.1 which is also the gateway address. These are the Linux appliances we are building. There's another entry that is blank, and thats another commercial linux based appliance, and the others that have real names are Windows machines.

I'm trying to get our Linux appliances to have the hostnames show up properly so that the end user can more easily locate where the devices get assigned via DHCP so that they can direct our Windows based control client to that IP address. The appliances are likely to be far removed from where the end user controls them, and probably mounted in inaccessible places, so we are looking for a convenient way to discover where they have been IP'd to, especially if the network changes assignments due to power outage.

Hopefully we can then create an automated method in our Windows client to keep track of them so that login connection can be easily maintained. I realize the simple solution is to run fixed IP addresses on the Wireless LAN, but that may not be practical in all installs.


All times are GMT -5. The time now is 07:56 PM.