HP-UX Containers (SRP) A.03.01 Administrator's Guide
58
You can specify any valid physical interface for the iface parameter that the ifconfig(1M)
command will accept. You do not have to specify a logical interface format (lan0:x); the srp
command will find the next available, unassigned logical interface for the physical interface that you
specify. Once assigned, however, the logical interface is statically configured in the
/etc/rc.config.d/netconf[-ipv6] configuration (unless you opted to not manage the
network interface in the netconf file). If you specify a global unicast IPv6 address for the container,
and the specified interface has not already been configured with a link-local address, then the srp
command will create the primary link-local IPv6 address for the interface, and assign it to the global
view before finding an available logical interface to assign the specified container IPv6 address.
You should configure a default gateway entry for your container if you want the container to be able
to route outside of the local network. For IPv4 interfaces, the default value is the primary IP address of
the container (which will configure a metric count of zero [0]). Your network must have an intelligent
router attached in order to successfully use this type of default gateway configuration. If your router
does not support this feature, then specify the appropriate gateway IP address for the router
associated with your container’s subnet. If you do not want to specify a default route (for example to
control or limit the connectivity for your container), you can specify zero (0) for the gw_ip_address
value, and the default gateway entry will be omitted from the container configuration.
Refer to the route(1M) and ifconfig(1M) for more information about how interfaces and routes
are managed.
12.2 Configuring an additional network interface
When you require a container to own more than one IP address, use the srp –add containername
–service network –id <instance>
command syntax to prompt you through the additional values
needed to create an additional interface. Any instance value not already in use for that container will
work (2 or greater, since 1 is always used for the first IP instance). The prompts and variables are the
same for additional instances as specified above for the first IP address.
Example12.1: Adding the address 192.168.1.22 to the existing container
myContainer
# srp -a myContainer -s network -id 2 ip_address=192.168.1.22 iface=lan0
ip_mask=255.255.255.0
add compartment network service rules succeeded
add ipaddress 192.168.1.22 succeeded
Example12.2: Adding the address fe80::3 to the existing container myContainer
# srp -a myContainer -id 3 -s network -b ip_address=fe80::3 iface=lan0
add compartment network service rules succeeded
add ipaddress fe80::3 succeeded
Example12.3: Displaying network configuration
# srp -l myContainer -v -s network
Name: myContainer Template: system Service: network ID: 1
----------------------------------------------------------------------
Compartment Configuration (/etc/cmpt/myContainer.rules):
// owns the IP address
interface 16.92.121.29
Netconf Configuration:
INTERFACE_NAME="lan0:1"