Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple adapters on the same subnet
10-06-2015, 05:05 PM
Post: #1
Multiple adapters on the same subnet
From previous discussions, I believe the ohNet device stack can only use one adapter per subnet. If there are multiple adapters on the same subnet, does the device stack select an adapter "randomly" or is there any way that the user could influence which adapter will be selected? This question has arisen in a Windows configuration.
Find all posts by this user
10-06-2015, 05:21 PM
Post: #2
RE: Multiple adapters on the same subnet
(10-06-2015 05:05 PM)simoncn Wrote:  From previous discussions, I believe the ohNet device stack can only use one adapter per subnet. If there are multiple adapters on the same subnet, does the device stack select an adapter "randomly" or is there any way that the user could influence which adapter will be selected? This question has arisen in a Windows configuration.

The device stack reads a list of adapters from the OS porting layer. This list is ordered first by subnet then by the desirability of each adapter within the subnet. The only ordering rule that is implemented within a subnet is to list wired connections before wireless.

This has served us surprisingly well for 5 years. I'm very open to doing something better or more flexible though. Do you have any suggestions for change? Or can you describe the use case(s) you're being asked about?
Find all posts by this user
10-06-2015, 06:23 PM
Post: #3
RE: Multiple adapters on the same subnet
(10-06-2015 05:21 PM)simonc Wrote:  The device stack reads a list of adapters from the OS porting layer. This list is ordered first by subnet then by the desirability of each adapter within the subnet. The only ordering rule that is implemented within a subnet is to list wired connections before wireless.

This has served us surprisingly well for 5 years. I'm very open to doing something better or more flexible though. Do you have any suggestions for change? Or can you describe the use case(s) you're being asked about?

Thanks for the quick reply!

The user has a Windows PC with one adapter connected to the network and one adapter connected via a crossover cable to a dedicated audio PC. Both adapters are on the same subnet. MinimServer is running on this PC and the user is unable to access MinimServer from other computers on the network.

It appears that the problem is caused by the ohNet device stack selecting the crossover adapter in preference to the network adapter. I don't yet know whether the network adapter is wired or wireless.

If the network adapter is wireless, ohNet is selecting the wired crossover adapter in preference and this is causing the problem. If the network adapter is wired, ohNet is seeing two wired adapters and might be selecting the "wrong" adapter randomly.

I will ask the user whether the network adapter is wired or wireless.
Find all posts by this user
10-06-2015, 07:37 PM
Post: #4
RE: Multiple adapters on the same subnet
(10-06-2015 06:23 PM)simoncn Wrote:  Thanks for the quick reply!

The user has a Windows PC with one adapter connected to the network and one adapter connected via a crossover cable to a dedicated audio PC. Both adapters are on the same subnet. MinimServer is running on this PC and the user is unable to access MinimServer from other computers on the network.

It appears that the problem is caused by the ohNet device stack selecting the crossover adapter in preference to the network adapter. I don't yet know whether the network adapter is wired or wireless.

If the network adapter is wireless, ohNet is selecting the wired crossover adapter in preference and this is causing the problem. If the network adapter is wired, ohNet is seeing two wired adapters and might be selecting the "wrong" adapter randomly.

I will ask the user whether the network adapter is wired or wireless.

Assuming there isn't an easy workaround for your user, one cheapish solution might be to expose the native call to read a list of all available network adapters to Java and allow apps to specify a list of adapters to prefer (one per subnet).

I also wondered about running the device stack on all adapters. This would be possible but it'd have the potential confuse some control points - announcements would keep coming out for the same udn at multiple locations (one per adapter). Its easy to imagine some basic control points getting confused by this, inferring that a new announcement meant the old device had vanished.
Find all posts by this user
10-06-2015, 09:13 PM
Post: #5
RE: Multiple adapters on the same subnet
(10-06-2015 07:37 PM)simonc Wrote:  Assuming there isn't an easy workaround for your user, one cheapish solution might be to expose the native call to read a list of all available network adapters to Java and allow apps to specify a list of adapters to prefer (one per subnet).

I also wondered about running the device stack on all adapters. This would be possible but it'd have the potential confuse some control points - announcements would keep coming out for the same udn at multiple locations (one per adapter). Its easy to imagine some basic control points getting confused by this, inferring that a new announcement meant the old device had vanished.

A simple solution for this scenario could to be add an API to set a single adapter (by name) as an alternative to setting a single subnet. This would also improve usability for users who struggle with how to translate an adapter name on their computer into a masked subnet.

This doesn't handle the more complex case of specifying preferred adapters for multiple subnets. I suspect that any user who is capable of configuring this is also capable of configuring their adapters and subnets so that each adapter is on a separate subnet.

I don't think it would be a good idea to run the device stack on multiple adapters on the same subnet. I have had some experience of nasty problems caused by control points receiving the same UDN via multiple routing paths.

I am waiting to hear back from the user about whether he can use a different subnet for the crossover adapter as I have suggested to him.
Find all posts by this user
11-06-2015, 06:11 AM
Post: #6
RE: Multiple adapters on the same subnet
(10-06-2015 09:13 PM)simoncn Wrote:  This doesn't handle the more complex case of specifying preferred adapters for multiple subnets. I suspect that any user who is capable of configuring this is also capable of configuring their adapters and subnets so that each adapter is on a separate subnet.

On reflection, this could be handled by a simple extension to the API to set a preferred adapter by name. Instead of passing a single named adapter, the API could allow for passing one or more named adapters. In the case of passing multiple named adapters, it could be left to the user to decide whether it is safe/desirable to include multiple named adapters on the same subnet.
Find all posts by this user


Forum Jump: