Implementing a Multi-Homed WSD Device

WS-Discovery and the Devices Profile for Web Services (DPWS) do not describe the implementation of multi-homed devices. This topic describes multi-homed device support in WSDAPI, and provides implementation recommendations to client and device developers. In this topic, it is assumed that discovery messages are sent over both IPv4 and IPv6 (if available) with the same message ID and application sequencing information.

Discovery in a multi-homed environment

As mentioned in Hello and XAddrs section of Additional WS-Discovery Functionality, WSDAPI never provides XAddrs in a Hello message. That means the same Hello message can be sent on all network interfaces with the same message ID and application sequencing information. This makes it easier for client collision detection to discard multiple Hello messages from the same device when a client and the device share more than one subnet.

Because the XAddrs are not sent in the Hello message, client implementations must send a Resolve message to get the relevant device address. The Resolve should be sent on all client interfaces with the same message ID, and the device should filter duplicate messages as needed. Using the same message ID for the Resolve message allows the device to pick a preferred interface for communicating with clients if necessary.

When sending a ResolveMatch message, a device should provide XAddrs that relate to the network interface over which it is unicasting the message. This practice helps to avoid multiple client connection attempts and complicated retry logic.

Metadata exchange in a multi-homed environment

Implementing metadata exchange in a multi-homed environment is more difficult than implementing discovery because of metadata versioning. If a client requests metadata over multiple interfaces, then the client can receive multiple GetResponse messages over different interfaces. These GetResponse messages can contain different Relationship metadata sections with the same metadata version. This reduces the value of the metadata version number.

There is an alternative approach, where a single GetResponse message is sent in response with all addresses for the service. The disadvantage of this method is that private information, such as the topology of indirectly accessible networks, may be disclosed.

On Windows Vista, the metadata provided by WSDAPI contains only addresses that are valid for the interface upon which the metadata request was received.