Skip to content

feat(NODE-1881): Discover external IPv6 in the cloud environment#9243

Open
blind-oracle wants to merge 9 commits intomasterfrom
igor/guestos-cloud-ip-discover
Open

feat(NODE-1881): Discover external IPv6 in the cloud environment#9243
blind-oracle wants to merge 9 commits intomasterfrom
igor/guestos-cloud-ip-discover

Conversation

@blind-oracle
Copy link
Contributor

@blind-oracle blind-oracle commented Mar 8, 2026

Main points:

  • Add an obtain_public_ip() method to the CloudType that discovers external IP. Azure only for now since AWS/GCP give direct IPv6 to the VM
  • Use wildcard IPv6 (::) in ic.json5 in listening endpoints, remove ipv6_address from the template. The ipv6_prefix needs to stay for now since that allows access from the /64 subnet that guest shares with host (to allow upgrades etc) - maybe we can do it somehow nicer later.
  • Add logic to pick the best IP address on the interface (prefer global over local/private ones)
  • Activate DHCPv4 client on the network interface to be able to talk to cloud metadata servers
  • Change Orchestrator to discover the node's IPv6 address using the best interface (the same way as bootstrap does) instead of just reading the endpoint's IPs from the ic.json5. Fallback to cloud discovery if the IP is link-local (I wonder if we might have a legitimate non-cloud use case with link-locals?)

Chore:

  • Move interface selection & cloud discovery code into shared config/tool/guestos to be able to use it from both config tool and Orchestrator
  • Improve helper functions that fetch interface's IP addresses
  • Use ipnet crate to deal with IPv6 subnets in a clean way (instead of splitting strings etc)
  • Drop get_if_addrs crate in favor of getifs - the former only returns 1 IP address from an interface
  • Cleanup Orchestrator from some dead code (removed the #[allow(dead_code)] clause)

@github-actions github-actions bot added the feat label Mar 8, 2026
@blind-oracle blind-oracle marked this pull request as ready for review March 10, 2026 07:20
@blind-oracle blind-oracle requested review from a team as code owners March 10, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant