Skip to main content
added explanation
Source Link
BitsOfNix
  • 5.2k
  • 3
  • 27
  • 34

Additionally, If you are using shared address in the zone configuration and you configure an ip that is not recognized via zonecfg you will see the following message:

zone 'zone-shared-ip': warning: net0: no matching subnet found in netmasks(4): 10.0.2.150; using default of 255.0.0.0

Additionally, If you are using shared address in the zone configuration and you configure an ip that is not recognized via zonecfg you will see the following message:

zone 'zone-shared-ip': warning: net0: no matching subnet found in netmasks(4): 10.0.2.150; using default of 255.0.0.0
Source Link
BitsOfNix
  • 5.2k
  • 3
  • 27
  • 34

Depending on the zone and the solaris version you might have to specify the network in different ways. Using shared network interface, the zone OS does not need to know about the network configuration because this is shared with the global zone. So in fact you networks will be defined in the global zone and you just specify the IP in the zonecfg configuration.

If you are using exclusive-IP (available on Solaris 11), then you need to configure manually the ip inside each zone as they have separate IP stack.

schily mentioned and quite well, that if a network mask is not specify it is taken from the defaults. If you look here you will find the following:

netmask mask

For IPv4 only. Specify how much of the address to reserve for subdividing networks into subnetworks. The mask includes the network part of the local address and the subnet part, which is taken from the host field of the address. The mask contains 1's for the bit positions in the 32-bit address which are to be used for the network and subnet parts, and 0's for the host part. The mask should contain at least the standard network portion, and the subnet field should be contiguous with the network portion. The mask can be specified in one of four ways:

    with a single hexadecimal number with a leading 0x,

    with a dot-notation address,

    with a “+” (plus sign) address, or

    with a pseudo host name/pseudo network name found in the network database networks(4).

If a “+” (plus sign) is given for the netmask value, the mask is looked up in the netmasks(4) database. This lookup finds the longest matching netmask in the database by starting with the interface's IPv4 address as the key and iteratively masking off more and more low order bits of the address. This iterative lookup ensures that the netmasks(4) database can be used to specify the netmasks when variable length subnetmasks are used within a network number.

If a pseudo host name/pseudo network name is supplied as the netmask value, netmask data may be located in the hosts or networks database. Names are looked up by first using gethostbyname(3NSL). If not found there, the names are looked up in getnetbyname(3SOCKET). These interfaces may in turn use nsswitch.conf(4) to determine what data store(s) to use to fetch the actual value.

For both inet and inet6, the same information conveyed by mask can be specified as a prefix_length attached to the address parameter.