Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

FloatingIP/DNAT for IPv6 Addresses

SUMMARY Juniper Cloud-Native Contrail release 23.1 supports FloatingIP, or Dynamic Network Address Translation (DNAT), for dual stack-enabled services (ClusterIP). This article provides information about how this feature works in CN2.

Prerequisites

This feature requires the following:
  • An environment running CN2 release 23.1 or later
  • A Kubeadm or Kubespray Kubernetes cluster with dual-stack featureGate enabled. For more information, see IPv4 and IPv6 Dual-Stack Networking.
  • Kubernetes nodes configured with dual stack network interfaces

FloatingIP/DNAT Overview

In CN2, a FloatingIP implements ClusterIP functionality. After you create a service, a FloatingIP is allocated to that service from the service subnet and associated to all the back-end pod VMIs in the cluster. The vRouter performs DNAT for the back-end pods. This process comprises Equal-Cost Multi-Path Routing (ECMP) load balancing, where the back-end pod VMIs act as ECMP paths.

DNAT for IPv6 Overview

CN2 release 23.1 supports DNAT (FloatingIP) for IPv4 and IPv6 addresses for the CN2 ClusterIP service. DNAT for IPv6 functions the same as DNAT for IPv4; create a service (ClusterIP), specify PreferDualStack for the ipFamilyPolicy, and an IPv6 FloatingIP is allocated to that service. The vRouter performs DNAT and routes traffic to the next hop, or the translated destination address (back end pod VMI). from external networks to your back-end pod VMIs.

Deploy FloatingIP/DNAT

Complete the following steps to deploy this feature.

  • Configure and install a Deployment. The Deployment object creates the back-end pods for the ClusterIP service. The following is an example Deployment. This Deployment creates a pod named nginx with a mounted nginx-xconf config.

  • Create a ClusterIP service. The following is an example service.

    Note the following fields:

    • labels: Identifies back-end pods with the app: nginx label.

    • selector: Instructs the service to select VMIs belonging to back-end pods the with app: nginx label.

    • ipFamilies: Specifies the IP family the ClusterIP service uses. The default is IPv4. To use both IP families, use the value IpFamilyPolicy: PreferDualStack.