[lwip-users] Network name of device

1,004 views
Skip to first unread message

Sägesser Walter

unread,
Mar 4, 2010, 8:05:45 AM3/4/10
to lwip-...@nongnu.org
I have tried to give my device a name, i.e. I set 'LWIP_NETIF_HOSTNAME'  to 1 and left the default setting ("lwip") in the initialisation code. At startup DHCP is assigning an IP and I can PING the device with this address (and also the web server works by it). But I can't ping with the host name 'lwip'. What else must be done to convince the device that it should listen to its name, too?
(The final goal is to access the web server by name in order to configure a IP manually if there is no DHCP server around).
 
Many thanks
Walter

_____________________________

SOLON Inverters AG
Burgerfeldstrasse 19
CH-8730 Uznach SG, Schweiz

Phone: +41 55 246 41 14
Direct: 
+41 55 246 58 52
Fax:    
+41 55 246 41 16
www.solon.com

 

 

Jeff Barber

unread,
Mar 4, 2010, 9:28:22 AM3/4/10
to Mailing list for lwIP users
In order to create a connection to your lwip device, the client must
be able to translate the host-name to an IP address. Traditionally,
this has meant teaching the local DNS server that the name "lwip"
translates to IP address X.X.X.X. The DHCP host-name option provided
by the lwip device can factor into this if the DHCP server and the DNS
server coordinate appropriately. (However, in the traditional model,
the lwip device is *not* directly involved in the actual
name-to-IP-address translation.)

It is possible to do this without a dedicated DNS server or DHCP
server, but the client host and your device would need to implement
"zero configuration networking" (see
http://en.wikipedia.org/wiki/Zero_configuration_networking as a
starting point).

Jeff

> _______________________________________________
> lwip-users mailing list
> lwip-...@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

gold...@gmx.de

unread,
Mar 4, 2010, 10:16:52 AM3/4/10
to lwip-...@nongnu.org
Jeff Barber wrote:
> It is possible to do this without a dedicated DNS server or DHCP
> server, but the client host and your device would need to implement
> "zero configuration networking" (see
> http://en.wikipedia.org/wiki/Zero_configuration_networking as a
> starting point).
>
We have a limited implementation of zeroconf called "AutoIP" which
generates MS-like IP addresses if no static IP is configured and no DHCP
server is found (see LWIP_AUTOIP option).

The name resolution can then be done with netbios (see
contrib/apps/netbios) but not via DNS as that would either require the
above DHCP-/DNS-server cooperation or manually configuring the DNS
server. However, using netbios limits you to the windows world.

Simon

Bill Auerbach

unread,
Mar 4, 2010, 11:23:19 AM3/4/10
to Mailing list for lwIP users
>We have a limited implementation of zeroconf called "AutoIP" which
>generates MS-like IP addresses if no static IP is configured and no DHCP
>server is found (see LWIP_AUTOIP option).

AutoIp is Link-Local Addressing per RFC3927. I am not sure it is fully
compliant and I am pretty sure its interaction with DHCP is *not* compliant.
I suppose a bug-report should be filed to verify why I think it isn't
compliant with DHCP and to resolve it if it isn't.

ZeroConf is a standard and well-defined. (Interestingly the IETF didn't see
it as very important and there is no RFC on it and a workgroup for it has
gone missing). Most commercial devices do support it (like printers, etc.)
as does Windows, Linux, and Mac-OS. It was the basis for Apple-Talk and
grew into Rendezvous and now Bonjour. Link-Local Addressing is one of three
components of ZeroConf. I wouldn't call AutoIP "limited zeroconf". It's
Link Local addressing and well defined. It might be nice to have Zeroconf
support since it makes listing and accessing devices easier while following
a standard.

Bill

mat henshall

unread,
Mar 4, 2010, 4:31:27 PM3/4/10
to lwip-...@nongnu.org
If I understand this process right, the 'bonjour/rendevous/mdns' standard for zero conf style naming *is* going to become the standard, eventually:


I am not sure why, as Bill points out, it doesn't show up when searching for it. It is however very active - check the history tab.

A significant advantage for embedded devices over alternate solutions (as far as I can see, most people seem to concoct their own private udp broadcast mechanism) is that the standard is already in use in millions of devices already. Macs, iPhones and a lot of Linux distro's have it as standard, and if you have iTunes on a Windows machine, it will have the mDNS stack installed.

If your embedded device supports an http interface, then Safari on Mac, iPhone and Windows can natively find it. Explorer and Firefox both have plugin's that allow a user to 'find mdns' web servers. If you are planning on writing a desktop app to communicate with your device, then there are simple API's with a lot of language bindings on pretty much all these platforms to find and connect your device.

Apple open source implementation:


and the ahahi project for linux:


provides an alternative 'clean room' implementation.

I believe there is also a pure Java implementation out there somewhere (strangeberry?).

These are, however, fairly heavy implementations and I suspect that a lighter weight implementation is possible that is built on top of LWIP. There are three distinct parts, first autoip, which LWIP already does... whether completely compliant or not, it works well enough, I believe. Two, the automatic distribution and mechanism for host names. Third the discovery of named 'services' on the network.

By creating a set of options to provide varying levels of functionality and building on top of the existing LWIP services a very light weight tunable implementation could be made. For example, a minor change to  dns.c, would enable discovery of ".local" mdns hosts with very little impact.

