question

asergaz avatar image
1 Vote"
asergaz asked ·

How to get private IP of the IoT Hub?

Is there any way to get private IP of the IoT Hub?

[Note: As we migrate from MSDN, this question has been posted by an Azure Cloud Engineer as a frequently asked question]

Source: MSDN


azure-iot-hub
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AshokPeddakotla-MSFT avatar image
1 Vote"
AshokPeddakotla-MSFT answered ·

You can use “nslookup” to get the IP address of the IoT Hub.

Ex: nslookup IoTHubname.azure-devices.net

Note that, once you have created an IoT hub in an Azure region, the IoT hub keeps the same IP address for the lifetime of that IoT hub. However, if Microsoft moves the IoT hub to a different scale unit to maintain quality of service, then it is assigned a new IP address.

The IP address prefixes of IoT hub are subject to change. These changes are published periodically via service tags before taking effect. It is therefore important that you develop processes to regularly retrieve and use the latest service tags. This process can be automated via the service tags discovery API . Note that Service tags discovery API is still in preview and in some cases may not produce the full list of tags and IP addresses. Until discovery API is generally available, consider using the service tags in downloadable JSON format. 

Doc Reference: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-understand-ip-address

Source: MSDN


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered ·

At this moment, the IoT Hub service tags are not yet available in the CLI, Powershell, or Rest API access. The JSON file download is the solution for now.

If you want to see how to automate the retrieval of service tags, here it is shown using the REST API: https://sandervandevelde.wordpress.com/2020/06/05/access-azure-api-with-a-bearer-token-for-impersonation/

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.