# DHCP server hostname table

## leej

My Gentoo Linux box (cafe.lan) connects to the internet via a router (manto.lan).

manto.lan (router) has a builtin DHCP server and assigns IP's whenever the network interface on a client computer is started.

cafe.lan (my Gentoo linux box) is a DHCP client.  Starting the network is as simple as typing: 

```
dhcpcd <enter>
```

The router has a DNS Hostname Table which lists the hostnames of all connected computers.....except for my Gentoo Linux box.  This is the problem!  Why isn't it listed?

However, before installing Gentoo, I had to type 

```
dhcpcd <enter>
```

 to get a network connection - before bootstrapping, building the kernel or anything.  When I logged into the router, I could see that my hostname was listed in the routers DNS Hostname Table.  But it simply wont list *after* Gentoo is installed and up and running.

Presumably there is a problem with my DHCP client configuration?  Does anybody have any clues?  I've tried various switches with dhcpcd, but none fix the problem.  Two macs on the network have their hostnames listed but not this linux box.

The router is a hardware model (Alcatel 510) and not a PC, so it's not like it's a linux box or anything with a dodgy DHCP server configuration.

Any clues?

----------

## Vlad

What was the hostname of your gentoo box? Since you don't actually assign it a hostname until the latter part of the install (when you set /etc/hostname), I'm curious to know what the hostname is considered to be.

You could try to do "dhcpd -h <hostname of your client>" and see if that forces your dhcp server to register it (but I doubt this will work, but it's worth a try).  Maybe it's a problem with your server configuration.  Did you try reading the man pages for dhcpd? There are a number of options in there you might want to try.

----------

## leej

 *Quote:*   

> 
> 
> You could try to do "dhcpd -h <hostname of your client>" and see if that forces your dhcp server to register it
> 
> 

 

I tried that.  When I said in my original message I'd tried various switches with dhcpcd, I really did try them all.   :Smile: 

 *Quote:*   

> 
> 
>  (but I doubt this will work, but it's worth a try). Maybe it's a problem with your server configuration. 
> 
> 

 

Well, if it is a problem with the server configuration, I'm stuffed because the DHCP Server is on a hardware router (my internet gateway).  I also doubt that because it lists the hostnames of two connected Macs and one Windows machine.  It's also listed the hostname for Mandrake 8.2 (which was with me for about two days a month ago!  :Wink: ) but not Gentoo for some reason.

I really do think it's my Gentoo client (cafe.lan) configuration that's at fault here, but I just can't figure it out.  It's not a problem as far as networking is concerned (other computers on the network can ping cafe.lan fine and even use it's MTA), but it's bugging the life out of me! 

 *Quote:*   

> 
> 
> Did you try reading the man pages for dhcpd? There are a number of options in there you might want to try.
> 
> 

 

Yep, I've read it exhaustively in the couple of weeks before posting.  No luck I'm afraid.   :Smile: 

----------

## hbp4c

Ok, i have what may seem to be a totally random question - but are you running samba?

The reason i ask is that I noticed with my hardware router (one of the little blue linksys lan + cable router + wireless) has many of the same features, but the dhcp client table does not list a name for my machine in there unless I start samba and wait for the network to propogate.  Also, whatever name i defince my host as in samba is the name that the router picks up.

I have no idea if this is going to be the same case for you, but its an idea.  

Hope that sheds some light.

Ho

----------

## Vlad

Woops. I misread your post. I thought you said you had tried different versions of dhcpd. My mistake.

----------

## lx

 *leej wrote:*   

> The router is a hardware model (Alcatel 510) and not a PC, so it's not like it's a linux box or anything with a dodgy DHCP server configuration.

 

Well my alcatel / ADSL-modem (hacked to become internet router/ DHCP server), uses a unix derivative, maybe yours also  :Wink: .

 dhcp works fine, just have hostname without domain in /etc/hostname, and it just pops up in DNS. Have you tried to boot CD and just start dhcpd again just to see if it works? Maybe you could boot in single mode and just type dhcpcd -d, and check the outputed data for any clues, but you probably already done this,.................

Cya, lX

----------

## leej

 *Quote:*   

> Well my alcatel / ADSL-modem (hacked to become internet router/ DHCP server), uses a unix derivative, maybe yours also.

 

Well, it's running some kind of Operating System because it takes time to boot up, it's serves web pages, runs it's own telnet server, has the DHCP server, etc.  Although AFAIK, it can only be flash updated.

 *Quote:*   

> dhcp works fine, just have hostname without domain in /etc/hostname, and it just pops up in DNS. 

 

Tried it...and it didn't work!  :Wink: 

 *Quote:*   

> Have you tried to boot CD and just start dhcpd again just to see if it works?

 

Yep!  And when I boot from the cd, probe my network adapters modules and do this:

```

dhcpcd eth0

```

The hostname automatically appears in the routers DNS Hostname table!!!

 *Quote:*   

> Maybe you could boot in single mode and just type dhcpcd -d, and check the outputed data for any clues, but you probably already done this,................. 

 

Yep checked.  I can't recall the exact words but it does tell me my assigned IP and hostname, but it still doesn't appear in the DNS Hostname table.   :Sad: 

I also tried the Samba workaround offered by hbp4c, but that had no effect either.  Just booting up a mac or win machine on the network and it's hostname automatically appears, but still nothing for the Gentoo box.  Weird!

----------

