Copyright (c) 2012, Joyent, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
ipadm create-if [-t] interface
ipadm disable-if [-t] interface
ipadm enable-if [-t] interface
ipadm delete-if interface
ipadm show-if [[-p] -o field[,...]] [interface]
ipadm set-ifprop [-t] -p prop=<value[,...]> -m protocol interface
ipadm reset-ifprop [-t] -p prop -m protocol interface
ipadm show-ifprop [[-c]-o field[,...]] [-p prop,...] [-m protocol] [interface]
ipadm create-addr [-t] -T static [-d] -a {local|remote}=addr[/prefixlen],... addrobj
ipadm create-addr [-t] -T dhcp [-w seconds | forever ] addrobj
ipadm create-addr [-t] -T addrconf [-i interface-id] [-p {stateful|stateless}={yes|no},..] addrobj
ipadm down-addr [-t] addrobj
ipadm up-addr [-t] addrobj
ipadm disable-addr [-t] addrobj
ipadm enable-addr [-t] addrobj
ipadm refresh-addr [-i] addrobj
ipadm delete-addr [-r] addrobj
ipadm show-addr [[-p] -o field[,...]] [addrobj]
ipadm set-addrprop [-t] -p prop=<value[,...]> addrobj
ipadm reset-addrprop [-t] -p prop=<value[,...]> addrobj
ipadm show-addrprop [[-c] -o field[,...]] [-p prop,...] [addrobj]
ipadm set-prop [-t] -p prop[+|-]=<value[,...]> protocol
ipadm reset-prop [-t] -p prop protocol
ipadm show-prop [[-c] -o field[,...]] [-p prop[,...]] [protocol]
The ipadm command is a stable replacement for the ifconfig(1M) and ndd(1M) commands. It is used to create IP interfaces and to confgure IP addresses on those interfaces. It is also used to get, set or reset properties on interfaces, addresses and protocols.
For subcommands that take an addrobj, the addrobj specifies a unique address on the system. It is made up of two parts, delimited by a '/'. The first part is the name of the interface and the second part is a string up to 32 characters long. For example, "lo0/v4" is a loopback interface addrobj name.
For subcommands that take a protocol, this can be one of the following values: ip, ipv4, ipv6, icmp, tcp, sctp or udp.
The following subcommands are supported: create-if [-t] interface
The create-if subcommand is used to create an IP interface that will handle both IPv4 and IPv6 packets. The interface will be enabled as part of the creation process. The IPv4 interface will have the address 0.0.0.0. The IPv6 interface will have the adress ::. The -t option (also --temporary) means that the creation is temporary and will not be persistent across reboots.
The disable-if subcommand is used to disable an IP interface. The -t option (also --temporary) means that the disable is temporary and will not be persistent across reboots.
The enable-if subcommand is used to enable an IP interface. The -t option (also --temporary) means that the enable is temporary and will not be persistent across reboots.
The delete-if subcommand is used to permanently delete an IP interface.
The show-if subcommand is used to show the current IP interface configuration. The -p option (also --parsable) prints the output in a parsable format. The -o option (also --output) is used to select which fields will be shown. The field value can be one of the following names:
ALL
Display all fields
The name of the interface
The state can be one of the following values:
ok - resources for the interface have been allocated offline - the interface is offline failed - the interface's datalink is down down - the interface is down disabled - the interface is disabled
A set of single character flags indicating the following:
b - broadcast (mutually exclusive with 'p')
m - multicast
p - point-to-point (mutually exclusive with 'b')
v - virtual interface
I - IPMP
s - IPMP standby
i - IPMP inactive
V - VRRP
a - VRRP accept mode
4 - IPv4
6 - IPv6
A set of single character flags showing what configuration will be used the next time the interface is enabled:
s - IPMP standby
4 - IPv4
6 - IPv6
The set-ifprop subcommand is used to set a property's value(s) on the IP interface. The -t option (also --temporary) means that the setting is temporary and will not be persistent across reboots. The -p option (also --prop) specifies the property name and value(s). The property name can be one of the following:
arp
Enables ("on") or disables ("off") ARP.
Enables ("on") or disables ("off") the exchange of routing data.
Enables ("on") or disables ("off") IP forwarding.
Set the routing metric to the numeric value. The value is treated as extra hops to the destination.
Set the maximum transmission unit to the numeric value.
Enables ("on") or disables ("off") neighbor unreachability detection.
Indicates which interface to use for source address selection. A value "none" may also be used.
The reset-ifprop subcommand is used to reset an IP interface's property value to the default. The -t option (also --temporary) means that the disable is temporary and will not be persistent across reboots. The -p option (also --prop) specifies the property name. See the set-ifprop subcommand for the list of property names. The -m option (also --module) specifies which protocol the setting applies to.
The show-ifprop subcommand is used to display the property values for one or all of the IP interfaces. The -c option (also --parsable) prints the output in a parsable format. The -o option (also --output) is used to select which fields will be shown. The field value can be one of the following names:
ALL
Display all fields
The name of the interface
The name of the property
The name of the protocol
The value of the property
The persistent value of the property
The default value of the property
The possible values for the property
create-addr [-t] -T dhcp [-w seconds | forever ] addrobj
create-addr [-t] -T addrconf [-i interface-id] \\ [-p {stateful|stateless}={yes|no},..] addrobj
The create-addr subcommand is used to set an address on an IP interface. The address will be enabled but can disabled using the disable-addr subcommand. This subcommand has three different forms, depending on the value of the -T option. The -t option (also --temporary) means that the address is temporary and will not be persistent across reboots. The -T static option creates a static addrobj. This takes the following options:
The -d option (also --down) means the address is down. The -a option (also --address) specifies the address. The "local" or "remote" prefix can be used for a point-to-point interface. In this case, both addresses must be given. Otherwise, the equal sign ("=") should be omitted and the address should be provided by itself and with no second address.
The -w option (also --wait) gives the time, in seconds, that the command should wait to obtain an address.
The -i option (also --interface-id) gives the interface ID to be used. The -p option (also --prop) indicates which method of auto-configuration should be used.
The down-addr subcommand is used to down the address. This will stop packets from being sent or received. The -t option (also --temporary) means that the down is temporary and will not be persistent across reboots.
The up-addr subcommand is used to up the address. This will enable packets to be sent and received. The -t option (also --temporary) means that the up is temporary and will not be persistent across reboots.
The disable-addr subcommand is used to disable the address. The -t option (also --temporary) means that the disable is temporary and will not be persistent across reboots.
The enable-addr subcommand is used to enable the address. The -t option (also --temporary) means that the enable is temporary and will not be persistent across reboots.
The refresh-addr subcommand is used to extend the lease for DHCP addresses. It also restarts duplicate address detection for Static addresses. The -i option (also --inform) means that the network configuration will be obtained from DHCP without taking a lease on the address.
The delete-addr subcommand deletes the given address. The -r option (also --release) is used for DHCP-assigned addresses to indicate that the address should be released.
The show-addr subcommand is used to show the current address properties. The -p option (also --parsable) prints the output in a parsable format. The -o option (also --output) is used to select which fields will be shown. The field value can be one of the following names:
ALL
Display all fields
The name of the address
The type of the address. It can be "static", "dhcp" or "addrconf".
The state of the address. It can be one of the following values:
disabled s see the disable-addr subcommand down - see the down-addr subcommand duplicate - the address is a duplicate inaccessible - the interface for this address has failed ok - the address is up tentative - duplicate address detection in progress
A set of single character flags indicating the following:
U - up
u - unnumbered (matches another local address)
p - private, not advertised to routing
t - temporary IPv6 address
d - deprecated (not used for outgoing packets)
A set of single character flags showing the configuration which will be used when the address is enabled.
U - up
p - private, not advertised to routing
d - deprecated (not used for outgoing packets)
The address
The set-addrprop subcommand is used to set a property's value(s) on the addrobj. The -t option (also --temporary) means that the setting is temporary and will not be persistent across reboots. The -p option (also --prop) specifies the property name and value(s). The property name can be one of the following:
broadcast
The broadcast address (read-only)
The address should not be used to send packets but can still receive packets. Can be "on" or "off".
The number of bits in the IPv4 netmask or IPv6 prefix.
The address is not advertised to routing. Can be "on" or "off".
Packets can be transmitted. Can be "on" or "off".
The zone the addrobj is in.
The reset-addrprop subcommand is used to reset an addrobj's property value to the default. The -t option (also --temporary) means that the disable is temporary and will not be persistent across reboots. The -p option (also --prop) specifies the property name. See the set-addrprop subcommand for the list of property names.
The show-addrprop subcommand is used to display the property values for one or all of the addrobjs. The -c option (also --parsable) prints the output in a parsable format. The -o option (also --output) is used to select which fields will be shown. The field value can be one of the following names:
ALL
Display all fields
The name of the addrobj
The name of the property
The value of the property
The persistent value of the property
The default value of the property
The possible values for the property
The set-prop subcommand is used to set a property's value(s) on the protocol. The -t option (also --temporary) means that the setting is temporary and will not be persistent across reboots. The -p option (also --prop) specifies the property name and value(s). The optional [+|-] syntax can be used to add/remove values from the current list of values on the property. The property name can be one of the following:
ecn
Explicit congestion control (TCP-only) Can be "never", "passive" or "active".
Additional privileged ports (SCTP, TCP or UDP)
Packet forwarding is enabled. Can be "on" or "off".
The IPv6 hoplimit.
Largest ephemeral port (SCTP, TCP or UDP)
Receive buffer size (ICMP, SCTP, TCP or UDP)
Selective acknowledgement (TCP). Can be "active", "passive" or "never".
Send buffer size (ICMP, SCTP, TCP or UDP)
Smallest ephemeral port (SCTP, TCP or UDP)
Smallest non-privileged port (SCTP, TCP or UDP)
The IPv4 time-to-live.
The reset-prop subcommand is used to reset a protocol's property value to the default. The -t option (also --temporary) means that the disable is temporary and will not be persistent across reboots. The -p option (also --prop) specifies the property name. See the set-prop subcommand for the list of property names.
The show-prop subcommand is used to display the property values for one or all of the protocols. The -c option (also --parsable) prints the output in a parsable format. The -o option (also --output) is used to select which fields will be shown. The field value can be one of the following names:
ALL
Display all fields
The name of the protocol
The name of the property
The value of the property
The persistent value of the property
The default value of the property
The possible values for the property
ifconfig(1M), dladm(1M), ndd(1M), zonecfg(1M), arp(1M), cfgadm(1M), if_mpadm(1M), nsswitch.conf(4), and dhcp(5).