Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #26358

Re: [OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.arch.embedded
Subject Re: [OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets
Date 2017-03-31 09:29 +0200
Organization A noiseless patient Spider
Message-ID <obl0be$sl$1@dont-email.me> (permalink)
References <5fd6613a-6fd4-437d-ae35-f35b8fb2ac45@googlegroups.com>

Show all headers | View raw


On 31/03/17 00:55, pozzugno@gmail.com wrote:
> I think this is little OT here, because the question is mostly
> network oriented. However my nodes will be Linux embedded boxes and
> some solutions could be very low-level, so I think many of you could
> help me in some way.

You might get more details in comp.os.linux.networking.

> 
> I have N Ethernet hosts based on embedded Linux. Each one features an
> Ethernet interface dedicated to the final user that could change the
> IP address configuration. On that interface a Web server responds.
> All the nodes will be configured on the same subnet and conected to a
> switch.
> 
> Now I need to make an "internal" communication among those hosts.
> With the work "internal" I mean the user should ignore the presence
> of this communication and relevant details (it should not be
> necessarily invisible to a traffic monitoring tools). For example,
> when the user changes the IP address of host 1, the new IP address
> shouldn't be configured in host 2 too and the internal communication
> between host 1 and 2 should continue without interruption.
> 
> I thought about three possible solution, but I'm not a netowrk guru.
> 
> The first is to add other logical IP addresses (aliases) used for
> internal communication only. Those IP addresses will be hardcoded and
> never changed by whoever. The user will be able to configure only the
> main IP address for each host. Is this could work with a simple
> switch? I think yes, because the switch looks at the MAC address and
> doesn't see the IP addresses. Anyway I don't know what negative
> effects could be when the same broadcast domain is shared by two
> different subnet (internal, with hardcoded and fixed IP addresses,
> and external, configurable by the user as he wants).

That will work fine, as long as your "internal" network does not collide
with the users network addresses.  Pick something in the 10.x.y.z range,
rather than 192.168.x.y.  Also consider just using IPv6 here.

As you note the traffic will not be invisible to monitoring tools - it
is easy to hack into this traffic.

> 
> Another solution is to implement the internal communication staying
> at level 2, so avoiding IP addresses, but using only MAC addresses. I
> could invent a proprietary layer 2 protocol. This could avoid any
> conflict with IP addresses customized by the user, but there are some
> disadvantages. How host 1 could know the MAC address of host 2 for
> internal communication? It could be written during delivery of the
> system, but replacing one host on the field could be difficult (the
> MAC address of replaced host should be changed on the other nodes). I
> could invent a proprietary broadcast ARP protocol (what is MAC
> address of **host 2**). In order to avoid the issue of knowing the
> MAC address of other hosts for internal communication, I could invent
> a L2 protocol made by all broadcast frames, considering it will a
> low-bandwidth protocol.

That would be theoretically possible, but a great deal of work.  Don't
bother.

> 
> The third solution is using VLANs, but I don't know if they can be
> useful in my case. Indeed, I couldn't use static (port-based) VLAN,
> because I will have two VLANs on the same switch ports. Anyway I
> should have two IP addressed on each host (as in the first
> solution).
> 

VLANs have a lot of uses, but in a case like this you would have to make
sure that the switches involved are at least VLAN aware, even if they
are not configured with specific VLAN setups.  Standard cheap Ethernet
switches don't pass through packets with VLAN tags.

> Other suggestions?
> 

Your first suggestion is fine.

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets pozzugno@gmail.com - 2017-03-30 15:55 -0700
  Re: [OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets Ivan Shmakov <ivan@ribog.ahpci.iadu.net> - 2017-03-31 06:12 +0000
  Re: [OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> - 2017-03-31 09:20 +0300
  Re: [OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets David Brown <david.brown@hesbynett.no> - 2017-03-31 09:29 +0200
  Re: [OT] Embedded Linux hosts sharing Ethernet broadcast domains with two IP subnets edward.ming.lee@gmail.com - 2017-03-31 21:10 -0700

csiph-web