Configuring networks for application WPARs

You can configure the network for an application WPAR using the -h flag and the -N flag for the wparexec command or the chwpar command.

By default, the name of an application WPAR is used as its host name.

To override the default hostname for an application WPAR when you are creating it, run the following wparexec command with the -h flag:
wparexec -h wpar_hostname -- /path/to/application arg1 arg2 ... argN
You can also change the host name for an application WPAR at any time using the -h flag with the following chwpar command:
chwpar -h new_hostname wpar_name

If you do not specify any network information when you create an application WPAR, and the name of the WPAR resolves to an IP address on the same network as any active global interface, the wparexec command automatically configures the network for the WPAR. If the WPAR name does not resolve, you can specify zero or more network configurations using the -N flag for the wparexec command or the chwpar command. All network changes can be performed on active or inactive WPARs. The changes take effect immediately.

Each network requires its own instance of the -N flag. The -N flag specifies network configuration attributes, and is used to separate the attribute=value pairs by blank spaces. You can specify more than one -N flag to configure multiple IP addresses. For example:
wparexec -N interface=en0 address=224.128.9.3 netmask=255.255.255.0 broadcast=224.128.9.255 \
-N interface=en1 address=192.168.0.3 netmask=255.255.255.0 broadcast=192.168.0.255 \
-- /path/to/application arg1 arg2 ... argN
To configure an application WPAR with an IPv6 address of fe80::200:214 using the en3 interface from the global environment, run the following command:
wparexec -N interface=en3 address6=fe80::200:214 prefixlen=64 \
-- /path/to/application arg1 arg2 ... argN
You can also use the -N flag with the chwpar command to add additional networks on a previously defined application WPAR. For example, to add a network, run the following command:
chwpar -N address=224.128.9.4 wpar_name
If you want to change the network settings for an application WPAR, use the address attribute to identify the network you want to change. For example, to change the netmask and broadcast address of the network at 224.128.9.3, run the following command:
chwpar -N address=224.128.9.3 netmask=255.255.255.128 broadcast=224.128.9.127 wpar_name