I am very interested in participating in any development of such an extension, but have not participated in an open source project before. Although a competent C programmer (20+ years), I have been working with LWIP a relatively short time. If anyone is interested in working with me on this, I would be happy to talk directly. In particular, I would appreciate connecting with anyone who has done a similar open source collaboration before and has experience with LWIP. Any suggestions on how best to organize and interact with the LWIP maintainers would be greatly appreciated.

Any takers?

Mat Henshall

mat (at) squareconnect (dot) com

On Thu, Mar 4, 2010 at 9:00 AM, <lwip-user...@nongnu.org> wrote:
Send lwip-users mailing list submissions to
       lwip-...@nongnu.org

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
       lwip-user...@nongnu.org

You can reach the person managing the list at
       lwip-use...@nongnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."

Today's Topics:

  1. Re: Network name of device (gold...@gmx.de)
  2. RE: Network name of device (Bill Auerbach)



---------- Forwarded message ----------
From: "gold...@gmx.de" <gold...@gmx.de>
To: lwip-...@nongnu.org
Date: Thu, 04 Mar 2010 16:16:52 +0100
Subject: Re: [lwip-users] Network name of device
Jeff Barber wrote:
It is possible to do this without a dedicated DNS server or DHCP
server, but the client host and your device would need to implement
"zero configuration networking" (see
http://en.wikipedia.org/wiki/Zero_configuration_networking as a
starting point).
 
We have a limited implementation of zeroconf called "AutoIP" which generates MS-like IP addresses if no static IP is configured and no DHCP server is found (see LWIP_AUTOIP option).

The name resolution can then be done with netbios (see contrib/apps/netbios) but not via DNS as that would either require the above DHCP-/DNS-server cooperation or manually configuring the DNS server. However, using netbios limits you to the windows world.

Simon








--

Mat Henshall
Founder and CEO, Square Connect, Inc.
San Jose, CA
www.squareconnect.com
cell: 650.814.7585

Bill Auerbach

unread,
Mar 4, 2010, 5:35:58 PM3/4/10
to Mailing list for lwIP users

The only reference I could find for a workgroup specifically for Zeroconf hadn’t seen activity in a couple+ years.  I wasn’t implying inactivity about mDNS or other aspects like Bonjour – I know those are active.  I am most surprised that Zeroconf wasn’t rolled out into an RFC of any kind.

 

I have Cheshire’s “Zero Configuration Networking” book and what I’ve read thus far is excellent.  It completely covers the Zeroconf protocols and includes the Bonjour API.  He does mention that the IETF didn’t bite on the idea – maybe this is because it had already come out and it was defined and implemented commercially by Apple.

 

Bill

mat henshall

unread,
Mar 4, 2010, 6:18:27 PM3/4/10
to Mailing list for lwIP users
Good point Bill on Zeroconf work group versus Bonjour/mDNS/DNS-SD.

I still am not quite sure what it should be called, but I know I want an mDNS responder in my embedded projects! Naming first, services second. As far as I can see these two critical pieces are now being actively worked as an RFC...

I am also enjoying Cheshire's book. Very thorough and readable.

Kieran Mansley

unread,
Mar 5, 2010, 3:47:29 AM3/5/10
to Mailing list for lwIP users
On Thu, 2010-03-04 at 13:31 -0800, mat henshall wrote:
> By creating a set of options to provide varying levels of
> functionality and building on top of the existing LWIP services a very
> light weight tunable implementation could be made. For example, a
> minor change to dns.c, would enable discovery of ".local" mdns hosts
> with very little impact.
>
> I am very interested in participating in any development of such an
> extension, but have not participated in an open source project before.
> Although a competent C programmer (20+ years), I have been working
> with LWIP a relatively short time. If anyone is interested in working
> with me on this, I would be happy to talk directly. In particular, I
> would appreciate connecting with anyone who has done a similar open
> source collaboration before and has experience with LWIP. Any
> suggestions on how best to organize and interact with the LWIP
> maintainers would be greatly appreciated.

I'd be happy to see this sort of functionality added to lwIP provided it
sticks to the lightweight principle that is lwIP's goal.

Perhaps a good start would be to file a task for this work on savannah
(or one task for each section if they are easily separable) and see
where it goes.

Lack of experience on open source projects is not a problem. I ask that
developers first demonstrate some interest and competence by submitting
patches for new features or fixes, but any that have done so can be
granted CVS access to make their development process easier.

Thanks

Kieran

mat henshall

unread,
Mar 5, 2010, 10:14:10 PM3/5/10
to Mailing list for lwIP users
Kieran,

I have put up some tasks - not sure if this is correct as they tend to build on one another... but it is a place to start.

I am working on  the first one - modifying dns.c to support resolution of .local host names to one shot multicast dns requests...

When I have something ready for other people to try I get back to the list?

Mat

Kieran Mansley

unread,
Mar 8, 2010, 4:41:53 AM3/8/10
to Mailing list for lwIP users
On Fri, 2010-03-05 at 19:14 -0800, mat henshall wrote:
> When I have something ready for other people to try I get back to the
> list?

Sounds good, thanks.

Reply all
Reply to author
Forward
0 new messages