Use IPv6 for local messaging
You can configure the IP detector component to use IPv6 to send local messages.
Note
You must have IP detector v2.2.0 or later to use IPv6 to send local messages.
You can deploy the IP detector component to detect and use IPv6 addresses. You must update the configuration of the IP detector component to use IPv6 instead of IPv4. For more information, see Use IP detector to automatically manage endpoints.
Configure IP detector to use IPv6
If you have a simple network setup, such as the client devices on the same network as the core device, you can deploy the IP detector component to use IPv6 for local messaging.
The IP detector component overwrites endpoints that you set manually.
Important
The core device's AWS IoT policy must allow the
greengrass:UpdateConnectivityInfo
permission to use the IP detector
component. For more information, see AWS IoT policies for data plane operations and Configure the AWS IoT thing policy.
You can do either of the following to deploy the IP detector component:
-
Use the Configure discovery page in the console. For more information, see Configure cloud discovery (console).
-
Create and revise deployments to include the IP detector. You can use the console, AWS CLI, or AWS API to manage deployments. For more information, see Create deployments.
-
In the AWS IoT Greengrass console
navigation menu, choose Components. -
On the Components page, choose the Public components tab, and then choose aws.greengrass.clientdevices.IPDetector.
-
On the aws.greengrass.clientdevices.IPDetector page, choose Deploy.
-
From Add to deployment, choose an existing deployment to revise, or choose to create a new deployment, and then choose Next.
-
If you chose to create a new deployment, choose the target core device or thing group for the deployment. On the Specify target page, under Deployment target, choose a core device or thing group, and then choose Next.
-
On the Select components page, verify that the aws.greengrass.clientdevices.IPDetector component is selected, choose Next.
-
On the Configure components page, select aws.greengrass.clientdevices.IPDetector, and then do the following:
-
Choose Configure component.
-
In the Configure aws.greengrass.clientdevices.IPDetector modal, under Configuration update, in Configuration to merge, you can enter a configuration update to configure the IP detector component. You can specify any of the following configuration options. Set
includeIPv4Addrs
tofalse
andincludeIPv6Addrs
totrue
. You can then update the other IPv6 configuration options.-
defaultPort
– (Optional) The MQTT broker port to report when this component detects IP addresses. You must specify this parameter if you configure the MQTT broker to use a different port than the default port 8883. -
includeIPv4LoopbackAddrs
– (Optional) You can enable this option to detect and report IPv4 loopback addresses. These are IP addresses, such aslocalhost
, where a device can communicate with itself. Use this option in test environments where the core device and client device run on the same system. -
includeIPv4LinkLocalAddrs
– (Optional) You can enable this option to detect and report IPv4 link-local addresses. Use this option if the core device's network doesn't have Dynamic Host Configuration Protocol (DHCP) or statically assigned IP addresses. -
includeIPv6LoopbackAddrs
– (Optional) You can enable this option to detect and report IPv6 loopback addresses. These are IP addresses, such aslocalhost
, where a device can communicate with itself. Use this option in test environments where the core device and client device run on the same system. You must setincludeIPv4Addrs
tofalse
andincludeIPv6Addrs
totrue
to use this option. You must have IP detector v2.2.0 or later to use this option. -
includeIPv6LinkLocalAddrs
– (Optional) You can enable this option to detect and report IPv6 link-local addresses. Use this option if the core device's network doesn't have Dynamic Host Configuration Protocol (DHCP) or statically assigned IP addresses. You must set includeIPv4Addrs
tofalse
andincludeIPv6Addrs
totrue
to use this option. You must have IP detector v2.2.0 or later to use this option. -
includeIPv4Addrs
– (Optional) The default is set to true. You can enable this option to publish IPv4 addresses found on the core device. You must have IP detector v2.2.0 or later to use this option. -
includeIPv6Addrs
– (Optional) You can enable this option to publish IPv6 addresses found on the core device. SetincludeIPv4Addrs
tofalse
to use this option. You must have IP detector v2.2.0 or later to use this option.
The configuration update might look similar to the following example.
{ "defaultPort": "8883", "includeIPv4LoopbackAddrs": false, "includeIPv4LinkLocalAddrs": false, "includeIPv6LoopbackAddrs": true, "includeIPv6LinkLocalAddrs": true, "includeIPv4Addrs": false, "includeIPv6Addrs": true }
-
-
Choose Confirm to close the modal, and then choose Next.
-
-
On the Configure advanced settings page, keep the default configuration settings, and choose Next.
-
On the Review page, choose Deploy.
The deployment can take up to a minute to complete.
To deploy the IP detector component, create a deployment document that includes
aws.greengrass.clientdevices.IPDetector
in the components
object, and specify the configuration update for the component. Follow instructions in
Create deployments to create a new
deployment or revise an existing deployment.
You can specify any of the following options to configure the IP detector component when you create the deployment document:
-
defaultPort
– (Optional) The MQTT broker port to report when this component detects IP addresses. You must specify this parameter if you configure the MQTT broker to use a different port than the default port 8883. -
includeIPv4LoopbackAddrs
– (Optional) You can enable this option to detect and report IPv4 loopback addresses. These are IP addresses, such aslocalhost
, where a device can communicate with itself. Use this option in test environments where the core device and client device run on the same system. -
includeIPv4LinkLocalAddrs
– (Optional) You can enable this option to detect and report IPv4 link-local addresses. Use this option if the core device's network doesn't have Dynamic Host Configuration Protocol (DHCP) or statically assigned IP addresses. -
includeIPv6LoopbackAddrs
– (Optional) You can enable this option to detect and report IPv6 loopback addresses. These are IP addresses, such aslocalhost
, where a device can communicate with itself. Use this option in test environments where the core device and client device run on the same system. You must setincludeIPv4Addrs
tofalse
andincludeIPv6Addrs
totrue
to use this option. You must have IP detector v2.2.0 or later to use this option. -
includeIPv6LinkLocalAddrs
– (Optional) You can enable this option to detect and report IPv6 link-local addresses. Use this option if the core device's network doesn't have Dynamic Host Configuration Protocol (DHCP) or statically assigned IP addresses. You must set includeIPv4Addrs
tofalse
andincludeIPv6Addrs
totrue
to use this option. You must have IP detector v2.2.0 or later to use this option. -
includeIPv4Addrs
– (Optional) The default is set to true. You can enable this option to publish IPv4 addresses found on the core device. You must have IP detector v2.2.0 or later to use this option. -
includeIPv6Addrs
– (Optional) You can enable this option to publish IPv6 addresses found on the core device. SetincludeIPv4Addrs
tofalse
to use this option. You must have IP detector v2.2.0 or later to use this option.
The following example partial deployment document specifies to use IPv6.
{
...
, "components": {...
, "aws.greengrass.clientdevices.IPDetector": { "componentVersion": "2.1.1", "configurationUpdate": { "merge": "{\"defaultPort\":\"8883\",}" } } } }