Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 49 Next »

This page describes how to create NAT rules for virtual datacenters. For details of how to configure NAT networks in infrastructure, see Manage NAT

Display NAT rules

When the Network Address Translation (NAT) integration is available in your environment, to display NAT IPs and NAT rules:

  1. Go to Virtual datacenters → select virtual datacenterNetworkNAT

     

To display NAT rules for a VM:

  1. Go to Virtual datacenters → select VM → go to VM control panel → select NAT

To manage or display NAT rules for a VM:

  1. Go to Virtual datacenters → edit VM → Networks → NAT

Create a NAT rule for DNAT

To enable VMs outside your VDC to connect to a VM with a private IP address, after you obtain a NAT IP, create a destination NAT rule, which is also called a DNAT rule. 

To create a DNAT rule:

  1. Go to Virtual datacenters → Virtual appliances → edit VM

  2. If your VM does not yet have an IP, go to Network → NICs and add a private IP

  3. Go to Network → DNAT

  4. Click the + add button on the top right-hand side of the tab

  5. Enter the details of the DNAT rule

    1. For the Original (NAT IP), select the IP address to receive external connections

    2. Select the Protocol for the connection, which can include TCP, UDP, any, and ICMP

    3. For the Translated IP, select the private IP that is attached to the VM

    4. Optionally, select the checkbox to Use all ports OR
      Enter the Original port for external connections. You cannot use an Original port for a NAT IP in more than one NAT rule.
      The platform will display the ports that are already used in other rules for the selected NAT IP.
      AND for the Translated port, enter the port on the VM

  6. Click Add

  7. Save the VM

Create a NAT rule for SNAT

To send outgoing traffic through a NAT IP that is not the default one, add an additional SNAT rule with these steps:

To create an SNAT rule:

  1. Go to Virtual datacenters → Virtual appliances → edit VM

  2. If your VM does not yet have an IP, go to NetworkNICs and add a private IP

  3. Go to Network → SNAT

  4. Click the + add button on the top right-hand side of the tab

  5. Enter the addresses of the SNAT rule

    1. For the Original IP, select the IP that is attached to the VM

    2. For the Translated (NAT IP), select the IP address to display for outgoing connections

  6. Click Add

  7. Save the VM

Use a NAT IP for a load balancer

To use a NAT IP address as a public IP address for a load balancer:

  1. Use the virtual datacenter's NAT IP address or obtain an additional NAT IP address. See Obtain an additional NAT IP address for a virtual datacenter

  2. Create the load balancer and select the NAT IP

Create load balancer

The platform will automatically create a NAT rule to match the port mappings of the routing rule of the load balancer.

Obtain an additional NAT IP for your virtual datacenter

In addition to the NAT IP address assigned to the virtual datacenter, you can obtain NAT IP addresses for creating additional NAT rules.

To obtain an additional NAT IP address:

  1. Go to Virtual datacenters Network → NAT

  2. Click the + add button on the top right-hand side of the screen

  3. Select the NAT network and click Accept

The platform will reserve an IP address and allocate it to your virtual datacenter.

Purchase IP

You can then use the NAT IP address as the public IP address for a load balancer or to provide access to a private IP address.

Limit NAT IP bandwidth for a VDC

You can use Quality of Service (QoS) traffic shaping parameters to limit the bandwidth for all the NSX NAT IPs in a virtual datacenter. 

Privileges: Manage NAT bandwidth limit

When you create a virtual datacenter, the new "natbandwidthlimit" attribute is present but you must edit the virtual datacenter to enable it in the platform and in the NSX. 

Networks in virtual datacenter view

To edit the bandwidth limit and apply it in the NSX:

  1. Select the virtual datacenter and go to Network → QoS

  2. Click the pencil edit button 

    1. To enable the bandwidth limit in a specific direction, select the Enabled checkbox for that direction

    2. Set QoS values for your virtual datacenter. Be sure to allow enough bandwidth to share between all the NAT IPs in the virtual datacenter.

NAT bandwidth limit

Field

Description

Provider ID

Read only

Enabled

To enable traffic shaping in a specific direction, select this checkbox

Average

The average amount of bandwidth, in bits per second, that the virtual datacenter can use

Peak

The maximum bandwidth in bits per second that the virtual datacenter can use

Burst size

The amount of data that can be transmitted at the peak bandwidth rate in bytes. A burst bonus accumulates when traffic is below the Average value and this bandwidth can be used for bursts.

To register changes that were made outside the platform, save existing NAT bandwidth values. In the API, to register changes, send a POST request with the existing values.

  • No labels