[En-Nut-Discussion] Sending Host name to DHCP server

Damian Slee damian at commtech.com.au
Wed Mar 3 09:55:29 CET 2004


Hi,
Yea relised later that confnet is per interface.  I didn't know there
was a confos structure.  A host name makes sense in there.  Default it
to "ethernut" or something.  Don't know about Max characters.
Theoretically probably could be 255, but that would waste heaps of
eeprom, so 16 characters is quite usable, 8 is bearable.
 

-----Original Message-----
From: Oliver Schulz [mailto:Oliver.Schulz at bong.de] 
Sent: Wednesday, 3 March 2004 4:36 PM
To: Ethernut User Chat (English)
Subject: AW: [En-Nut-Discussion] Sending Host name to DHCP server

Hi Damian,

your choice to take confnet.cd_name as ethernut's host name is a little
bit unlucky.
What happens, if somebody has more than one ethernut in his LAN? The
last booted ethernut is the winner in dns...

Next possibility is to have a separate field in confnet structure to
store the host name. But does it make sense to relate the host name to a
device configuration?

So I suggest to have the hostname stored in confos stucture, because the
host name is a kind of global setting and should not depend on any LAN
or PPP device.
Harald, what do you think?

Cheers,
Oliver.

> -----Ursprungliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de]Im Auftrag von Damian Slee
> Gesendet: Mittwoch, 3. Marz 2004 08:11
> An: Ethernut User Chat (English)
> Betreff: [En-Nut-Discussion] Sending Host name to DHCP server
> 
> 
> Hi all,
> 
> I added this to DhcpRequest() thinking I could use confnet.cd_name to 
> store a local host name.  Found out quickly that confnet.cd_name holds

> the device name "eth0".  So my DHCP server lease table now shows 
> "eth0.commtech.com.au" :-)  Better than "" I guess.
> 
> Does any one have a need for a proper host name field?
> And a valid name entry in their dhcp server lease table?
> 
> Maybe it can be added to the confnet structure, or standard ethernut 
> eeprom structure some where?
> 
> MS DHCP server can register the name using dynamic DNS to MS DNServer.
> Haven't got it to work yet tho.
> 
> Comments please...
> 
> damian
> 
> --------------------------------------------------------------
> /* Pass host name if specified in confnet structure.  */
> /* viewing DHCP lease table shows something sensible. */ len = 
> strlen(confnet.cd_name); if (len > 0)  {
> 	optlen += DhcpAddOptionFromRAM(op + optlen, DHCPOPT_HOSTNAME, 
> confnet.cd_name, len); }
>  
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> 
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion





More information about the En-Nut-Discussion mailing list