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 2018 Nexenta Systems, Inc.
15 .\" Copyright (c) 2016-2017, Chris Fraire <cfraire@me.com>.
22 .Nd configure IP interfaces, addresses and protocols
41 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
46 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
57 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
58 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
66 .Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
67 .Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
75 .Op Fl w Bro Ar seconds Ns | Ns Cm forever Brc
81 .Op Fl i Ar interface-id
82 .Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
83 .Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
111 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
116 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
125 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
126 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
131 .Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
132 .Ar value Ns Oo , Ns Ar value Oc Ns ...
141 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
142 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
147 command is a stable replacement for the
150 commands. It is used to create IP interfaces and to configure IP addresses on
151 those interfaces. It is also used to get, set or reset properties on interfaces,
152 addresses and protocols.
154 For subcommands that take an
158 specifies a unique address on the system. It is made up of two parts, delimited
161 The first part is the name of the interface and the second part is a string up
162 to 32 characters long. For example,
164 is a loopback interface
168 For subcommands that take a
170 this can be one of the following values:
180 The following subcommands are supported:
188 Create an IP interface that will handle both IPv4 and IPv6 packets.
189 The interface will be enabled as part of the creation process.
190 The IPv4 interface will have the address 0.0.0.0.
191 The IPv6 interface will have the address ::.
193 .It Fl t Ns \&, Ns Fl -temporary
194 Temporary, not persistent across reboots.
202 Disable the specified IP interface.
204 .It Fl t Ns \&, Ns Fl -temporary
205 Temporary, not persistent across reboots.
213 Enable the specified IP interface.
215 .It Fl t Ns \&, Ns Fl -temporary
216 Temporary, not persistent across reboots.
223 Permanently delete the specified IP interface.
227 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
230 Show the current IP interface configuration.
232 .It Fl o Ns \&, Ns Fl -output
233 Select which fields will be shown.
234 The field value can be one of the following names:
235 .Bl -tag -compact -width "PERSISTENT"
239 The name of the interface.
241 The state can be one of the following values:
242 .Bl -tag -compact -width "disabled"
244 resources for the interface have been allocated
246 the interface is offline
248 the interface's datalink is down
250 the interface is down
252 the interface is disabled
255 A set of single character flags indicating the following:
256 .Bl -tag -compact -width "b"
258 broadcast (mutually exclusive with
263 point-to-point (mutually exclusive with
283 A set of single character flags showing what configuration will be used the
284 next time the interface is enabled:
285 .Bl -tag -compact -width "s"
294 .It Fl p Ns , Ns Fl -parsable
295 Print the output in a parsable format.
301 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
305 Set a property's value(s) on the specified IP interface.
307 .It Fl m Ns \&, Ns Fl -module
308 Specify which protocol the setting applies to.
309 .It Fl p Ns , Ns Fl -prop
310 Specify the property name and value(s). The property name can be one of the
312 .Bl -tag -compact -width "exchange_routes"
314 Address resolution protocol
315 .Pq Cm on Ns / Ns Cm off .
316 .It Cm exchange_routes
317 Exchange of routing data
318 .Pq Cm on Ns / Ns Cm off .
321 .Pq Cm on Ns / Ns Cm off
323 Set the routing metric to the numeric value. The value is treated as extra
324 hops to the destination.
326 Set the maximum transmission unit to the numeric value.
328 Neighbor unreachability detection
329 .Pq Cm on Ns / Ns Cm off
331 Indicates which interface to use for source address selection. A value
335 .It Fl t Ns , Ns Fl -temporary
336 Temporary, not persistent across reboots.
346 Reset the specified IP interface's property value to the default.
348 .It Fl m Ns \&, Ns Fl -module
349 Specify which protocol the setting applies to.
350 .It Fl p Ns , Ns Fl -prop
351 Specify the property name. See the
352 .Nm ipadm Ic set-ifprop
353 subcommand for the list of property names.
354 .It Fl t Ns , Ns Fl -temporary
355 Temporary, not persistent across reboots.
360 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
361 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
365 Display the property values for one or all of the IP interfaces.
367 .It Fl c Ns \&, Ns Fl -parsable
368 Print the output in a parsable format.
369 .It Fl m Ns , Ns Fl -module
370 Specify which protocol to display.
371 .It Fl o Ns , Ns Fl -output
372 Select which fields will be shown. The field value can be one of the following
374 .Bl -tag -compact -width "PERSISTENT"
378 The name of the interface.
380 The name of the property.
382 The name of the protocol.
384 If the property is readable
389 The value of the property.
391 The persistent value of the property.
393 The default value of the property.
395 The possible values for the property.
397 .It Fl p Ns , Ns Fl -prop
398 Specify which properties to display. See the
399 .Nm ipadm Ic set-ifprop
400 subcommand for the list of property names.
408 .Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
409 .Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
412 Create an address on the specified IP interface using static configuration.
413 The address will be enabled but can disabled using the
414 .Nm ipadm Ic disable-addr
418 address configured on an interface is required to configure
420 IPv6 address on the same interface.
421 This takes the following options:
423 .It Fl a Ns \&, Ns Fl -address
429 prefix can be used for a point-to-point interface. In this case, both addresses
430 must be given. Otherwise, the equal sign
432 should be omitted and the address should be provided by itself without second
434 .It Fl d Ns , Ns Fl -down
436 .It Fl t Ns \&, Ns Fl -temporary
437 Temporary, not persistent across reboots.
446 .Op Fl w Bro Ar seconds Ns | Ns Cm forever Brc
449 Create an address on the specified IP interface using DHCP.
450 This takes the following options:
452 .It Fl 1 Ns \&, Ns Fl -primary
453 Specify that the interface is primary.
454 One effect will be that
457 .Fl h Ns \&, Ns Fl -reqhost
458 if that switch is not otherwise specified.
459 .It Fl h Ns \&, Ns Fl -reqhost
460 Specify the host name to send to the DHCP server in order to request an
461 association of a Fully Qualified Domain Name to the interface.
462 An FQDN is determined from
464 if it is "rooted" (ending in a '.'), or if it consists of at least three
465 DNS labels, or by appending to
467 the DNS domain name value configured in
468 .Pa /etc/default/dhcpagent
471 N.b. that the DHCP server implementation ultimately determines whether and
472 how the client-sent FQDN is used.
473 .It Fl t Ns \&, Ns Fl -temporary
474 Temporary, not persistent across reboots.
475 .It Fl w Ns \&, Ns Fl -wait
476 Specify the time, in seconds, that the command should wait to obtain an
479 to wait without interruption.
480 The default value is 120.
487 .Op Fl i Ar interface-id
488 .Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
489 .Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
492 Create an auto-configured address on the specified IP interface.
493 This takes the following options:
495 .It Fl i Ns \&, Ns Fl -interface-id
496 Specify the interface ID to be used.
497 .It Fl p Ns , Ns Fl -prop
498 Specify which method of auto-configuration should be used.
499 .It Fl t Ns \&, Ns Fl -temporary
500 Temporary, not persistent across reboots.
509 This will stop packets from being sent or received.
511 .It Fl t Ns \&, Ns Fl -temporary
512 Temporary, not persistent across reboots.
521 This will enable packets to be sent and received.
523 .It Fl t Ns \&, Ns Fl -temporary
524 Temporary, not persistent across reboots.
534 .It Fl t Ns \&, Ns Fl -temporary
535 Temporary, not persistent across reboots.
545 .It Fl t Ns \&, Ns Fl -temporary
546 Temporary, not persistent across reboots.
556 addresses. It also restarts duplicate address
561 .It Fl i Ns \&, Ns Fl -inform
562 Obtain network configuration from DHCP without taking a lease on the address.
570 Delete the given address.
572 .It Fl r Ns \&, Ns Fl -release
573 Indicate that the DHCP-assigned address should be released.
578 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
581 Show the current address properties.
583 .It Fl o Ns \&, Ns Fl -output
584 Select which fields will be shown.
585 The field value can be one of the following names:
586 .Bl -tag -compact -width "PERSISTENT"
590 The name of the address.
592 The type of the address
593 .Pq Sy static Ns / Ns Sy dhcp Ns / Ns Sy addrconf .
595 The state of the address. It can be one of the following values:
596 .Bl -tag -compact -width "inaccessible"
599 .Nm ipadm Ic disable-addr
603 .Nm ipadm Ic down-addr
606 the address is a duplicate
608 the interface for this address has failed
612 duplicate address detection in progress
615 A set of single character flags indicating the following:
616 .Bl -tag -compact -width "U"
621 .Pq matches another local address
623 private, not advertised to routing
625 temporary IPv6 address
628 .Pq not used for outgoing packets
631 A set of single character flags showing the configuration which will be used
632 when the address is enabled.
633 .Bl -tag -compact -width "U"
637 private, not advertised to routing
640 .Pq not used for outgoing packets
645 .It Fl p Ns , Ns Fl -parsable
646 Print the output in a parsable format.
652 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
655 Set a property's value(s) on the addrobj.
657 .It Fl p Ns \&, Ns Fl -prop
658 Specify the property name and value(s).
659 The property name can be one of the following:
660 .Bl -tag -compact -width "deprecated"
662 The broadcast address (read-only).
664 The address should not be used to send packets but can still receive packets
665 .Pq Cm on Ns / Ns Cm off .
667 The number of bits in the IPv4 netmask or IPv6 prefix.
669 The DHCP primary interface flag (read-only).
671 The address is not advertised to routing
672 .Pq Cm on Ns / Ns Cm off .
674 The host name to send to the DHCP server in order to request an association
675 of the FQDN to the interface.
676 For a primary DHCP interface,
678 is sent if this property is not defined.
683 subcommand for the explanation of how an FQDN is determined.
685 Packets can be transmitted
686 .Pq Cm on Ns / Ns Cm off .
688 The zone the addrobj is in (temporary-only--use
692 .It Fl t Ns , Ns Fl -temporary
693 Temporary, not persistent across reboots.
702 Reset the addrobj's property value to the default.
704 .It Fl p Ns \&, Ns Fl -prop
705 Specify the property name.
707 .Nm ipadm Ic set-addrprop
708 subcommand for the list of property names.
709 .It Fl t Ns , Ns Fl -temporary
710 Temporary, not persistent across reboots.
715 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
716 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
719 Display the property values for one or all of the addrobjs.
721 .It Fl c Ns \&, Ns Fl -parsable
722 Print the output in a parsable format.
723 .It Fl o Ns , Ns Fl -output
724 Select which fields will be shown. The field value can be one of the following
726 .Bl -tag -compact -width "PERSISTENT"
730 The name of the addrobj.
732 The name of the property.
734 If the property is readable
739 The value of the property.
741 The persistent value of the property.
743 The default value of the property.
745 The possible values for the property.
747 .It Fl p Ns , Ns Fl -prop
748 Specify which properties to display. See the
749 .Nm ipadm Ic set-addrprop
750 subcommand for the list of property names.
755 .Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
756 .Ar value Ns Oo , Ns Ar value Oc Ns ...
759 Set a property's value(s) on the protocol.
761 .It Fl p Ns \&, Ns Fl -prop
762 Specify the property name and value(s).
765 syntax can be used to add/remove values from the current list of values on the
766 property. The property name can be one of the following:
767 .Bl -tag -compact -width "smallest_nonpriv_port"
769 Explicit congestion control
770 .Pq Cm never Ns / Ns Cm passive Ns / Ns Cm active
772 .It Cm extra_priv_ports
773 Additional privileged ports
777 .Pq Cm on Ns / Ns Cm off .
780 .It Cm largest_anon_port
781 Largest ephemeral port
784 Maximum receive or send buffer size
785 .Pq ICMP/SCTP/TCP/UDP .
786 This also sets the upper limit for the
792 Default receive buffer size
793 .Pq ICMP/SCTP/TCP/UDP .
794 The maximum value for this property is controlled by the
798 Selective acknowledgement
799 .Pq Cm active Ns / Ns Cm passive Ns / Ns Cm never
802 Default send buffer size
803 .Pq ICMP/SCTP/TCP/UDP .
804 The maximum value for this property is controlled by the
807 .It Cm smallest_anon_port
808 Smallest ephemeral port
810 .It Cm smallest_nonpriv_port
811 Smallest non-privileged port
814 The IPv4 time-to-live.
816 .It Fl t Ns , Ns Fl -temporary
817 Temporary, not persistent across reboots.
826 Reset a protocol's property value to the default.
828 .It Fl p Ns \&, Ns Fl -prop
829 Specify the property name.
831 .Nm ipadm Ic set-prop
832 subcommand for the list of property names.
833 .It Fl t Ns , Ns Fl -temporary
834 Temporary, not persistent across reboots.
839 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
840 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
843 Display the property values for one or all of the protocols.
845 .It Fl c Ns \&, Ns Fl -parsable
846 Print the output in a parsable format.
847 .It Fl o Ns , Ns Fl -output
848 Select which fields will be shown. The field value can be one of the following
850 .Bl -tag -compact -width "PERSISTENT"
854 The name of the protocol.
856 The name of the property.
858 If the property is readable
863 The value of the property.
865 The persistent value of the property.
867 The default value of the property.
869 The possible values for the property.
871 .It Fl p Ns , Ns Fl -prop
872 Specify which properties to display. See the
873 .Nm ipadm Ic set-prop
874 subcommand for the list of property names.
886 .Xr nsswitch.conf 4 ,