1 IPADM(1M) Maintenance Commands IPADM(1M)
2
3 NAME
4 ipadm - configure IP interfaces, addresses and protocols
5
6 SYNOPSIS
7 ipadm create-if [-t] interface
8 ipadm disable-if -t interface
9 ipadm enable-if -t interface
10 ipadm delete-if interface
11 ipadm show-if [[-p] -o field[,field]...] [interface]
12 ipadm set-ifprop [-t] -p prop=value[,value]... -m protocol interface
13 ipadm reset-ifprop [-t] -p prop -m protocol interface
14 ipadm show-ifprop [[-c] -o field[,value]...] [-p prop[,prop]...]
15 [-m protocol] [interface]
16 ipadm create-addr [-t] -T static [-d]
17 -a [local|remote=]addr[/prefixlen]... addrobj
18 ipadm create-addr [-t] -T dhcp [-w seconds|forever] [-1] [-h hostname]
19 addrobj
20 ipadm create-addr [-t] -T addrconf [-i interface-id]
21 [-p {stateful|stateless}={yes|no}]... addrobj
22 ipadm down-addr [-t] addrobj
23 ipadm up-addr [-t] addrobj
24 ipadm disable-addr [-t] addrobj
25 ipadm enable-addr [-t] addrobj
26 ipadm refresh-addr [-i] addrobj
27 ipadm delete-addr [-r] addrobj
28 ipadm show-addr [[-p] -o field[,field]...] [addrobj]
29 ipadm set-addrprop [-t] -p prop=value[,value]... addrobj
30 ipadm reset-addrprop [-t] -p prop addrobj
31 ipadm show-addrprop [[-c] -o field[,field]...] [-p prop[,prop]...]
32 [addrobj]
33 ipadm set-prop [-t] -p prop[+|-]=value[,value]... protocol
34 ipadm reset-prop [-t] -p prop protocol
35 ipadm show-prop [[-c] -o field[,field]...] [-p prop[,prop]...] [protocol]
36
37 DESCRIPTION
38 The ipadm command is a stable replacement for the ifconfig(1M) and
39 ndd(1M) commands. It is used to create IP interfaces and to configure IP
40 addresses on those interfaces. It is also used to get, set or reset
41 properties on interfaces, addresses and protocols.
42
43 For subcommands that take an addrobj, the addrobj specifies a unique
44 address on the system. It is made up of two parts, delimited by a `/'.
45 The first part is the name of the interface and the second part is a
46 string up to 32 characters long. For example, "lo0/v4" is a loopback
47 interface addrobj name.
48
49 For subcommands that take a protocol, this can be one of the following
50 values: ip, ipv4, ipv6, icmp, tcp, sctp or udp.
51
52 SUBCOMMANDS
53 The following subcommands are supported:
54
55 ipadm create-if [-t] interface
56 Create an IP interface that will handle both IPv4 and IPv6 packets. The
57 interface will be enabled as part of the creation process. The IPv4
58 interface will have the address 0.0.0.0. The IPv6 interface will have
59 the address ::.
60
61 -t,--temporary
62 Temporary, not persistent across reboots.
63
64 ipadm disable-if -t interface
65 Disable an IP interface.
66
67 -t,--temporary
68 Temporary, not persistent across reboots.
69
70 ipadm enable-if -t interface
71 Enable an IP interface.
72
73 -t,--temporary
74 Temporary, not persistent across reboots.
75
76 ipadm delete-if interface
77 Permanently delete an IP interface.
78
79 ipadm show-if [[-p] -o field[,field]...] [interface]
80 Show the current IP interface configuration.
81
82 -o,--output
83 Select which fields will be shown. The field value can be one of the
84 following names:
85 ALL Display all fields.
86 IFNAME The name of the interface.
87 STATE The state can be one of the following values:
88 ok resources for the interface have been allocated
89 offline the interface is offline
90 failed the interface's datalink is down
91 down the interface is down
92 disabled the interface is disabled
93 CURRENT A set of single character flags indicating the following:
94 b broadcast (mutually exclusive with `p')
95 m multicast
96 p point-to-point (mutually exclusive with `b')
97 v virtual interface
98 I IPMP
99 s IPMP standby
100 i IPMP inactive
101 V VRRP
102 a VRRP accept mode
103 4 IPv4
104 6 IPv6
105 PERSISTENT A set of single character flags showing what
106 configuration will be used the next time the interface is
107 enabled:
108 s IPMP standby
109 4 IPv4
110 6 IPv6
111
112 -p,--parsable
113 Print the output in a parsable format.
114
115 ipadm set-ifprop [-t] -p prop=value[,value]... -m protocol interface
116 Set a property's value(s) on the IP interface.
117
118 -m,--module
119 Specify which protocol the setting applies to.
120
121 -p,--prop
122 Specify the property name and value(s). The property name can be one
123 of the following:
124 arp Address resolution protocol (on/off).
125 exchange_routes Exchange of routing data (on/off).
126 forwarding IP Forwarding (on/off)
127 metric Set the routing metric to the numeric value. The
128 value is treated as extra hops to the destination.
129 mtu Set the maximum transmission unit to the numeric
130 value.
131 nud Neighbor unreachability detection (on/off)
132 usesrc Indicates which interface to use for source address
133 selection. A value none may also be used.
134
135 -t,--temporary
136 Temporary, not persistent across reboots.
137
138 ipadm reset-ifprop [-t] -p prop -m protocol interface
139 Reset an IP interface's property value to the default.
140
141 -m,--module
142 Specify which protocol the setting applies to.
143
144 -p,--prop
145 Specify the property name. See the ipadm set-ifprop subcommand for
146 the list of property names.
147
148 -t,--temporary
149 Temporary, not persistent across reboots.
150
151 ipadm show-ifprop [[-c] -o field[,value]...] [-p prop[,prop]...] [-m
152 protocol] [interface]
153 Display the property values for one or all of the IP interfaces.
154
155 -c,--parsable
156 Print the output in a parsable format.
157
158 -m,--module
159 Specify which protocol to display.
160
161 -o,--output
162 Select which fields will be shown. The field value can be one of the
163 following names:
164 ALL Display all fields.
165 IFNAME The name of the interface.
166 PROPERTY The name of the property.
167 PROTO The name of the protocol.
168 PERM If the property is readable ("r") and/or writable ("w").
169 CURRENT The value of the property.
170 PERSISTENT The persistent value of the property.
171 DEFAULT The default value of the property.
172 POSSIBLE The possible values for the property.
173
174 -p,--prop
175 Specify which properties to display. See the ipadm set-ifprop
176 subcommand for the list of property names.
177
178 ipadm create-addr [-t] -T static [-d] -a
179 [local|remote=]addr[/prefixlen]... addrobj
180 ipadm create-addr [-t] -T dhcp [-w seconds|forever] [-1] [-h hostname]
181 addrobj
182 ipadm create-addr [-t] -T addrconf [-i interface-id] [-p
183 {stateful|stateless}={yes|no}]... addrobj
184 Create an address on an IP interface. The address will be enabled but
185 can disabled using the ipadm disable-addr subcommand. This subcommand
186 has three different forms, depending on the value of the -T option.
187
188 -T static
189 Create a static addrobj. Note that addrconf address configured on an
190 interface is required to configure static IPv6 address on the same
191 interface. This takes the following options:
192
193 -a,--address
194 Specify the address. The local or remote prefix can be used for a
195 point-to-point interface. In this case, both addresses must be
196 given. Otherwise, the equal sign ("=") should be omitted and the
197 address should be provided by itself without second address.
198
199 -d,--down
200 The address is down.
201
202 -T dhcp
203 Obtain the address via DHCP. This takes the following options:
204
205 -w,--wait
206 Specify the time, in seconds, that the command should wait to
207 obtain an address; or specify forever to wait without interruption.
208 The default value is 120.
209
210 -1,--primary
211 Specify that the interface is primary. One effect will be that
212 nodename(4) will serve as -h,--reqhost if that switch is not
213 otherwise specified.
214
215 -h,--reqhost
216 Specify the host name to send to the DHCP server in order to
217 request an association of a Fully Qualified Domain Name to the
218 interface. An FQDN is determined from hostname if it is "rooted"
219 (ending in a '.'), or if it consists of at least three DNS labels,
220 or by appending to hostname the value configured separately using
221 either defaultdomain(4) or resolv.conf(4). N.b. that the DHCP
222 server implementation ultimately determines whether and how the
223 client-sent FQDN is used.
224
225 -T addrconf
226 Create an auto-configured address. This takes the following options:
227
228 -i,--interface-id
229 Specify the interface ID to be used.
230
231 -p,--prop
232 Specify which method of auto-configuration should be used.
233
234 -t,--temporary
235 Temporary, not persistent across reboots.
236
237 ipadm down-addr [-t] addrobj
238 Down the address. This will stop packets from being sent or received.
239
240 -t,--temporary
241 Temporary, not persistent across reboots.
242
243 ipadm up-addr [-t] addrobj
244 Up the address. This will enable packets to be sent and received.
245
246 -t,--temporary
247 Temporary, not persistent across reboots.
248
249 ipadm disable-addr [-t] addrobj
250 Disable the address.
251
252 -t,--temporary
253 Temporary, not persistent across reboots.
254
255 ipadm enable-addr [-t] addrobj
256 Enable the address.
257
258 -t,--temporary
259 Temporary, not persistent across reboots.
260
261 ipadm refresh-addr [-i] addrobj
262 Extend the lease for DHCP addresses. It also restarts duplicate address
263 detection for static addresses.
264
265 -i,--inform
266 Obtain network configuration from DHCP without taking a lease on the
267 address.
268
269 ipadm delete-addr [-r] addrobj
270 Delete the given address.
271
272 -r,--release
273 Indicate that the DHCP-assigned address should be released.
274
275 ipadm show-addr [[-p] -o field[,field]...] [addrobj]
276 Show the current address properties.
277
278 -o,--output
279 Select which fields will be shown. The field value can be one of the
280 following names:
281 ALL Display all fields.
282 ADDROBJ The name of the address.
283 TYPE The type of the address (static/dhcp/addrconf).
284 STATE The state of the address. It can be one of the following
285 values:
286 disabled see the ipadm disable-addr subcommand
287 down see the ipadm down-addr subcommand
288 duplicate the address is a duplicate
289 inaccessible the interface for this address has failed
290 ok the address is up
291 tentative duplicate address detection in progress
292 CURRENT A set of single character flags indicating the following:
293 U up
294 u unnumbered (matches another local address)
295 p private, not advertised to routing
296 t temporary IPv6 address
297 d deprecated (not used for outgoing packets)
298 PERSISTENT A set of single character flags showing the configuration
299 which will be used when the address is enabled.
300 U up
301 p private, not advertised to routing
302 d deprecated (not used for outgoing packets)
303 ADDR The address.
304
305 -p,--parsable
306 Print the output in a parsable format.
307
308 ipadm set-addrprop [-t] -p prop=value[,value]... addrobj
309 Set a property's value(s) on the addrobj.
310
311 -p,--prop
312 Specify the property name and value(s). The property name can be one
313 of the following:
314 broadcast The broadcast address (read-only).
315 deprecated The address should not be used to send packets but can
316 still receive packets (on/off).
317 prefixlen The number of bits in the IPv4 netmask or IPv6 prefix.
318 primary The DHCP primary interface flag (read-only).
319 private The address is not advertised to routing (on/off).
320 reqhost The host name to send to the DHCP server in order to
321 request an association of an FQDN to the interface. For
322 a primary DHCP interface, nodename(4) is sent if this
323 property is not defined. See the ipadm create-addr -T
324 dhcp subcommand for an explanation of how an FQDN is
325 determined.
326 transmit Packets can be transmitted (on/off).
327 zone The zone the addrobj is in. (temporary-only. Use
328 zonecfg(1M) to make persistent).
329
330 -t,--temporary
331 Temporary, not persistent across reboots.
332
333 ipadm reset-addrprop [-t] -p prop addrobj
334 Reset an addrobj's property value to the default.
335
336 -p,--prop
337 Specify the property name. See the ipadm set-addrprop subcommand for
338 the list of property names.
339
340 -t,--temporary
341 Temporary, not persistent across reboots.
342
343 ipadm show-addrprop [[-c] -o field[,field]...] [-p prop[,prop]...]
344 [addrobj]
345 Display the property values for one or all of the addrobjs.
346
347 -c,--parsable
348 Print the output in a parsable format.
349
350 -o,--output
351 Select which fields will be shown. The field value can be one of the
352 following names:
353 ALL Display all fields.
354 ADDROBJ The name of the addrobj.
355 PROPERTY The name of the property.
356 PERM If the property is readable ("r") and/or writable ("w").
357 CURRENT The value of the property.
358 PERSISTENT The persistent value of the property.
359 DEFAULT The default value of the property.
360 POSSIBLE The possible values for the property.
361
362 -p,--prop
363 Specify which properties to display. See the ipadm set-addrprop
364 subcommand for the list of property names.
365
366 set-prop [-t] -p prop[+|-]=value[,value]... protocol
367 Set a property's value(s) on the protocol.
368
369 -p,--prop
370 Specify the property name and value(s). The optional +|- syntax can
371 be used to add/remove values from the current list of values on the
372 property. The property name can be one of the following:
373 ecn Explicit congestion control
374 (never/passive/active) (TCP).
375 extra_priv_ports Additional privileged ports (SCTP/TCP/UDP).
376 forwarding Packet forwarding (on/off).
377 hoplimit The IPv6 hoplimit.
378 largest_anon_port Largest ephemeral port (SCTP/TCP/UDP).
379 max_buf Maximum receive or send buffer size
380 (ICMP/SCTP/TCP/UDP). This also sets the upper
381 limit for the recv_buf and send_buf
382 properties.
383 recv_buf Default receive buffer size
384 (ICMP/SCTP/TCP/UDP). The maximum value for
385 this property is controlled by the max_buf
386 property.
387 sack Selective acknowledgement
388 (active/passive/never) (TCP).
389 send_buf Default send buffer size (ICMP/SCTP/TCP/UDP).
390 The maximum value for this property is
391 controlled by the max_buf property.
392 smallest_anon_port Smallest ephemeral port (SCTP/TCP/UDP).
393 smallest_nonpriv_port Smallest non-privileged port (SCTP/TCP/UDP).
394 ttl The IPv4 time-to-live.
395
396 -t,--temporary
397 Temporary, not persistent across reboots.
398
399 ipadm reset-prop [-t] -p prop protocol
400 Reset a protocol's property value to the default.
401
402 -p,--prop
403 Specify the property name. See the ipadm set-prop subcommand for the
404 list of property names.
405
406 -t,--temporary
407 Temporary, not persistent across reboots.
408
409 ipadm show-prop [[-c] -o field[,field]...] [-p prop[,prop]...] [protocol]
410 Display the property values for one or all of the protocols.
411
412 -c,--parsable
413 Print the output in a parsable format.
414
415 -o,--output
416 Select which fields will be shown. The field value can be one of the
417 following names:
418 ALL Display all fields.
419 PROTO The name of the protocol.
420 PROPERTY The name of the property.
421 PERM If the property is readable ("r") and/or writable ("w").
422 CURRENT The value of the property.
423 PERSISTENT The persistent value of the property.
424 DEFAULT The default value of the property.
425 POSSIBLE The possible values for the property.
426
427 -p,--prop
428 Specify which properties to display. See the ipadm set-prop
429 subcommand for the list of property names.
430
431 SEE ALSO
432 arp(1M), cfgadm(1M), dladm(1M), if_mpadm(1M), ifconfig(1M), ndd(1M),
433 zonecfg(1M), defaultdomain(4), nodename(4), nsswitch.conf(4),
434 resolv.conf(4), dhcp(5)
435
436 illumos November 7, 2016 illumos