VPS Network Configuration Tools

Parallels H-Sphere VPS 1.4-1 provides adding multiple subnets and network gateways to virtual servers. The following scripts located in the $VPSSCRIPTS/ (/hsphere/shared/scripts/ by default) are responsible for managing VPS subnets:

Run these scripts with the --help option for detailed usage info.

These scripts work with the subnet configuration XML file.

vps-subnets-add.pl

Configures subnet (IP addresses to be assigned to newly created VPS servers) with gateway, IP mask and network interface. Please turn to your data center system administrators for subnet configuration information.

Usage:

vps-subnets-add.pl --addr=<addr> --device=<device> --gateway=<gateway> --mask=<mask> [--help]

--addr # <addr> - subnet address --device # <device> - Linux style name of the network interface to which subnet IPs will be assigned. 
       # For example eth0 (eth1, ...) 
       # To list available interfaces run: net-iface-list.pl 
--gateway # <gateway> - gateway to be used by IPs from this subnet 
--mask    # <mask> - IPs mask 
--help    # Print this help information.

Example:

vps-subnets-add.pl --addr 192.168.112.0 --device eth1 --gateway 192.168.112.1 --mask 255.255.255.0

Configures all 192.168.112.x IPs (subnet 192.168.112.0) to be assigned to network interface eth1 with gateway 192.168.112.1 and mask 255.255.255.0

vps-subnets-change.pl

Changes subnet configuration, such as, gateway or/and IP mask and/or network interface.

Usage:

vps-subnets-change.pl --addr=<addr> --device=<device>|--gateway=<gateway>|--mask=<mask> [--help]

--addr    # <addr> - subnet network address whose configuration is to be changed 
--device  # <device> - Linux style name of the new network interface to which subnet IPs will be assigned. 
          # For example eth0 (eth1, ...) 
--gateway # <gateway> - new gateway to be used by IPs from this subnet 
--mask    # <mask> - new IP mask --help # Print this help information.

Example:

vps-subnets-change.pl --addr 192.168.112.0 --device eth2

Configures all 192.168.112.x IPs (subnet 192.168.112.0) to be assigned to new network interface eth2 (use old gateway and mask)

vps-subnets-del.pl

Deletes subnet configuration according to the XML config file.

Usage:

vps-subnets-del.pl <addr> [--help]

          # <addr> - subnet address whose configuration is to be removed 
--help # Print this help information.

Example:

vps-subnets-del.pl 192.168.112.0

Removes 192.168.112.0 subnet configuration.

vps-subnets-list.pl

Prints VPS subnet configuration from the XML config file.

Usage:

vps-subnets-list.pl [--help|-h]

--help # Print this help information.

vps-subnets-xml-put.pl

Stores virtual servers' subnet configuration into the XML config file.

Usage:

vps-subnets-xml-put.pl [--help|-h]

--help # Print this help information.