[En-Nut-Discussion] Register hostname for Ethernut

Bernd Walter enut at cicely.de
Fri Dec 4 16:11:34 CET 2009


On Fri, Dec 04, 2009 at 03:41:22PM +0100, Daniel wrote:
> 
> But this is not a problem of Ethernut, it is part of the network setup.
> It is the task of your customer to configure his own network.
> An ethernut device is just a node in the network.
> In the same thing as a phone device is not responsible for making a public
> phonebok entry.
> 
> You might think about cheap DSL routers, which often provide such a
> functionality, but this is only possible because they usually provide the
> basic network structure including DNS services.
> 
> But when I configure a normal PC (running Windows or Linux) with a hostname,
> then I access it in the network via ist hostname. Shouldn't this be working
> with a Ethernut board also?

Even this won't work as you might asume.
They are usually playing bad tricks to make it work in some corner cases.
Assigning a hostname is a local task for a device/host.
Noone knows about it unless it is published via DNS or similar service.
Microsofts SMB-protocoll, which provides file and printer services, for
example has its own functionality to retrieve hostnames, but those are
not internet names and can't be used in a browser to see webpages
seved by them.
Those are names used in their own little world and often lead to problems
when namespaces disagree.

> On my Router with DHCP Server, the Ethernut board's entry has already the
> hostname "ethernut". But I cannot access it by this name. 

Yes, because DHCP is there to provide host configuration, but nothing
more.
DHCP can tell a device its hostname, but a hostname is not what you
need, you need a name service.
DNS is there to provide name to IP service.
To come back to my phone example.
Think of a hostname to be an adhesive label sticked on your phone device
and DNS to be a public phone book.

If you enter http://www.foo.com into your browser the name is retrieved
from local tables (/etc/hosts) and if there is no such entry it asks
it's configured DNS servers, which then either know the answer or try
to retrieve them from other DNS servers.

Hostnames can't work, because those have a chicken egg problem.
It is nice that www.foo.com knows that it is named www.foo.com, but you
can't ask the host before you know it's address in advance.
There are some exceptions - for example the SMB system uses broadcast
services to ask the whole network if any of them has the requested name.
This works fine as long as you can ask everyone, but you can't ask the
whole internet.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list