Network Management
Network Resource
Distributed Switch
Through distributed switches, you can set up and configure network connections in the ZStack ZSphere environment.
After the first host is added to the cluster, ZStack ZSphere automatically creates a default distributed switch, a default distributed port group, and a default Kernel adapter based on the host's related configuration. These are used for centralized management of the host's management network. Based on your network planning, you can flexibly reuse the default distributed switch or use a newly created distributed switch.
Create a Distributed Switch
Procedure
- In the navigation pane, choose .
- In the resource tree, right-click a target data center and select New Distributed Switch.
-
In the New Distributed Switch dialog:
-
Review the configuration and click OK.
Note:
- When adding either a single NIC or a bonded NIC to the distributed switch, the bridge names created by distributed port groups will all start with
br_dvs. - If the management network address was originally configured on a physical NIC or sub-interface before adding the host, it will be moved to the
br_dvs{ID}_{VLAN ID}bridge after addition. When removing the host, the management address will revert back to the physical NIC or sub-interface. - If the management network address was already on a
brbridge (for example, a user-definedbr_{name}_{VLAN ID}) before adding the host, the bridge name will remain unchanged. In scenarios where management and business networks share NICs, when the new distributed port group's VLAN differs from the management network VLAN, the created bridge will still follow thebr_dvs{ID}_{VLAN ID}naming convention, but this will not affect the NIC hosting the management address.
- When adding either a single NIC or a bonded NIC to the distributed switch, the bridge names created by distributed port groups will all start with
Distributed Switch Uplink
Modify Uplink Configurations
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed switch.
- On the target distributed switch's details page, click the Uplink tab.
- Click Modify Configuration.
-
In the Modify Uplink Mode dialog, modify the bond mode and hash policy as needed.
Note:
- You can modify the bond mode when there are joined hosts, but only if the default distributed switch uses a single NIC.
- When no hosts are joined, you can only modify the bond mode of a default distributed switch.
- Click OK.
Manage Joined Hosts
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed switch.
- On the target distributed switch's details page, click the Uplink tab.
-
In the Joined Host list, select a target host.
Configure Uplinks for Hosts
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed switch.
- On the target distributed switch's details page, click the Uplink tab.
-
In the Unjoined Host list, select a target host.
Network Topology
View Network Topology
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed switch.
- On the target distributed switch's details page, click the Network Topology tab.
-
View the network topology.
The network topology displays the network relationship structure centered around the distributed switch, showing its associations with clusters, hosts, distributed port groups, and virtual machines.
Supported Network Topology Operations
| Operation | Description |
|---|---|
| Refresh | Displays the current latest network topology. |
| Zoom In / Zoom Out | Zooms in or out to view the network topology. |
| Default Position | Returns to the origin of the topology canvas. |
| Export | Exports the network topology as a PNG image. |
| Hide / Show Virtual Machines | Hides or shows virtual machines in the network topology. |
| Full Screen | Views the network topology in full screen. |
| Highlight Display | Selects a resource and highlights the resource and its associated resources. |
| Hover Display | Displays relevant information about a resource when the mouse hovers over it, with support for navigating to the resource details. |
| Search | Searches for topology resources by resource name or UUID. |
Attach/Detach a Distributed Switch to/from a Cluster
Before you begin
The default distributed switch only supports attaching/detaching bare metal clusters.Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed switch.
- On the target distributed switch's details page, click the Cluster tab.
-
(Optional) To provide network for more clusters and hosts in the data center, click Attach Cluster.
-
(Optional) To detach clusters, click Detach Cluster.
- In the Detach Cluster dialog, select target clusters.
- Click OK.
Note: After detaching a cluster, the corresponding VM NICs will be removed. Proceed with caution.
Delete a Distributed Switch
Before you begin
- You cannot delete the default distributed switch while it still has joined hosts.
- You cannot delete a distributed switch if distributed pot groups in the distributed switch are referenced by a VM memory snapshot.
- You cannot delete a distributed switch if distributed port groups in the distributed switch are associated with Kernel adapters.
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed switch.
-
On the target distributed switch's details page, click .
Note: Deleting a distributed switch deletes all its distributed port groups and detaches associated VM NICs. Proceed with caution.
Distributed Port Group
Distributed port groups are used to provide network connections to virtual machines and for Kernel adapter traffic.
After adding the first host to a cluster, ZStack ZSphere automatically creates a default distributed switch, default distributed port group, and default Kernel adapter based on the configuration of this host, for centralized management of the host's management network. Based on your network planning, you can flexibly reuse the default distributed switch to create new distributed port groups, or use custom distributed switches to create new distributed port groups.
Create a Distributed Port Group
- Navigate to , right-click the target distributed switch, and then select New Distributed Port Group.
- Navigate to , select the target distributed switch. Then, on the right side of the platform page, click , or in the Distributed Port Group subpage, click New Distributed Port Group.
- Name: The name of the distributed port group.
- Description: The description of the distributed port group.
- Distributed Switch: Select the distributed switch corresponding to the distributed port group.
- VLAN Type: The VLAN type of the distributed port group, choose either None or Standard VLAN. If you select Standard VLAN, you can configure the VLAN ID for the distributed port group.
- DHCP Service: A service for automatically assigning
IP addresses to internal resources within the platform. It is disabled by
default. This service only affects resources within the platform and will
not conflict with any existing DHCP servers. If enabled, you need to
configure the network segment, IP allocation policy, and DHCP service IP.
- Network Segment Method: Supports IP range and
CIDR as two types of network segments.
- If you choose IP range, you need to enter the start IP, end
IP, subnet mask, and gateway.
Note: Do not include the
gateway, broadcast address, or network address in the
added IP range. - If you choose CIDR, you need to enter the CIDR block and gateway. The gateway can be the first or last address in the CIDR block. If left blank, the first address in the CIDR block is used as the gateway by default.
- If you choose IP range, you need to enter the start IP, end
IP, subnet mask, and gateway.
- IP Allocation Policy: Supports random,
sequential, and circular allocation policies:
- Random Allocation: The system randomly assigns IP addresses within the network segment.
- Sequential Allocation: The system allocates all available IP addresses within the network segment in ascending order. IP addresses released during the process will be prioritized for allocation in the next round.
- Circular Allocation: The system allocates IP addresses within the network segment in ascending order. IP addresses released during the process will be allocated after all currently available IP addresses have been assigned once.
- DHCP Service IP: The IP address used by the
DHCP service. The DHCP service uses this IP to assign IP addresses
to resources using this distributed port group.
- When creating a distributed port group for the first time or adding the first network segment to the distributed port group, you can customize the DHCP service IP. If a DHCP service IP already exists for the distributed port group, you cannot customize the DHCP service IP when adding a network segment.
- The DHCP service IP must be within the CIDR of the added IP range and not be in use.
- Network Segment Method: Supports IP range and
CIDR as two types of network segments.
- DNS: DNS resolution service for the distributed port group.
After clicking OK, the creation is complete.
Edit Distributed Port Group
If you only need to modify the name and description of the distributed port group, you can do so on the target distributed port group page by clicking .
If you need to modify the MTU or IP allocation policy of the distributed port group, you can do so on the target distributed port group page by clicking .
Note:
- Deleting a network segment will cause the network cards of virtual machines using that segment to be unloaded. Proceed with caution.
- If the distributed port group already has a DHCP service IP and that IP is within the selected network segment, deleting all network segments under the distributed port group will release the DHCP service IP. Deleting only some network segments will leave the DHCP service IP unchanged.
If you need to add more DNS configurations to or delete DNS configurations from the distributed port group, you can do so respectively on the target distributed port group's DNS page.
View Distributed Port Group
- This page displays a line chart showing the percentage of used and available IP addresses within the selected time range. The chart updates in real-time, facilitating analysis of network resources.
- You can select the time range as needed, including: 15 minutes, 1 hour, 6 hours, 1 day, 1 week, 1 month, 1 year, and a custom time range.
Delete a Distributed Port Group
Note: Deleting a distributed port group will unload
the network cards of virtual machines using this port group. Proceed with
caution.Create a Distributed Port Group
Procedure
- In the navigation pane, choose .
- In the resource tree, right-click a target distributed switch and select New Distributed Port Group.
-
In the New Distributed Port Group dialog, set the following parameters:
- Name: Enter a name for the distributed port group.
- Description: Enter a brief description for the distributed port group.
- Distributed Switch: Select a distributed switch for the distributed port group.
- VLAN Type: Select a VLAN type. When selecting Standard VLAN, you need to specify a VLAN ID.
- DHCP Service: Choose whether to enable the automatic IP address assignment for platform resources.
- IP Address Management: Choose whether to enable the IP address management. When enabled, you can add network ranges to this distributed port group. IP addresses in these ranges can be allocated via DHCP service (when enabled) to resources in the network.
- IP Address Type: Supports IPv4 and IPv6.When selecting IPv4, configure the following parameters:
- IP Allocation Policy: After enabling the DHCP service, you can select one of the following policies to assign IP addresses.
- Random Allocation: The system randomly assigns IP addresses from the network range.
- Allocate in Order: The system assigns all available IP addresses from the network range in ascending order. Released IP addresses are assigned in the next allocation.
Example: Assume that the network range is 192.168.0.101~192.168.0.120, within which 192.168.0.101~192.168.0.108 are allocated. If 192.168.0.106 is released, it will be assigned first in the next allocation.
- Allocate in Cycle: The system assigns available IP addresses from the network range in ascending order. Released IP addresses are assigned when currently available IP addresses are used up.
Example: Assume that the network range is 192.168.0.101~192.168.0.120, within which 192.168.0.101~192.168.0.108 are allocated. If 192.168.0.106 is released, it will be assigned after 192.168.0.120 is used.
- Network Range Method: Supports IP range and CIDR.
- For IP range, enter start IP, end IP, netmask, and gateway.
Note: Do not include gateway, broadcast address, or network addresses in the IP range. - For CIDR, enter CIDR Block and gateway. You can enter the first or last CIDR address for gateway. If left blank, the fist CIDR address will be used.
- For IP range, enter start IP, end IP, netmask, and gateway.
When selecting IPv6, configure the following parameters:- Network Range Method: Supports IP range and CIDR.
- For IP range, enter start IP, end IP, prefix length, and gateway.
- For CIDR, enter CIDR Block.
- IP Configuration Mode: Select IPv6 address allocation method.
- Stateful-DHCP (Default): The interface address and other parameters are all configured through DHCP. The IP range method supports stateful DHCP.
- Stateless-DHCP: The interface address is automatically derived from the route advertisement prefix and the interface Mac address. Other parameters are configured through DHCP.
- SLAAC: The interface address is automatically derived from the prefix of the route advertisement that also contains other parameters.
- IP Allocation Policy: After enabling the DHCP service, you can select one of the following policies to assign IP addresses.
- IP Address Type: Supports IPv4 and IPv6.
- DHCP IP: Specify an IP address used by the DHCP service.
- DNS: Specify a DNS to provide DNS resolution service for the distributed port group.
- Review the configuration and click OK.
Modify Distributed Port Group Configurations
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed port group.
-
(Optional) To modify basic configurations, click .
- In the Modify Configuration dialog, modify the name, description, VLAN ID, MTU, DHCP service as needed.
- Click OK.
-
(Optional) To add or delete network ranges, click the Network Range tab and perform the corresponding operations as needed.
Note:
- Deleting a network range also detaches the VM NICs that are using the network range.
- If the distributed port group has a DHCP IP that is in the selected network range, deleting the network range does not delete the DHCP IP. If all network ranges under the distributed port group are deleted, the DHCP IP will be released.
- (Optional) To modify the DNS, click the DNS tab and perform the corresponding operations as needed.
Delete a Distributed Port Group
Before you begin
- You cannot delete the default distributed port group.
- You cannot delete a distributed port group if it is referenced by a VM memory snapshot.
- You cannot delete a distributed port group if it is associated with a Kernel adapter.
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target distributed port group.
-
On the distributed port group's details page, click .
Note: Deleting a distributed port group detaches the VM NICs that are using this network. Proceed with caution. - After acknowledging the risk, click OK.
Kernel Adapter
The Kernel adapter uses network labels to identify physical network traffic. After successfully adding a host to a cluster, ZStack ZSphere creates a default Kernel adapter for each host, which is used to obtain and display the management network of that host. You can create Kernel adapters for hosts to manage storage network traffics.
Create a Kernel Adapter
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target host.
- On the details page of the target host, click Kernel Adapter.
- On the Kernel Adapter tab, click New Kernel Adapter.
-
In the New Kernel Adapter dialog, set the following parameters:
- Name: Enter a name for the Kernel adapter.
- Description: Enter a brief description for the Kernel adapter.
- Network Service: Display Storage by default, indicating this Kernel adapter handles storage network traffics.
- Distributed Port Group: Select a distributed port group.
- IPv4 Address: Assign an IPv4 address for the Kernel adapter.
- Netmask: Specify a netmask.
- Review the configuration and click OK.
Modify Kernel Adapter Configurations
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target host.
- On the details page of the target host, click Kernel Adapter.
- On the Kernel Adapter tab, choose a Kernel adapter from the list and click .
-
In the Modify Configuration dialog, perform the corresponding modifications as needed.
- For the default Kernel adapter, you can only modify the name, description, and whether to select Storage network service. When selected, the storage network shares the management network.
- For other Kernel adapters, you can modify the name, description, IPv4 address, and netmask.
- Click OK.
Delete a Kernel Adapter
Procedure
- In the navigation pane, choose .
- In the resource tree, select a target host.
- On the details page of the target host, click Kernel Adapter.
-
On the Kernel Adapter tab, choose a Kernel adapter from the list and click .
Note:
- You cannot delete a default Kernel adapter.
- Deleting Kernel adapters will release the associated IP addresses. Storage services dependent on these IPs will be interrupted. Proceed with caution.
- After acknowledging the risks, click OK.
Network Service
ZStack ZSphere provides security group network services to ensure the security of east-west traffic between virtual machines.
Security Group
Overview
Security Group: A security group provides security control services for VM NICs. It filters the ingress or egress TCP, UDP, and ICMP packets of VM NICs based on the specified security rules.
Functional Framework
Security groups control traffic to and from network interfaces through security rules within the group. A network interface can be part of multiple security groups, and by setting the priority of security groups, traffic is first matched against rules in the higher-priority groups.
- System Rules: After creating a new security group, the system provides two default rules:
- Intra-Group Communication Rule: Network interfaces within the same security group are allowed to communicate with each other by default. This rule has a higher priority than all custom rules and cannot be modified or deleted, only disabled.
- Intra-/Inter-Group Communication Rule: Network interfaces within the security group are allowed to access interfaces outside the security group by default, but interfaces outside the group are not allowed to access those inside by default. This rule has a lower priority than all custom rules and supports modifying the default intra-group and inter-group access behavior for individual virtual machine network interfaces.
- Custom Rules: Rules added to the security group by users.
- Rule Direction: Security group rules primarily control the source or destination of traffic. Based on the direction of traffic flow, they can be categorized as inbound rules and outbound rules:
- Inbound Rule: For traffic entering the network interface from the outside, primarily controlling the source of traffic.
- Outbound Rule: For traffic sent out from the network interface, primarily controlling the destination of traffic.
- Rule Target: The target of the security group rule (inbound/outbound rule), including source and destination:
- Source: Corresponds to the inbound rule, supporting the use of IP addresses/ranges or security groups as sources. Inbound rules allow/reject traffic from the specified IP addresses/ranges or security groups.
- Destination: Corresponds to the outbound rule, supporting the use of IP addresses/ranges or security groups as destinations. Outbound rules allow/reject traffic from the current group's network interfaces to the target IP addresses/ranges or security groups.
- Action: The specific action taken for traffic matching the rule conditions, including Allow and Deny:
- Allow: Allows network request traffic to flow into or out of the network interface.
- Deny: Does not allow network request traffic to flow into or out of the network interface.
By default, if traffic entering or leaving the network interface does not match any custom rules, inbound traffic is denied and outbound traffic is allowed.
- Protocol and Port: The packet protocol and corresponding port targeted by the rule. Protocols include ALL, TCP, UDP, and ICMP:
- ALL: Indicates coverage of all protocol types, and ports cannot be specified.
- TCP: Supports ports 1-65535.
- UDP: Supports ports 1-65535.
- ICMP: Does not support specifying a port.
- Priority: The relative precedence of one security group rule over others, with supported values ranging from 1 to 100. Higher numbers indicate lower priority.
Create a Security Group and Related Rules
Create a Security Group
- Name: Enter the name for the security group.
- Description: Provide a description for the security group.
After clicking OK, the new security group will be created.
Add Rules
- Type: The direction of traffic controlled by the rule, displayed as Ingress or Egress.
- Priority: The priority of the rule, which automatically increments by 1 for each new rule added. Higher numbers indicate lower priority.
- IP Address Type: Supports IPv4 address type.
- Protocol: The communication protocol targeted by the rule, supporting ALL, TCP, UDP, and ICMP.
- Port: When selecting TCP or UDP, specify the port
targeted by the rule:
- If specifying a range of ports, use the format
Start Port-End Port. - If specifying multiple ports or ranges, separate them with an English comma “,”. You can specify up to 10 ports or ranges.
- If specifying a range of ports, use the format
- Source: Required when adding an inbound rule,
indicating whether to allow or deny traffic from the specified IP
addresses/ranges or security groups:
- When specifying by IP address/range, you can enter a range using the
format
Start IP-End IP. - When specifying by IP address/range, you can enter CIDR notation. If specifying CIDR along with other types of IP addresses, the CIDR mask must be 24 bits. If specifying only CIDR, there is no limit on the mask.
- If specifying multiple IP addresses/ranges, separate them with an English comma “,”.
- When specifying by IP address/range, you can enter a range using the
format
- Destination: Required when adding an outbound rule,
indicating whether to allow or deny traffic from the NICs in this group to
the specified IP addresses or security groups:
- When specifying by IP address/range, you can enter a range using the
format
Start IP-End IP. - When specifying by IP address/range, you can enter CIDR notation. If specifying CIDR along with other types of IP addresses, the CIDR mask must be 24 bits. If specifying only CIDR, there is no limit on the mask.
- If specifying multiple IP addresses/ranges, separate them with an English comma “,”.
- When specifying by IP address/range, you can enter a range using the
format
- State: Whether to enable the rule immediately after creating the security group. By default, the rule is enabled. If set to disabled, the interfaces in the group will not match this rule until you manually enable it.
- Description: Description of the security group rule.
- Click , upload a CSV file, and click OK. The
rules will be imported successfully.
Note:
- The imported rules will not affect existing rules. Their priority will default to be placed after existing rules and will be in a disabled state.
- After import, users can manually adjust the priority and enable these rules.
- To ensure system compatibility, the imported file must be edited using Microsoft Excel.
- If you need to reuse the rules of one security group for another security group, you can do the following on the security group page, depending on the scenario:
- If you only need to export inbound rules or outbound rules, you can click the download button at the top right of the rule list under the corresponding tab and choose to export the current page or all . This will export the rules in CSV format.
- If you need to export all inbound and outbound rules, click . This will export the rules in CSV format.
Associate VM NIC
- If you need to bind the security group to multiple virtual machine NICs, you
can select target interfaces in bulk on the VM NIC
page of the security group, and follow the example below to bind them:
- Network: Select the network scope applicable to the security group, choosing either all distributed port groups or specific port groups in the data center.
- NIC: Select target NIC to bind.
Note: If the
IP address of a virtual machine NIC is shown as empty on the
platform, the default security group rule (intra-group
communication rule) will not apply to that
interface.
- If you need to bind multiple security groups to a virtual machine NIC, you
can do so on the Overview page of the target virtual
machine, using Edit Configuration to bind security
groups to the virtual machine NICs in bulk. The smaller the number assigned
to a security group, the higher its priority for taking effect.
Note: Please
configure carefully to avoid conflicts between rules across different
security groups.
Modify Security Groups and Related Rules
Security Group
If you need to change the enabled status of a security group, you can use the Enable and Disable operations to make the changes.
If you need to modify the name and description of a security group, you can click Edit Name and Description in the operation column of the target security group to make the changes.
- If you need to unbind multiple virtual machine network interfaces from a security group, you can select the target interfaces on the VM NIC page of the security group and click Disassociate VM NIC to unbind them.
- If you need to unbind multiple virtual machine network interfaces from a security group, you can use Edit Configuration on the Overview page of the target virtual machine to unbind the security group from the virtual machine network interfaces in bulk.
Note: Deleting a security group will also delete any custom rules created for the security group. Please proceed with caution.Security Group Rules
If you wish to modify the system default rules, note that security group rules are divided into system default rules and custom rules. The system default rule is the intra-group communication rule, which only supports the disable operation.
- If you need to modify the enabled status of individual or multiple security group rules, you can use the Enable and Disable operations to make the changes.
- If you need to modify the configuration of a single security group rule, such as priority, allow or deny policy, protocol and port, source/destination, enabled status, and description, you can click Edit Rule in the operation column of the target security group and make the necessary changes.
- If you need to adjust the priority of individual or multiple security group rules, you can click the Adjust Priority button and adjust the relative priority order of the rules as needed by dragging. Value range: integers within the range of 1-100. Higher numbers indicate lower priority.
- If you are certain that you no longer need a particular security group rule or several rules, select the target rule(s) and click Delete to delete them.
