You can customize IP address properties to manage the following network configuration parameters:
Whether an IP address can be used as a source address for outbound packets
Whether the address belongs to a global or non–global zone
Whether the address is a private address
Use the following ipadm subcommands when working with IP address properties:
show-addrprop –p property addrobj – Displays address properties, depending on the options that you use.
To display the properties of all of the IP addresses, do not specify a property or an address object. To display the values of a single property for all of the IP addresses, specify just that property. To display all of the properties of a specific address object, specify just the address object.
set-addrprop –p property=value addrobj – Assigns values to address properties. Note that you can only set one address property at a time.
reset-addrprop –p property addrobj – Restores any default values to the address property.
As an example, suppose you want to change the netmask of an IP address. The IP address is configured on the IP interface net3and is identified by the address object name net3/v4. The following examples show how to revise the netmask:
# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/? static ok 127.0.0.1/8 net3/v4 static ok 192.168.84.3/24 # ipadm show-addrprop -p prefixlen net3/v4 ADDROBJ PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE net3/v4 prefixlen rw 24 24 24 1-30,32 # ipadm set-addrprop -p prefixlen=8 net3/v4 # ipadm show-addrprop -p prefixlen net3/v4 ADDROBJ PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE net3/v4 prefixlen rw 8 24 24 1-30,32