A subnet in an NSX VPC represents an independent layer 2 broadcast domain. NSX VPC subnets are realized as overlay segments in the default transport zone of the project.
Prerequisites
- VPC Admin
- Network Admin
Procedure
Results
When a subnet is realized successfully in the NSX VPC, the Status column shows Successful.
Subnets in an NSX VPC are realized as overlay segments in the default transport zone of the project.
An Enterprise Admin or a Project Admin can view these overlay segments by doing these steps:
- Ensure that you are in the project view.
- Navigate to .
- Click the VPC realized objects check box at the bottom of the Segments page.
For example:
This screen capture shows two system-created segments orders_vpc_subnet and sales_vpc_subnet. These segments represent subnets in the sales_vpc, and are displayed in a read-only mode on the Segments page.
What to do next
You can now start attaching workload VMs to the subnet by using the vSphere Client.
The following subsections briefly explains some tasks that you can do after a subnet is realized in an NSX VPC.
- Set subnet ports
-
On the Set Subnets dialog box, under the Subnet Ports column, click Set, and then click Add Subnet Port.
The workflow for adding ports on an NSX VPC subnet is the same as it is for adding ports on an NSX segment. To learn more, see the steps for adding segment ports in Create an NSX Segment.
- View IPAM statistics of NSX VPC subnets
-
Expand the subnet details and click View IPAM Statistics. At the time of subnet creation, if DHCP in the NSX VPC is managed by NSX or by external DHCP servers, the IPAM Statistics page displays the DHCP IP pool range.
The system automatically allocates 100% of available IP addresses in the subnet to the DHCP pool range. The system reserves four IP addresses from the subnet for its internal use. The DHCP static IP pool is empty and hence it is not displayed on IPAM Statistics page. You cannot edit the system-managed DHCP pool configuration of the VPC subnet.
For example:
In this screen capture, the sales_vpc_subnet is a private subnet with size 16. The DHCP configuration for this subnet is automatically managed by NSX. The system reserves four IP addresses from the subnet for its internal use, by default. So, the remaining 12 IP addresses are automatically allocated to the DHCP IP pool range (193.0.1.3-193.0.1.14). The IP addresses are dynamically assigned to the workload VMs on the subnet from this DHCP pool range.
If you prefer to manually configure the DHCP pool ranges for dynamic and static IP assignments in the VPC subnet, you can add the subnet in the NSX VPC by running the following NSX API. Currently, the UI does not support manual DHCP configuration of NSX VPC subnets.
PUT https://<nsx-mgr>/policy/api/v1/orgs/default/projects/<project-id>/vpcs/<vpc-id>/subnets/<subnet-id>/
Example Request Body:
{ "ipv4_subnet_size": 16, "access_mode": "Public", "resource_type": "VpcSubnet", "dhcp_config": { "enable_dhcp": true, "static_pool_config": { "ipv4_pool_size": 8 } } }
This example payload shows that you have created a public NSX VPC subnet of size 16. You have specified the size of the static IP pool as eight. Therefore, out of the total 12 IP addresses that are available for allocation to the workloads in the NSX VPC subnet, the remaining four IP addresses are allocated to the DHCP IP pool for a dynamic IP assignment.
When you view the IPAM Statistics page of this NSX VPC, the system displays the IP address utilization of both the DHCP IP pool and the static IP pool.
At the time of subnet creation, if DHCP in the NSX VPC is none, the IPAM Statistics page of the subnet displays only the static IP pool information.
- View traffic statistics of NSX VPC subnets
-
Expand the subnet details and click View Subnet Statistics.
If you want to view the traffic statistics for the full NSX VPC, and not for a specific subnet in the VPC, expand the NSX VPC details, and then click View VPC Statistics.