You must determine the host name for the zone.
Inside an exclusive-IP zone, you configure addresses as you do for the global zone.
For a shared-IP zone that will have network connectivity, you must do one of the following:
Assign an IPv4 address for the zone
Manually configure and assign an IPv6 address for the zone
For more information on exclusive-IP and shared-IP types, see Zone Network Interfaces in Oracle Solaris Zones Configuration Resources.
If you are using the NIS or DNS name services, or the LDAP directory service, then the host information is stored in a database, such as hosts.byname, on a server.
If you use local files for the naming service, the hosts database is maintained in the /etc/inet/hosts file. The host names for zone network interfaces are resolved from the local hosts database in /etc/inet/hosts. Alternatively, for shared-IP zones, the IP address itself can be specified directly when configuring a zone so that no host name resolution is required. See the hosts(4) and nodename(4) man pages for more information. Also see Chapter 3, Configuring and Administering IP Interfaces and Addresses in Oracle Solaris in Configuring and Managing Network Components in Oracle Solaris 11.3.
Each shared-IP zone that requires network connectivity has one or more unique IP addresses. Both IPv4 and IPv6 addresses are supported.
If you are using IPv4, obtain an address and assign the address to the zone. When you assign addresses to the zone, you can specify the address by using CIDR notation, such as 192.0.2.0/24.
For shared-IP zones, the IP address itself can be specified directly when configuring a zone so that no host name resolution is required.
If you are using IPv6, you must manually configure the address. Typically, at least the following two types of addresses must be configured:
A link-local address is of the form fe80::64-bit interface ID/10. The /10 indicates a prefix length of 10 bits.
A global unicast address is based off a 64–bit prefix that the administrator configures for each subnet, and a 64-bit interface ID. The prefix can be obtained by running the ipadm show-addr command on any system on the same subnet that has been configured to use IPv6.
The 64–bit interface ID is typically derived from a system's MAC address. For zones use, an alternate address that is unique can be derived from the global zone's IPv4 address by using the following convention:
16 bits of zero:upper 16 bits of IPv4 address:lower 16 bits of IPv4 address:a zone-unique number
Assume that the global zone's IPv4 address is 192.0.2.10. This address is converted to hexadecimal as follows:
192 = c0
0 = 0
2 = 2
10 = 0a
Thus, a suitable link-local address for a non-global zone using a zone-unique number of 1 is fe80::c00:c80a:1/10.
If the global prefix in use on that subnet is 2001:0db8:aabb:ccdd/64, a unique global unicast address for the same non-global zone is 2001:0db8:aabb:ccdd::c0a8:c80a:1/64. Note that you must specify a prefix length when configuring an IPv6 address.
Inside an exclusive-IP zone, configure addresses as you do for the global zone. Note that DHCP and IPv6 stateless address autoconfiguration can be used to configure addresses. For information about IP address configuration, see Chapter 3, Configuring and Administering IP Interfaces and Addresses in Oracle Solaris in Configuring and Managing Network Components in Oracle Solaris 11.3.