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
149 It is used to create IP interfaces and to configure IP addresses on those
151 It is also used to get, set or reset properties on interfaces, addresses and
154 For subcommands that take an
158 specifies a unique address on the system.
159 It is made up of two parts, delimited by a
161 The first part is the name of the interface and the second part is a string up
162 to 32 characters long.
165 is a loopback interface
169 For subcommands that take a
171 this can be one of the following values:
181 The following subcommands are supported:
189 Create an IP interface that will handle both IPv4 and IPv6 packets.
190 The interface will be enabled as part of the creation process.
191 The IPv4 interface will have the address 0.0.0.0.
192 The IPv6 interface will have the address ::.
194 .It Fl t Ns , Ns Fl -temporary
195 Temporary, not persistent across reboots.
203 Disable an IP interface.
205 .It Fl t Ns , Ns Fl -temporary
206 Temporary, not persistent across reboots.
214 Enable an IP interface.
216 .It Fl t Ns , Ns Fl -temporary
217 Temporary, not persistent across reboots.
224 Permanently delete an IP interface.
228 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
231 Show the current IP interface configuration.
233 .It Fl o Ns , Ns Fl -output
234 Select which fields will be shown.
235 The field value can be one of the following names:
236 .Bl -tag -compact -width "PERSISTENT"
240 The name of the interface.
242 The state can be one of the following values:
243 .Bl -tag -compact -width "disabled"
245 resources for the interface have been allocated
247 the interface is offline
249 the interface's datalink is down
251 the interface is down
253 the interface is disabled
256 A set of single character flags indicating the following:
257 .Bl -tag -compact -width "b"
259 broadcast (mutually exclusive with
264 point-to-point (mutually exclusive with
284 A set of single character flags showing what configuration will be used the
285 next time the interface is enabled:
286 .Bl -tag -compact -width "s"
295 .It Fl p Ns , Ns Fl -parsable
296 Print the output in a parsable format.
302 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
306 Set a property's value(s) on the IP interface.
308 .It Fl m Ns , Ns Fl -module
309 Specify which protocol the setting applies to.
310 .It Fl p Ns , Ns Fl -prop
311 Specify the property name and value(s).
312 The property name can be one of the following:
313 .Bl -tag -compact -width "exchange_routes"
315 Address resolution protocol
316 .Pq Cm on Ns / Ns Cm off .
317 .It Cm exchange_routes
318 Exchange of routing data
319 .Pq Cm on Ns / Ns Cm off .
322 .Pq Cm on Ns / Ns Cm off
324 Set the routing metric to the numeric value.
325 The value is treated as extra hops to the destination.
327 Set the maximum transmission unit to the numeric value.
329 Neighbor unreachability detection
330 .Pq Cm on Ns / Ns Cm off
332 Indicates which interface to use for source address selection.
337 .It Fl t Ns , Ns Fl -temporary
338 Temporary, not persistent across reboots.
348 Reset an IP interface's property value to the default.
350 .It Fl m Ns , Ns Fl -module
351 Specify which protocol the setting applies to.
352 .It Fl p Ns , Ns Fl -prop
353 Specify the property name.
355 .Nm ipadm Ic set-ifprop
356 subcommand for the list of property names.
357 .It Fl t Ns , Ns Fl -temporary
358 Temporary, not persistent across reboots.
363 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
364 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
368 Display the property values for one or all of the IP interfaces.
370 .It Fl c Ns , Ns Fl -parsable
371 Print the output in a parsable format.
372 .It Fl m Ns , Ns Fl -module
373 Specify which protocol to display.
374 .It Fl o Ns , Ns Fl -output
375 Select which fields will be shown.
376 The field value can be one of the following names:
377 .Bl -tag -compact -width "PERSISTENT"
381 The name of the interface.
383 The name of the property.
385 The name of the protocol.
387 If the property is readable
392 The value of the property.
394 The persistent value of the property.
396 The default value of the property.
398 The possible values for the property.
400 .It Fl p Ns , Ns Fl -prop
401 Specify which properties to display.
403 .Nm ipadm Ic set-ifprop
404 subcommand for the list of property names.
412 .Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
413 .Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
420 .Op Fl w Ar seconds Ns | Ns Cm forever
427 .Op Fl i Ar interface-id
428 .Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
429 .Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
432 Create an address on an IP interface.
433 The address will be enabled but can disabled using the
434 .Nm ipadm Ic disable-addr
436 This subcommand has three different forms, depending on the value of the
441 Create a static addrobj.
444 address configured on an interface is required to configure
446 IPv6 address on the same interface.
447 This takes the following options:
449 .It Fl a Ns , Ns Fl -address
455 prefix can be used for a point-to-point interface.
456 In this case, both addresses must be given.
457 Otherwise, the equal sign
459 should be omitted and the address should be provided by itself without second
461 .It Fl d Ns , Ns Fl -down
465 Obtain the address via DHCP.
466 This takes the following options:
468 .It Fl w Ns , Ns Fl -wait
469 Specify the time, in seconds, that the command should wait to obtain an address.
472 Create an auto-configured address.
473 This takes the following options:
475 .It Fl i Ns , Ns Fl -interface-id
476 Specify the interface ID to be used.
477 .It Fl p Ns , Ns Fl -prop
478 Specify which method of auto-configuration should be used.
480 .It Fl t Ns , Ns Fl -temporary
481 Temporary, not persistent across reboots.
490 This will stop packets from being sent or received.
492 .It Fl t Ns , Ns Fl -temporary
493 Temporary, not persistent across reboots.
502 This will enable packets to be sent and received.
504 .It Fl t Ns , Ns Fl -temporary
505 Temporary, not persistent across reboots.
515 .It Fl t Ns , Ns Fl -temporary
516 Temporary, not persistent across reboots.
526 .It Fl t Ns , Ns Fl -temporary
527 Temporary, not persistent across reboots.
538 It also restarts duplicate address detection for
542 .It Fl i Ns , Ns Fl -inform
543 Obtain network configuration from DHCP without taking a lease on the address.
551 Delete the given address.
553 .It Fl r Ns , Ns Fl -release
554 Indicate that the DHCP-assigned address should be released.
559 .Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
562 Show the current address properties.
564 .It Fl o Ns , Ns Fl -output
565 Select which fields will be shown.
566 The field value can be one of the following names:
567 .Bl -tag -compact -width "PERSISTENT"
571 The name of the address.
573 The type of the address
574 .Pq Sy static Ns / Ns Sy dhcp Ns / Ns Sy addrconf .
576 The state of the address.
577 It can be one of the following values:
578 .Bl -tag -compact -width "inaccessible"
581 .Nm ipadm Ic disable-addr
585 .Nm ipadm Ic down-addr
588 the address is a duplicate
590 the interface for this address has failed
594 duplicate address detection in progress
597 A set of single character flags indicating the following:
598 .Bl -tag -compact -width "U"
603 .Pq matches another local address
605 private, not advertised to routing
607 temporary IPv6 address
610 .Pq not used for outgoing packets
613 A set of single character flags showing the configuration which will be used
614 when the address is enabled.
615 .Bl -tag -compact -width "U"
619 private, not advertised to routing
622 .Pq not used for outgoing packets
627 .It Fl p Ns , Ns Fl -parsable
628 Print the output in a parsable format.
634 .Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
637 Set a property's value(s) on the addrobj.
639 .It Fl p Ns , Ns Fl -prop
640 Specify the property name and value(s).
641 The property name can be one of the following:
642 .Bl -tag -compact -width "deprecated"
644 The broadcast address (read-only).
646 The address should not be used to send packets but can still receive packets
647 .Pq Cm on Ns / Ns Cm off .
649 The number of bits in the IPv4 netmask or IPv6 prefix.
651 The address is not advertised to routing
652 .Pq Cm on Ns / Ns Cm off .
654 Packets can be transmitted
655 .Pq Cm on Ns / Ns Cm off .
657 The zone the addrobj is in.
659 .It Fl t Ns , Ns Fl -temporary
660 Temporary, not persistent across reboots.
669 Reset an addrobj's property value to the default.
671 .It Fl p Ns , Ns Fl -prop
672 Specify the property name.
674 .Nm ipadm Ic set-addrprop
675 subcommand for the list of property names.
676 .It Fl t Ns , Ns Fl -temporary
677 Temporary, not persistent across reboots.
682 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
683 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
686 Display the property values for one or all of the addrobjs.
688 .It Fl c Ns , Ns Fl -parsable
689 Print the output in a parsable format.
690 .It Fl o Ns , Ns Fl -output
691 Select which fields will be shown.
692 The field value can be one of the following names:
693 .Bl -tag -compact -width "PERSISTENT"
697 The name of the addrobj.
699 The name of the property.
701 If the property is readable
706 The value of the property.
708 The persistent value of the property.
710 The default value of the property.
712 The possible values for the property.
714 .It Fl p Ns , Ns Fl -prop
715 Specify which properties to display.
717 .Nm ipadm Ic set-addrprop
718 subcommand for the list of property names.
723 .Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
724 .Ar value Ns Oo , Ns Ar value Oc Ns ...
727 Set a property's value(s) on the protocol.
729 .It Fl p Ns , Ns Fl -prop
730 Specify the property name and value(s).
733 syntax can be used to add/remove values from the current list of values on the
735 The property name can be one of the following:
736 .Bl -tag -compact -width "smallest_nonpriv_port"
738 Explicit congestion control
739 .Pq Cm never Ns / Ns Cm passive Ns / Ns Cm active
741 .It Cm extra_priv_ports
742 Additional privileged ports
746 .Pq Cm on Ns / Ns Cm off .
749 .It Cm largest_anon_port
750 Largest ephemeral port
753 Maximum receive or send buffer size
754 .Pq ICMP/SCTP/TCP/UDP .
755 This also sets the upper limit for the
761 Default receive buffer size
762 .Pq ICMP/SCTP/TCP/UDP .
763 The maximum value for this property is controlled by the
767 Selective acknowledgement
768 .Pq Cm active Ns / Ns Cm passive Ns / Ns Cm never
771 Default send buffer size
772 .Pq ICMP/SCTP/TCP/UDP .
773 The maximum value for this property is controlled by the
776 .It Cm smallest_anon_port
777 Smallest ephemeral port
779 .It Cm smallest_nonpriv_port
780 Smallest non-privileged port
783 The IPv4 time-to-live.
785 .It Fl t Ns , Ns Fl -temporary
786 Temporary, not persistent across reboots.
795 Reset a protocol's property value to the default.
797 .It Fl p Ns , Ns Fl -prop
798 Specify the property name.
800 .Nm ipadm Ic set-prop
801 subcommand for the list of property names.
802 .It Fl t Ns , Ns Fl -temporary
803 Temporary, not persistent across reboots.
808 .Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
809 .Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
812 Display the property values for one or all of the protocols.
814 .It Fl c Ns , Ns Fl -parsable
815 Print the output in a parsable format.
816 .It Fl o Ns , Ns Fl -output
817 Select which fields will be shown.
818 The field value can be one of the following names:
819 .Bl -tag -compact -width "PERSISTENT"
823 The name of the protocol.
825 The name of the property.
827 If the property is readable
832 The value of the property.
834 The persistent value of the property.
836 The default value of the property.
838 The possible values for the property.
840 .It Fl p Ns , Ns Fl -prop
841 Specify which properties to display.
843 .Nm ipadm Ic set-prop
844 subcommand for the list of property names.
855 .Xr nsswitch.conf 4 ,