2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright (c) 2012, Joyent, Inc. All Rights Reserved
13 .\" Copyright (c) 2013 by Delphix. All rights reserved.
14 .\" Copyright 2014 Nexenta Systems, Inc. All rights reserved.
21 .Nd configure IP interfaces, addresses and protocols
40 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
45 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
56 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
57 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
65 .Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
66 .Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
72 .Op Fl w Ar seconds Ns | Ns Cm forever
78 .Op Fl i Ar interface-id
79 .Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
80 .Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
108 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
113 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
122 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
123 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
128 .Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
129 .Ar value Ns Oo , Ns Ar value Oc Ns ...
138 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
139 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
144 command is a stable replacement for the
148 commands. It is used to create IP interfaces and to configure IP addresses on
149 those interfaces. It is also used to get, set or reset properties on interfaces,
150 addresses and protocols.
152 For subcommands that take an
156 specifies a unique address on the system. It is made up of two parts, delimited
159 The first part is the name of the interface and the second part is a string up
160 to 32 characters long. For example,
162 is a loopback interface
166 For subcommands that take a
168 this can be one of the following values:
178 The following subcommands are supported:
186 Create an IP interface that will handle both IPv4 and IPv6 packets. The
187 interface will be enabled as part of the creation process. The IPv4 interface
188 will have the address 0.0.0.0. The IPv6 interface will have the adress ::.
190 .It Fl t Ns , Ns Fl -temporary
191 Temporary, not persistent across reboots.
199 Disable an IP interface.
201 .It Fl t Ns , Ns Fl -temporary
202 Temporary, not persistent across reboots.
210 Enable an IP interface.
212 .It Fl t Ns , Ns Fl -temporary
213 Temporary, not persistent across reboots.
220 Permanently delete an IP interface.
224 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
227 Show the current IP interface configuration.
229 .It Fl o Ns , Ns Fl -output
230 Select which fields will be shown. The field value can be one of the following
232 .Bl -tag -compact -width "PERSISTENT"
236 The name of the interface.
238 The state can be one of the following values:
239 .Bl -tag -compact -width "disabled"
241 resources for the interface have been allocated
243 the interface is offline
245 the interface's datalink is down
247 the interface is down
249 the interface is disabled
252 A set of single character flags indicating the following:
253 .Bl -tag -compact -width "b"
255 broadcast (mutually exclusive with
260 point-to-point (mutually exclusive with
280 A set of single character flags showing what configuration will be used the
281 next time the interface is enabled:
282 .Bl -tag -compact -width "s"
291 .It Fl p Ns , Ns Fl -parsable
292 Print the output in a parsable format.
298 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
302 Set a property's value(s) on the IP interface.
304 .It Fl m Ns , Ns Fl -module
305 Specify which protocol the setting applies to.
306 .It Fl p Ns , Ns Fl -prop
307 Specify the property name and value(s). The property name can be one of the
309 .Bl -tag -compact -width "exchange_routes"
311 Address resolution protocol
312 .Pq Cm on Ns / Ns Cm off .
313 .It Cm exchange_routes
314 Exchange of routing data
315 .Pq Cm on Ns / Ns Cm off .
318 .Pq Cm on Ns / Ns Cm off
320 Set the routing metric to the numeric value. The value is treated as extra
321 hops to the destination.
323 Set the maximum transmission unit to the numeric value.
325 Neighbor unreachability detection
326 .Pq Cm on Ns / Ns Cm off
328 Indicates which interface to use for source address selection. A value
332 .It Fl t Ns , Ns Fl -temporary
333 Temporary, not persistent across reboots.
343 Reset an IP interface's property value to the default.
345 .It Fl m Ns , Ns Fl -module
346 Specify which protocol the setting applies to.
347 .It Fl p Ns , Ns Fl -prop
348 Specify the property name. See the
349 .Nm ipadm Ic set-ifprop
350 subcommand for the list of property names.
351 .It Fl t Ns , Ns Fl -temporary
352 Temporary, not persistent across reboots.
357 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
358 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
362 Display the property values for one or all of the IP interfaces.
364 .It Fl c Ns , Ns Fl -parsable
365 Print the output in a parsable format.
366 .It Fl m Ns , Ns Fl -module
367 Specify which protocol to display.
368 .It Fl o Ns , Ns Fl -output
369 Select which fields will be shown. The field value can be one of the following
371 .Bl -tag -compact -width "PERSISTENT"
375 The name of the interface.
377 The name of the property.
379 The name of the protocol.
381 If the property is readable
386 The value of the property.
388 The persistent value of the property.
390 The default value of the property.
392 The possible values for the property.
394 .It Fl p Ns , Ns Fl -prop
395 Specify which properties to display. See the
396 .Nm ipadm Ic set-ifprop
397 subcommand for the list of property names.
405 .Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
406 .Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
413 .Op Fl w Ar seconds Ns | Ns Cm forever
420 .Op Fl i Ar interface-id
421 .Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
422 .Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
425 Create an address on an IP interface. The address will be enabled but can
427 .Nm ipadm Ic disable-addr
428 subcommand. This subcommand has three different forms, depending on the
434 Create a static addrobj. Note that
436 address configured on an interface is required to configure
438 IPv6 address on the same interface. This takes the following options:
440 .It Fl a Ns , Ns Fl -address
441 Specify the address. The
445 prefix can be used for a point-to-point interface. In this case, both addresses
446 must be given. Otherwise, the equal sign
448 should be omitted and the address should be provided by itself without second
450 .It Fl d Ns , Ns Fl -down
454 Obtain the address via DHCP. This takes the following options:
456 .It Fl w Ns , Ns Fl -wait
457 Specify the time, in seconds, that the command should wait to obtain an address.
460 Create an auto-configured address. This takes the following options:
462 .It Fl i Ns , Ns Fl -interface-id
463 Specify the interface ID to be used.
464 .It Fl p Ns , Ns Fl -prop
465 Specify which method of auto-configuration should be used.
467 .It Fl t Ns , Ns Fl -temporary
468 Temporary, not persistent across reboots.
476 Down the address. This will stop packets from being sent or received.
478 .It Fl t Ns , Ns Fl -temporary
479 Temporary, not persistent across reboots.
487 Up the address. This will enable packets to be sent and received.
489 .It Fl t Ns , Ns Fl -temporary
490 Temporary, not persistent across reboots.
500 .It Fl t Ns , Ns Fl -temporary
501 Temporary, not persistent across reboots.
511 .It Fl t Ns , Ns Fl -temporary
512 Temporary, not persistent across reboots.
522 addresses. It also restarts duplicate address
527 .It Fl i Ns , Ns Fl -inform
528 Obtain network configuration from DHCP without taking a lease on the address.
536 Delete the given address.
538 .It Fl r Ns , Ns Fl -release
539 Indicate that the DHCP-assigned address should be released.
544 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
547 Show the current address properties.
549 .It Fl o Ns , Ns Fl -output
550 Select which fields will be shown. The field value can be one of the following
552 .Bl -tag -compact -width "PERSISTENT"
556 The name of the address.
558 The type of the address
559 .Pq Sy static Ns / Ns Sy dhcp Ns / Ns Sy addrconf .
561 The state of the address. It can be one of the following values:
562 .Bl -tag -compact -width "inaccessible"
565 .Nm ipadm Ic disable-addr
569 .Nm ipadm Ic down-addr
572 the address is a duplicate
574 the interface for this address has failed
578 duplicate address detection in progress
581 A set of single character flags indicating the following:
582 .Bl -tag -compact -width "U"
587 .Pq matches another local address
589 private, not advertised to routing
591 temporary IPv6 address
594 .Pq not used for outgoing packets
597 A set of single character flags showing the configuration which will be used
598 when the address is enabled.
599 .Bl -tag -compact -width "U"
603 private, not advertised to routing
606 .Pq not used for outgoing packets
611 .It Fl p Ns , Ns Fl -parsable
612 Print the output in a parsable format.
618 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
621 Set a property's value(s) on the addrobj.
623 .It Fl p Ns , Ns Fl -prop
624 Specify the property name and value(s). The property name can be one of the
626 .Bl -tag -compact -width "deprecated"
628 The broadcast address (read-only).
630 The address should not be used to send packets but can still receive packets
631 .Pq Cm on Ns / Ns Cm off .
633 The number of bits in the IPv4 netmask or IPv6 prefix.
635 The address is not advertised to routing
636 .Pq Cm on Ns / Ns Cm off .
638 Packets can be transmitted
639 .Pq Cm on Ns / Ns Cm off .
641 The zone the addrobj is in.
643 .It Fl t Ns , Ns Fl -temporary
644 Temporary, not persistent across reboots.
653 Reset an addrobj's property value to the default.
655 .It Fl p Ns , Ns Fl -prop
656 Specify the property name. See the
657 .Nm ipadm Ic set-addrprop
658 subcommand for the list of property names.
659 .It Fl t Ns , Ns Fl -temporary
660 Temporary, not persistent across reboots.
665 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
666 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
669 Display the property values for one or all of the addrobjs.
671 .It Fl c Ns , Ns Fl -parsable
672 Print the output in a parsable format.
673 .It Fl o Ns , Ns Fl -output
674 Select which fields will be shown. The field value can be one of the following
676 .Bl -tag -compact -width "PERSISTENT"
680 The name of the addrobj.
682 The name of the property.
684 If the property is readable
689 The value of the property.
691 The persistent value of the property.
693 The default value of the property.
695 The possible values for the property.
697 .It Fl p Ns , Ns Fl -prop
698 Specify which properties to display. See the
699 .Nm ipadm Ic set-addrprop
700 subcommand for the list of property names.
705 .Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
706 .Ar value Ns Oo , Ns Ar value Oc Ns ...
709 Set a property's value(s) on the protocol.
711 .It Fl p Ns , Ns Fl -prop
712 Specify the property name and value(s). The optional
714 syntax can be used to add/remove values from the current list of values on the
715 property. The property name can be one of the following:
716 .Bl -tag -compact -width "smallest_nonpriv_port"
718 Explicit congestion control
719 .Pq Cm never Ns / Ns Cm passive Ns / Ns Cm active
721 .It Cm extra_priv_ports
722 Additional privileged ports
726 .Pq Cm on Ns / Ns Cm off .
729 .It Cm largest_anon_port
730 Largest ephemeral port
733 Maximum receive or send buffer size
734 .Pq ICMP/SCTP/TCP/UDP .
735 This also sets the upper limit for the
741 Default receive buffer size
742 .Pq ICMP/SCTP/TCP/UDP .
743 The maximum value for this property is controlled by the
747 Selective acknowledgement
748 .Pq Cm active Ns / Ns Cm passive Ns / Ns Cm never
751 Default send buffer size
752 .Pq ICMP/SCTP/TCP/UDP .
753 The maximum value for this property is controlled by the
756 .It Cm smallest_anon_port
757 Smallest ephemeral port
759 .It Cm smallest_nonpriv_port
760 Smallest non-privileged port
763 The IPv4 time-to-live.
765 .It Fl t Ns , Ns Fl -temporary
766 Temporary, not persistent across reboots.
775 Reset a protocol's property value to the default.
777 .It Fl p Ns , Ns Fl -prop
778 Specify the property name. See the
779 .Nm ipadm Ic set-prop
780 subcommand for the list of property names.
781 .It Fl t Ns , Ns Fl -temporary
782 Temporary, not persistent across reboots.
787 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
788 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
791 Display the property values for one or all of the protocols.
793 .It Fl c Ns , Ns Fl -parsable
794 Print the output in a parsable format.
795 .It Fl o Ns , Ns Fl -output
796 Select which fields will be shown. The field value can be one of the following
798 .Bl -tag -compact -width "PERSISTENT"
802 The name of the protocol.
804 The name of the property.
806 If the property is readable
811 The value of the property.
813 The persistent value of the property.
815 The default value of the property.
817 The possible values for the property.
819 .It Fl p Ns , Ns Fl -prop
820 Specify which properties to display. See the
821 .Nm ipadm Ic set-prop
822 subcommand for the list of property names.
833 .Xr nsswitch.conf 4 ,