The prlsrvctl net
command is used to create and configure virtual networks.
Table 2.15. Subcommands
Name | Description |
---|---|
| Creates a new virtual network |
| Configures the parameters of an existing virtual network. |
| Removes an existing virtual network. |
| List the available virtual networks. |
net add
Creates a new virtual network.
Syntax.
prlsrvctl net add <vnetwork_ID> [-i, --ifname <if>] [-m, --mac <mac_address>] [-t, --type <bridged|host-only>] [-d, --description <desc>] [--ip <IP_address>[/<mask>]] [--dhcp-server <on|off>] [--dhcp-ip <IP_address>] [--ip-scope-start <IP_address>] [--ip-scope-end <IP_address>] [--ip6 <IP_address>[/<mask>_]] [--dhcp6-server <on|off>] [--dhcp-ip6 <IP_address>] [--ip6-scope-start <IP_address>] [--ip6-scope-end <IP_address>]
Table 2.16. Options
Name | Description |
---|---|
| A user-defined name that will identify the new virtual network. |
| The name of a physical network adapter on the hardware node to which this virtual network should be bound. |
| The MAC address of a virtual network adapter on the hardware node to which this virtual network should be bound. |
| The type of the virtual network to create. Possible values are:
|
| A user-defined description of the virtual network. Descriptions with white spaces must be enclosed in quotation marks. |
| Set an IPv4/IPv6 address and subnet mask for the OpenVZ virtual adapter. |
| Enable or disable the OpenVZ virtual DHCPv4/DHCPv6 server. |
| Set an IPv4/IPv6 address for the OpenVZ virtual DHCPv4/DHCPv6 server. |
| Set the starting and ending IPv4/IPv6 addresses for the DHCPv4/DHCPv6 pool. The virtual machines and containers connected to the network you are creating will automatically receive their IPv4/IPv6 addresses from the respective DHCPv4/DHCPv6 pool. |
net set
Configures the settings of an existing virtual network.
Syntax.
prlsrvctl net set <vnetwork_ID> [-i, --ifname <if>] [-m, --mac <mac_address>] [-t, --type <bridged|host-only>] [-d, --description <desc>] [--ip <IP_address>[/<mask>]] [--dhcp-server <on|off>] [--dhcp-ip <IP_address>] [--ip-scope-start <IP_address>] [--ip-scope-end <IP_address>] [--ip6 <IP_address>[/<mask>_]] [--dhcp6-server <on|off>] [--dhcp-ip6 <IP_address>] [--ip6-scope-start <IP_address>] [--ip6-scope-end <IP_address>]
Table 2.17. Options
Name | Description |
---|---|
| The name of the virtual network to modify. |
| The name of a physical network adapter on the hardware node to which this virtual network should be bound. |
| The MAC address of a virtual network adapter on the hardware node to which this virtual network should be bound. |
| The type of the virtual network to modify. Possible values are:
|
| A user-defined description of the virtual network. Descriptions with white spaces must be enclosed in quotation marks. |
| Set an IPv4/IPv6 address and subnet mask for the OpenVZ virtual adapter. |
| Enable or disable the OpenVZ virtual DHCPv4/DHCPv6 server. |
| Set an IPv4/IPv6 address for the OpenVZ virtual DHCPv4/DHCPv6 server. |
| Set the starting and ending IPv4/IPv6 addresses for the DHCPv4/DHCPv6 pool. The virtual machines and containers connected to the network you are creating will automatically receive their IPv4/IPv6 addresses from the respective DHCPv4/DHCPv6 pool. |
net del
Deletes an existing virtual network.
Syntax.
prlsrvctl net del <vnetwork_ID>
net list
Lists the existing virtual networks.
Syntax.
prlsrvctl net list