Network Services
Configure the required network services based on how workloads are addressed and accessed.
Segments and gateways define connectivity in a workload network. Network services build on this connectivity to meet workload addressing and access requirements. Administrators configure the appropriate services based on how clients obtain network parameters, the addresses used to access workloads, and whether requests need to be distributed to multiple backends. These services can be used independently or combined to meet workload requirements.
DHCP Services
Understand the relationship between a segment's addressing plan and DHCP, and how single-stack and dual-stack services are organized.
DHCP provides addresses, DNS settings, and other network parameters to workload NICs that use automatic address configuration.
A DHCP service belongs to a segment. The segment's IPAM defines its subnet, gateway, and available address ranges. DHCP uses the addressing plan for the corresponding IP version to provide automatic address configuration to clients in that segment.
Each segment can have at most one DHCP service. The service can contain one configuration for IPv4 and one for IPv6. A single-stack configuration uses one IP version; a dual-stack configuration includes separate IPv4 and IPv6 addresses and network parameters within the same service.
Configure a Segment DHCP Service
Configure DHCP for segments managed by ZNS to provide the network parameters required for automatic address configuration on workload NICs.
Before you begin
- A non-system segment managed by ZNS is available. To create one, see Create a Segment; to identify resource ownership, see View Segments and Ports.
- You have prepared the gateway address, prefix length, and available address range for the IP version used for address allocation, and confirmed that the addresses do not conflict with those already used by workloads. To make changes, see Adjust Segment Configuration.
- For DHCPv6, the segment must be of the Overlay type, and clients must support the planned IPv6 address configuration mode. VLAN segments do not support DHCPv6.
About this task
This procedure creates a segment DHCP service in ZNS. For segments managed by ZSphere, DHCP and addressing settings are maintained in ZSphere. The corresponding operations are described in VM Network Connection and Use.
Procedure
Results
The segment DHCP configuration is deployed. Clients can obtain network parameters according to the selected IP version and address configuration mode.
Manage Segment DHCP Services
Adjust existing segment DHCP configurations, or delete and recreate a service after checking client usage.
Adjust DHCP Configuration
Only adjust non-system segments managed by ZNS here. For segments managed by ZSphere, return to ZSphere to make changes. To identify ownership, see View Segments and Ports.
- In ZNS, go to and open the target segment's DHCP Services tab. From the service's Actions menu, select Edit.
- For a dual-stack service, first select the IP version to modify. Check Address Plan for the CIDR, gateway, IPAM range, DHCP server IP, and system reserved addresses.
-
Modify the name, description, Start IP, End IP, Lease Time (Seconds), DNS Servers, Domain Names or Static Routes (Destination CIDR / Next Hop) as needed. The name must contain 1–64 characters without spaces. The description must not exceed 255 characters.
When changing the range, enter both the start and end addresses using the same IP version. The start address must not exceed the end address. Both must be within the segment CIDR and exclude reserved addresses such as the gateway and DHCP service addresses.
For the purposes and value requirements of the other parameters, see DHCP Service Parameters.
- Changing the address range and distributed parameters changes the network parameters clients receive when they next obtain or renew an address. Confirm that addresses in use, the gateway, DNS settings, and client configurations are consistent with the change, then click OK.
- Check the segment configuration state, and verify client addresses and network parameters after address acquisition or lease renewal.
Changes to the segment's IPAM address ranges are synchronized to the DHCP address range. To change addressing settings as well, complete the segment changes first, then check the DHCP range and reserved addresses. Recheck any custom DHCP range too.
The current editing window does not support changing the DHCP server IP, DHCPv6 mode, or the IP versions included in the service. To change these settings by recreating the service, first record the existing single-stack or dual-stack configuration and assess the impact of interrupting address acquisition and lease renewal. Then follow Delete a DHCP Service and Configure a Segment DHCP Service to recreate the service.
Delete a DHCP Service
Perform this operation only on non-system segments managed by ZNS. DHCP services currently have no separate enable or disable operation. Deletion removes the service's IPv4 and IPv6 configurations, and clients can no longer obtain or renew addresses through it. Existing clients' network access may also be affected when their leases expire.
- Go to and open the target segment's DHCP Services tab.
- Confirm that clients have an alternative address configuration, or that you have recorded the single-stack or dual-stack parameters needed to recreate the service. From the target service's Actions menu, select Delete.
- Check the service and its segment. Confirm that interrupting address acquisition and lease renewal is acceptable, enter delete, and click Confirm to Delete.
- Return to the list to confirm that the service has been deleted, and check the segment configuration state. To recreate it, follow Configure a Segment DHCP Service to restore the required configuration and verify it on the clients.
NAT
Select SNAT, DNAT, or Reflexive NAT address translation rules based on the direction of traffic to or from workloads.
A NAT rule is associated with a Tier-0 or Tier-1 gateway and translates IPv4 addresses for matching traffic on that gateway. Different rule types apply to different traffic directions and translation purposes.
| Rule Type | Purpose | Translation Example |
|---|---|---|
| SNAT | Translate internal source addresses to an egress address for outbound workload traffic. | 192.168.10.0/24 → 198.51.100.10 |
| DNAT | Forward requests sent to an external address to an internal service, optionally mapping the service port as well. | 198.51.100.20:8443 → 192.168.10.20:443 |
| Reflexive NAT | Create a one-to-one bidirectional address mapping for a single internal address. | 192.168.10.30 ↔ 198.51.100.30 |
Create an SNAT Rule
Translate internal source IPv4 addresses in outbound workload traffic to a specified egress address.
Before you begin
- A gateway to host the translation rule is available. To prepare a gateway, see Create a Tier-0 Gateway and Create a Tier-1 Gateway.
- You have planned the internal source address range and egress address, and the required interfaces and routes are ready. To configure any missing interfaces or routes, see Configure Gateway Router Interfaces and Configure Gateway Static Routes.
- If you use a Tier-1 gateway and need to advertise NAT IPs upstream, you have followed Set Tier-1 Route Advertisement Rules to configure advertisement. Rules with an explicitly specified interface do not participate in NAT IP advertisement to the upstream Tier-0. Prepare the required access paths for their translated addresses separately.
Procedure
Results
The SNAT rule has been created. Matching outbound traffic uses the specified source address.
Create a DNAT Rule
Forward requests sent to an external IPv4 address to an internal service, optionally mapping the service port as well.
Before you begin
- A gateway to host the translation rule is available. To prepare a gateway, see Create a Tier-0 Gateway and Create a Tier-1 Gateway.
- You have planned the external access address and internal service address, and determined the external and internal ports and protocol if port mapping is required. The required interfaces and routes are ready. To configure any missing interfaces or routes, see Configure Gateway Router Interfaces and Configure Gateway Static Routes.
- If you use a Tier-1 gateway and need to advertise NAT IPs upstream, you have followed Set Tier-1 Route Advertisement Rules to configure advertisement. Rules with an explicitly specified interface do not participate in NAT IP advertisement to the upstream Tier-0. Prepare the required access paths for their translated addresses separately.
Procedure
Results
The DNAT rule has been created. Matching inbound requests have their destination address and optional destination port translated as configured.
Create a Reflexive NAT Rule
Create a one-to-one bidirectional translation between a single internal IPv4 address and an external mapped address.
Before you begin
- A gateway to host the translation rule is available. To prepare a gateway, see Create a Tier-0 Gateway and Create a Tier-1 Gateway.
- You have planned the internal address and corresponding external mapped address, and the interfaces and routes required for bidirectional access are ready. To configure any missing interfaces or routes, see Configure Gateway Router Interfaces and Configure Gateway Static Routes.
- If you use a Tier-1 gateway and need to advertise NAT IPs upstream, you have followed Set Tier-1 Route Advertisement Rules to configure advertisement. Rules with an explicitly specified interface do not participate in NAT IP advertisement to the upstream Tier-0. Prepare the required access paths for their translated addresses separately.
Procedure
Results
The Reflexive NAT rule has been created. The internal and external mapped addresses are translated bidirectionally using a one-to-one mapping.
Manage NAT Rules
Modify NAT translation settings, enable or disable rules, and delete rules that are no longer needed.
Adjust NAT Rules
Changing translation addresses, the interfaces to which rules apply, or match conditions changes the address translation scope and workload access paths, and may interrupt connections using the original rule.
- In ZNS, open , and from the target rule's Actions menu, select Edit.
-
Modify the name, description, interface to which the rule applies, and translation addresses, ports, and match conditions for the current rule type as needed. The rule's gateway and type cannot be changed here.
- Check the translation direction, address reachability, and conflicts with existing rules, then click OK.
- Return to the list, check the address translation, state, and deployment status, and verify access to or from workloads in the direction to which the rule applies.
Enable and Disable Rules
After disabling a rule, matching traffic no longer undergoes the corresponding address translation, which may interrupt workload access that depends on it. Disabling retains the configuration for later restoration.
- In ZNS, open , check the rule's address translation, and from the enabled rule's Actions menu, select Disable.
- Confirm that the impact is acceptable for the affected workloads, select the risk acknowledgment checkbox, and click Disable.
- Return to the list to check the state and deployment status, and verify that disabling the rule has the intended effect on workload access.
- To restore a rule, first confirm that the translated addresses and access paths are still available. From the disabled rule's Actions menu, select Enable, select the risk acknowledgment checkbox, and click Enable. Then check workload access.
Delete a NAT Rule
After deletion, the corresponding address translation is no longer performed, which may interrupt outbound or inbound access. First check the original and translated addresses, ports, and match scope, and make arrangements for any access that must be maintained.
- Go to , and from the target rule's Actions menu, select Delete.
- Check the rule name and workload impact, enter delete, and click Confirm to Delete.
- Return to the list to confirm that the rule has been deleted, and verify that required workload access is maintained.
Layer 4 Load Balancing
Understand the access endpoints, backend resources, and configuration dependencies of Layer 4 load balancing.
Layer 4 load balancing provides a unified access endpoint for TCP or UDP workloads and distributes client requests to backend members.
- Virtual Server
Defines the client-facing VIP, protocol, and listener port, and is associated with one server pool and an optional session persistence profile.
- Server Pools and Members
A server pool organizes members that receive requests. Each member identifies a backend service by its address and service port.
- Health Monitor
Enables a server pool to check member availability. This configuration is optional for a server pool.
- Session Persistence Profile
Enables a virtual server to select the connection fields used as the basis for request distribution. This configuration is optional for a virtual server.
Prepare a server pool and its members before creating a virtual server. If health monitoring or session persistence is required, prepare the corresponding configuration before associating it. Existing suitable resources can be reused.
Create a Health Monitor
Create an OVN health monitor that specifies the parameters used by load balancing server pools to check member availability.
About this task
To check backend member availability through load balancing, first prepare a health monitor for a server pool to reference. If a monitor that meets the workload requirements already exists, you can select it when creating a server pool as described in Create a Server Pool and Add Members.
Procedure
Results
The health monitor has been created. You can select it when creating a server pool as described in Create a Server Pool and Add Members, or follow Adjust Server Pools and Members to associate it with an existing server pool.
Create a Server Pool and Add Members
Create a server pool associated with a Tier-1 gateway and select segment ports to add the backend members that receive workload requests.
Before you begin
- A target Tier-1 Gateway is available, and the segments hosting the backend workloads are attached to it.
- Backend workloads are running. Their VM NICs are connected to the network, with corresponding segment ports that have IPv4 addresses. To check ports, see View Segments and Ports. VM NIC connection is covered in VM Network Connection and Use.
- If member availability checks are required, a suitable health monitor is available. To create one, see Create a Health Monitor.
Procedure
Results
The server pool and its members are ready. You can select the pool when creating a virtual server as described in Create a Virtual Server. Workload requests are forwarded from the virtual server's access endpoint to available members of this pool.
Create a Session Persistence Profile
Create a reusable session persistence profile for load balancing, specifying distribution criteria and an optional persistence timeout.
About this task
Create a session persistence profile and reference it from a virtual server to distribute requests consistently when they have the same values in the specified connection fields. The current profile Type is Session Persistence.
Procedure
Results
The session persistence profile has been created. Select it when creating a virtual server as described in Create a Virtual Server, or follow Adjust a Virtual Server to associate it with an existing virtual server before use.
Create a Virtual Server
Create a Layer 4 load balancing access endpoint for a workload by configuring its VIP, protocol (TCP or UDP), and listener port and associating a server pool.
Before you begin
- You have completed Create a Server Pool and Add Members, confirmed that the backend workloads are available, and planned the client-facing VIP, protocol, and port.
- If session persistence is required, you have completed Create a Session Persistence Profile.
- Access paths from clients to the VIP and from the gateway to backend workloads are ready. To advertise the VIP upstream, you have followed Set Tier-1 Route Advertisement Rules to enable All LB VIP Routes and confirmed that the upstream network has the required routes.
Procedure
Results
The virtual server provides a workload access endpoint and distributes requests to available members of the selected server pool.
Adjust Load Balancing Configurations and Members
Modify existing virtual servers, server pools, and supporting configurations, and adjust backend members and their participation in request distribution.
In ZNS, open . Before making changes, check the workloads served, the addressing plan, and references. When a shared health monitor or session persistence profile changes, check all server pools or virtual servers that reference it.
Names for the following objects must contain 1–64 characters without spaces.
Adjust a Virtual Server
The associated Tier-1 gateway cannot be changed. The server pool must still belong to the same gateway. You can replace or clear the session persistence profile.
The VIP must be a single usable IPv4 address. The listener port must be from 1 to 65535, and the protocol must be TCP or UDP. Virtual servers under the same Tier-1 cannot use an identical combination of VIP, protocol, and listener port. Avoid conflicts with existing NAT or load balancing listeners. Changing listener or forwarding configurations may interrupt connections.
- Open the Virtual Servers tab, and from the target virtual server's Actions menu, select Edit.
- Modify the name, description, VIP, listener port, protocol, server pool, or profile as needed. Check the access endpoint, associated resources, and workload impact, then click OK.
- Return to the list or details to check the configuration, then verify virtual server access and request distribution from a client.
Temporarily disable and restore:
After disabling, the virtual server no longer provides access through its VIP, protocol, and listener port, and related requests may fail. Disabling retains the current configuration for later restoration.
- In the Virtual Servers tab, check the VIP, protocol, and listener port. From the enabled virtual server's Actions menu, select Disable.
- Confirm that the impact is acceptable for the affected workloads, select the risk acknowledgment checkbox, and click Disable.
- Return to the list to check the state, and verify that disabling the virtual server has the intended effect on workload access.
- To restore service, first confirm that the access paths and backend workloads are still available. From the disabled virtual server's Actions menu, select Enable, select the risk acknowledgment checkbox, and click Enable. Then check workload access.
Adjust Server Pools and Members
The associated Tier-1 gateway cannot be changed. You can replace or clear the health monitor. This changes how member availability is determined for the pool and may affect virtual servers referencing it.
- Open the Server Pools tab, and from the target pool's Actions menu, select Edit.
- Modify the name, description, and associated health monitor as needed. Confirm the impact on workloads that use this pool, then click OK.
- Return to the list or details to check the configuration, then check backend workload access through the virtual server.
In the Server Pools tab, open the target pool and open Pool Members. Check member IPs, service ports, and available capacity of other members before making changes.
- Add members: Click Add Pool Member and follow Add Pool Member to select segment ports under the same Tier-1 and configure their ports.
- Modify a member port: For the target member, choose Edit, change Port to the port on which the service actually listens, in the range 1–65535, check it, and click OK. The IP address is read-only. To change the backend address, first add the corresponding new member, then handle the old member.
- Temporarily disable a member: For an enabled member, choose Disable. The member stops participating in server pool traffic distribution, which may reduce service capacity or interrupt related connections. Confirm that other members can handle the workload, select the risk acknowledgment checkbox, and click Disable.
- Restore a member: Confirm that the backend workload has recovered. For the disabled member, choose Enable, check the member address and port, select the risk acknowledgment checkbox, and click Enable.
After making changes, check IPs, ports, and states in the member list, and verify workload access through the virtual server. To remove a member permanently, see Clean Up Load Balancing Resources.
Adjust a Health Monitor
The monitoring interval, timeout period, rise count, and fall count must be integers greater than 0. The timeout must not exceed the interval. For parameter meanings, see Health Monitor Parameters. Changes apply to server pools referencing this monitor.
- Open the Health Monitors tab, and from the target monitor's Actions menu, select Edit.
- Modify the name, description, monitoring interval, timeout period, rise count, or fall count as needed. Check which resources reference this configuration and confirm the impact on workloads, then click OK.
- Return to the list or details to check the parameters, and check workload access through the server pools that reference the monitor and their virtual servers.
Adjust a Session Persistence Profile
Select at least one persistence criterion from Source IP, Source Port, Destination IP, and Destination Port. Select Source IP for persistence by client address. Selecting Source Port as well further distinguishes connections from the same client.
The persistence timeout is optional. If entered, it must be 1–65535 seconds. Changes affect virtual servers referencing this profile.
- Open the Profiles tab, and from the target profile's Actions menu, select Edit.
- Modify the name, description, persistence criteria, or persistence timeout as needed. Check which resources reference this configuration and confirm the impact on workloads, then click OK.
- Return to the list or details to check the parameters, and check request distribution through virtual servers referencing the profile.
Clean Up Unused Load Balancing Resources
Check workload usage and object references, remove unused members or virtual servers, and clean up supporting resources that are no longer needed.
When permanently removing load balancing resources in the ZNS management interface, resolve references according to the resources you want to remove. Deletion cannot be undone. To restore the resources, you must recreate their configurations. To temporarily stop a service or member from participating in distribution, follow Adjust Load Balancing Configurations and Members and retain the configuration for later restoration.
Go to and resolve references according to which workload resources are being removed.
| Cleanup Target | Order and Direct Impact |
|---|---|
| Remove a virtual server | Confirm that its VIP and listener port are no longer used, then delete the virtual server. Its server pool, health monitor, and session persistence profile can still be reused by other services and are not deleted with the virtual server. |
| Remove a pool member | Open the server pool's Pool Members tab, confirm that other members can handle the workload, then delete the target member. This member will no longer receive requests through this pool, which may reduce service capacity. |
| Clean up a server pool | First replace the pool in every virtual server referencing it, or delete virtual servers that are no longer used. Then delete the server pool. A pool still referenced by a virtual server cannot be deleted; disabling a virtual server does not remove the reference. Deleting a server pool also deletes its member configurations. |
| Clean up a health monitor | First replace or clear the health monitor in every server pool referencing it, or delete server pools that are no longer used. Then delete the monitor. A monitor still referenced by a server pool cannot be deleted. |
| Clean up a session persistence profile | First replace or clear the profile in every virtual server referencing it, or delete virtual servers that are no longer used. Then delete the profile. A profile still referenced by a virtual server cannot be deleted; disabling a virtual server does not remove the reference. |
To replace or remove references, see Adjust Load Balancing Configurations and Members. Supporting objects may be shared by multiple workloads. Check their references individually before cleanup.
- After handling the dependencies above, open the appropriate tab or pool member list and, for the target object, choose Delete.
- Check the object name, or the IP address for a member. Confirm the workload impact, enter delete, and click Confirm to Delete.
- Return to the list to confirm deletion, and check the virtual servers and server pools still in use, along with access to the remaining workloads.
