Configuring networks for system WPARs
You can configure the network for a system WPAR using the -h flag or the -N flag for the mkwpar command or the chwpar command.
If you do not specify any network information when you create a system WPAR, and the name of the WPAR resolves to an IP address on the same network as any active global interface, the mkwpar command automatically configures the network for the WPAR. If the WPAR does not resolve, you can specify zero or more network configurations using the -N flag for the mkwpar 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:mkwpar -n wpar_name -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
To configure a system WPAR with a network
address of 224.128.9.3 using the en0 interface for the global environment, run the following
command:
mkwpar -n wpar_name -N interface=en0 address=224.128.9.3 \
netmask=255.255.255.0 broadcast=224.128.9.255
To configure a system WPAR with an IPv6
network address of fe80::200:254 using the en3 interface from the global environment, run the
following
command:
mkwpar -n wpar_name -N interface=en3 address6=fe80::200:254 prefixlen=64
You can also use the -N flag with the chwpar command to add
additional networks on a previously defined system WPAR. 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 a system 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