linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Remote IP setup of devices in a network
@ 2011-11-08 18:54 Sam Ravnborg
  2011-11-08 19:11 ` David Woodhouse
  2011-11-09 10:11 ` Martyn Welch
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2011-11-08 18:54 UTC (permalink / raw)
  To: Linux-embedded

I am faced with a challenge that we ship devices which are
all preconfigured to a fixed IP address, and we want to provide
an easy solution to do remote IP configuration of all devices
connected to the same network.
In other words - all devices are reachable by a broadcast package.

The network may or may not include a DHCP server - which
we in any case do not have control over.

In the typical situation we will assign static IP
addresses to the devices - but sometimes we may also
configure them to DHCP.

So we are looking for a (de facto?) way to do this.
Any hints?

I haved tried to ask google without luck.

The idea is to use an UDP broadcast to discover all devices,
and a similar UDP broadcast to configure the devices.
In the latter the MAC will be the key to address individual devices.

As we are talking less than 100 devices this looks quite doable.
But I do not want to invent something again if it already exists.

Thanks in advance for any inputs,

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remote IP setup of devices in a network
  2011-11-08 18:54 Remote IP setup of devices in a network Sam Ravnborg
@ 2011-11-08 19:11 ` David Woodhouse
  2011-11-08 19:31   ` Sam Ravnborg
  2011-11-09 10:11 ` Martyn Welch
  1 sibling, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2011-11-08 19:11 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-embedded

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

On Tue, 2011-11-08 at 19:54 +0100, Sam Ravnborg wrote:
> The idea is to use an UDP broadcast to discover all devices,
> and a similar UDP broadcast to configure the devices.
> In the latter the MAC will be the key to address individual devices.

You could almost be describing link-local IPv6. Each device
automatically gets an IPv6 address based on its MAC address, which you
can use for unicast addressing. The broadcast (or multicast) bit is easy
enough too.

-- 
dwmw2

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5818 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remote IP setup of devices in a network
  2011-11-08 19:11 ` David Woodhouse
@ 2011-11-08 19:31   ` Sam Ravnborg
  2011-11-08 23:30     ` Eliot Blennerhassett
  2011-11-09  0:59     ` David Woodhouse
  0 siblings, 2 replies; 6+ messages in thread
From: Sam Ravnborg @ 2011-11-08 19:31 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Linux-embedded

On Tue, Nov 08, 2011 at 07:11:09PM +0000, David Woodhouse wrote:
> On Tue, 2011-11-08 at 19:54 +0100, Sam Ravnborg wrote:
> > The idea is to use an UDP broadcast to discover all devices,
> > and a similar UDP broadcast to configure the devices.
> > In the latter the MAC will be the key to address individual devices.
> 
> You could almost be describing link-local IPv6. Each device
> automatically gets an IPv6 address based on its MAC address, which you
> can use for unicast addressing. The broadcast (or multicast) bit is easy
> enough too.

We are forced to use a IPv4 network where we need to keep the devices
in the same network as a potential router.

So to describe the idea with a little drawing:

Host PC            Device-1     Device-2
  |                   |            |
  |---- DISCOVER----->|----------->|
  |                   |            |
  |<-- REPLY(MAC:IP)--|            |
  |<-- REPLY(MAC:IP)---------------|
  |                   |            |
 (technician manually decide IP setup)
  |                   |            |
  |-- CONFIG(MAC:IP)->|            |
  |-- CONFIG(MAC:IP)-------------->|

The discover is maybe sent twice due to packer drops.
The Reply is sent once and may look like this:

MAC=01:02:03:04:05:06;IP=10.11.12.13;NM=255.0.0.0;GW=10.0.0.1;XX="foo bar";YY="baz buz"

The technician then decides the new config (or computer assisted).

And the CONFIG may look like this:
MAC=01:02:03:04:05:06;IP=192.168.0.201;NM=255.255.255.0;GW=192.168.0.1


I cannot get this with auto-IP or wahtever it is named for IPv4.

	Sam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remote IP setup of devices in a network
  2011-11-08 19:31   ` Sam Ravnborg
