Edge NAT gateways provide the network address translation feature to allow Edge Node Service (ENS) instances in virtual private clouds (VPCs) to access the Internet or provide services over the Internet.
Prerequisites
A VPC and a vSwitch are created on the corresponding node in the edge cloud.
Create an edge NAT gateway
Log on to the ENS console.
In the left-side navigation pane, click NAT Gateway.
Click Create NAT Gateway.
On the page that appears, configure the parameters. The following table describes the parameters.
Parameter
Description
Instance Name
The name of the NAT gateway.
Instance Type
Select an instance type from the drop-down list.
Region
Node: the edge node on which you want to create the NAT gateway.
Quantity: the number of NAT gateways.
Network ID/Name: the VPC to which the node belongs.
vSwitch ID/vSwitch Name: the vSwitch that corresponds to the node.
NoteYou can create NAT gateways on multiple edge nodes at the same time in the console.
Click Confirm.
Associate an EIP
Before you associate an elastic IP address (EIP) with a NAT gateway, make sure that you have created an edge NAT gateway.
Log on to the ENS console.
In the left-side navigation pane, click NAT Gateway.
On the NAT Gateway page, find the NAT gateway with which you want to associate an EIP, click , and then click Associate Public IP Address in the Actions column.
In the Associate Public IP Address dialog box, select an existing EIP from the drop-down list.
Click Confirm.
Disassociate an EIP
Make sure that the EIP to be disassociated is not used in any SNAT entry or DNAT entry. If the EIP is used in an SNAT or DNAT entry, delete the SNAT or DNAT entry first.
Log on to the ENS console.
In the left-side navigation pane, click Edge EIP.
On the Edge EIP page, find the EIP that you want to manage and click Disassociate in the Actions column.
In the message that appears, click OK.
Delete an edge NAT gateway
Before you delete a NAT gateway, make sure that the following requirements are met:
No EIP is associated with the edge NAT gateway. If an EIP is associated with the NAT gateway, disassociate the EIP from the NAT gateway.
The DNAT table does not contain DNAT entries. If the DNAT table contains DNAT entries, delete the DNAT entries.
The SNAT table does not contain SNAT entries. If the SNAT table contains SNAT entries, delete the SNAT entries.
Log on to the ENS console.
In the left-side navigation pane, click NAT Gateway.
On the NAT Gateway page, find the NAT gateway that you want to delete, and click Delete in the Actions column.
In the message that appears, click OK.