Device policiesService policiesEnable device-to-device communication

Enable device-to-device communication

Your role needs permission to update device-to-device settings. Without the update permission, the switch is read-only.

Device-to-device (D2D) communication lets your devices exchange IP traffic with each other directly over the emnify network. You turn it on per service policy in Device Policies on the emnify Portal.

Device-to-device communication is off by default on every service policy. For two devices to communicate, turn it on for the service policy of each device. If only one policy has it on, return traffic is blocked.

Devices must belong to the same organization and region. Device-to-device communication doesn’t work between organizations or across regions.

Prerequisites

Device-to-device communication is opt-in. The Device-to-Device communication switch only appears for organizations that have it enabled. To request access, contact emnify support.

Your organization also needs a virtual network before you can turn on device-to-device communication. If it doesn’t have one, the switch is unavailable and a hint says device-to-device isn’t supported for your organization. Contact emnify support to set up a virtual network for your organization.

Enable device-to-device communication

1

In Service Policies, choose the policy you want to update and expand the policy details.

2

In Connectivity, find the Device-to-Device communication switch.

3

Turn the switch on. The change saves automatically and takes effect without devices reconnecting. If saving fails, the switch returns to its previous position and an error message appears.

4

Repeat these steps for the service policy of every device that needs to communicate with devices on this policy.

Disable device-to-device communication

1

In Service Policies, choose the policy you want to update and expand the policy details.

2

In Connectivity, find the Device-to-Device communication switch.

3

Turn the switch off. The change saves automatically, and devices on this policy can no longer communicate with other devices.

Configure device-to-device communication with the emnify REST API

You can also retrieve or update the device-to-device mode of a service policy using the emnify REST API. The API offers a third mode, forward_to_backend, which routes traffic between devices through your Cloud Connect backend instead of delivering it directly, for example so your own firewall can inspect it. This mode only prepares the configuration. It requires a default route over Cloud Connect, and OpenVPN isn’t supported. Until the setup is complete, traffic between devices is dropped.

For details, see Retrieve device-to-device mode of a service profile and Update device-to-device mode of a service profile in the API reference.