@ 2011-11-08 23:30     ` Eliot Blennerhassett
  2011-11-09  0:59     ` David Woodhouse
  1 sibling, 0 replies; 6+ messages in thread
From: Eliot Blennerhassett @ 2011-11-08 23:30 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-embedded

On 09/11/11 08:31, Sam Ravnborg wrote:
> On Tue, Nov 08, 2011 at 07:11:09PM +0000, David Woodhouse wrote:
>> On Tue, 2011-11-08 at 19:54 +0100, Sam Ravnborg wrote:
>>> The idea is to use an UDP broadcast to discover all devices,
>>> and a similar UDP broadcast to configure the devices.
>>> In the latter the MAC will be the key to address individual devices.

It isn't obvious why you can't use bootp or dhcp?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remote IP setup of devices in a network
  2011-11-08 19:31   ` Sam Ravnborg
  2011-11-08 23:30     ` Eliot Blennerhassett
@ 2011-11-09  0:59     ` David Woodhouse
  1 sibling, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2011-11-09  0:59 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-embedded

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

On Tue, 2011-11-08 at 20:31 +0100, Sam Ravnborg wrote:
> On Tue, Nov 08, 2011 at 07:11:09PM +0000, David Woodhouse wrote:
> > On Tue, 2011-11-08 at 19:54 +0100, Sam Ravnborg wrote:
> > > The idea is to use an UDP broadcast to discover all devices,
> > > and a similar UDP broadcast to configure the devices.
> > > In the latter the MAC will be the key to address individual devices.
> > 
> > You could almost be describing link-local IPv6. Each device
> > automatically gets an IPv6 address based on its MAC address, which you
> > can use for unicast addressing. The broadcast (or multicast) bit is easy
> > enough too.
> 
> We are forced to use a IPv4 network where we need to keep the devices
> in the same network as a potential router.

Note that to use *link-local* IPv6 you don't need any co-operation from
infrastructure. You don't need global routing; you don't need to be
generally operating in 21st century conditions. If you have an
Ethernet-like link between your devices, link-local IPv6 should work
fine.

-- 
dwmw2



[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5818 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Remote IP setup of devices in a network
  2011-11-08 18:54 Remote IP setup of devices in a network Sam Ravnborg
  2011-11-08 19:11 ` David Woodhouse
@ 2011-11-09 10:11 ` Martyn Welch
  1 sibling, 0 replies; 6+ messages in thread
From: Martyn Welch @ 2011-11-09 10:11 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Linux-embedded

On 08/11/11 18:54, Sam Ravnborg wrote:
> I am faced with a challenge that we ship devices which are
> all preconfigured to a fixed IP address, and we want to provide
> an easy solution to do remote IP configuration of all devices
> connected to the same network.
> In other words - all devices are reachable by a broadcast package.
> 
> The network may or may not include a DHCP server - which
> we in any case do not have control over.
> 
> In the typical situation we will assign static IP
> addresses to the devices - but sometimes we may also
> configure them to DHCP.
> 
> So we are looking for a (de facto?) way to do this.
> Any hints?
> 
> I haved tried to ask google without luck.
> 
> The idea is to use an UDP broadcast to discover all devices,
> and a similar UDP broadcast to configure the devices.
> In the latter the MAC will be the key to address individual devices.
> 
> As we are talking less than 100 devices this looks quite doable.
> But I do not want to invent something again if it already exists.
> 
> Thanks in advance for any inputs,
> 

Isn't this one of the things that Avahi daemon is supposed to achieve?

Martyn

-- 
Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
T +44(0)1327322748                     | Manchester, M2 3AB
E martyn.welch@ge.com                  | VAT:GB 927559189

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-09 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 18:54 Remote IP setup of devices in a network Sam Ravnborg
2011-11-08 19:11 ` David Woodhouse
2011-11-08 19:31   ` Sam Ravnborg
2011-11-08 23:30     ` Eliot Blennerhassett
2011-11-09  0:59     ` David Woodhouse
2011-11-09 10:11 ` Martyn Welch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).