xref: /netbsd-src/sbin/ifconfig/ifconfig.8 (revision 22ebeae4b2252475e0ebe332f69734639cb946ea)
1.\"	$NetBSD: ifconfig.8,v 1.130 2024/08/20 08:18:24 ozaki-r Exp $
2.\"
3.\" Copyright (c) 1983, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"     @(#)ifconfig.8	8.4 (Berkeley) 6/1/94
31.\"
32.Dd August 20, 2024
33.Dt IFCONFIG 8
34.Os
35.Sh NAME
36.Nm ifconfig
37.Nd configure network interface parameters
38.Sh SYNOPSIS
39.Nm
40.Op Fl N
41.Ar interface address_family
42.Oo
43.Ar address
44.Op Ar dest_address
45.Oc
46.Op Ar parameters
47.Nm
48.Op Fl hLmNvz
49.Ar interface
50.Op Ar protocol_family
51.Nm
52.Fl a
53.Op Fl bdhLNmsuvz
54.Op Ar protocol_family
55.Nm
56.Fl l
57.Op Fl bdsu
58.Nm
59.Fl s
60.Ar interface
61.Nm
62.Fl w
63.Ar secs
64.Op Fl W Ar secs
65.Nm
66.Fl C
67.Sh DESCRIPTION
68.Nm
69is used to assign an address
70to a network interface and/or configure
71network interface parameters.
72.Nm
73must be used at boot time to define the network address
74of each interface present on a machine; it may also be used at
75a later time to redefine an interface's address
76or other operating parameters.
77.Pp
78Available operands for
79.Nm :
80.Bl -tag -width Ds
81.It Ar address
82For the
83.Tn DARPA-Internet
84family,
85the address is either a host name present in the host name data
86base,
87.Xr hosts 5 ,
88or a
89.Tn DARPA
90Internet address expressed in the Internet standard
91.Dq dot notation .
92.It Ar address_family
93Specifies the
94.Ar address_family
95which affects interpretation of the remaining parameters.
96Since an interface can receive transmissions in differing protocols
97with different naming schemes, specifying the address family is recommended.
98The address or protocol families currently
99supported are
100.Dq inet ,
101.Dq inet6 ,
102.Dq atalk ,
103and
104.Dq link .
105.It Ar interface
106The
107.Ar interface
108parameter is a string of the form
109.Dq name unit ,
110for example,
111.Dq en0
112.El
113.Pp
114The following parameters may be set with
115.Nm :
116.Bl -tag -width dest_addressxx
117.It Cm active
118This keyword applies when
119.Nm
120adds or modifies any link-layer address.
121It indicates that
122.Nm
123should
124.Dq activate
125the address.
126Activation makes an address the default source for transmissions
127on the interface.
128You may not delete the active address from an interface.
129You must activate some other address, first.
130.It Cm advbase Ar n
131If the driver is a
132.Xr carp 4
133pseudo-device, set the base advertisement interval to
134.Ar n
135seconds.
136This ia an 8-bit number; the default value is 1 second.
137.It Cm advskew Ar n
138If the driver is a
139.Xr carp 4
140pseudo-device, skew the advertisement interval by
141.Ar n .
142This is an 8-bit number; the default value is 0.
143.Pp
144Taken together the
145.Cm advbase
146indicate how frequently, in seconds, the host will advertise the fact that it
147considers itself the master of the virtual host.
148The formula is
149.Cm advbase
150+
151.Pf ( Cm advskew
152/ 256).
153If the master does not advertise within three times this interval, this host
154will begin advertising as master.
155.It Cm alias
156Establish an additional network address for this interface.
157This is sometimes useful when changing network numbers, and
158one wishes to accept packets addressed to the old interface.
159.It Fl alias
160Remove the specified network address alias.
161.It Cm arp
162Enable the use of the Address Resolution Protocol in mapping
163between network level addresses and link level addresses
164.Pq default .
165This is currently implemented for mapping between
166.Tn DARPA
167Internet
168addresses and Ethernet addresses.
169.It Fl arp
170Disable the use of the Address Resolution Protocol.
171.It Cm anycast
172.Pq inet6 only
173Set the IPv6 anycast address bit.
174.It Fl anycast
175.Pq inet6 only
176Clear the IPv6 anycast address bit.
177.It Cm broadcast Ar mask
178.Pq Inet only
179Specify the address to use to represent broadcasts to the
180network.
181The default broadcast address is the address with a host part of all 1's.
182.It Cm carpdev Ar iface
183If the driver is a
184.Xr carp 4
185pseudo-device, attach it to
186.Ar iface .
187If not specified, the kernel will attempt to select an interface with
188a subnet matching that of the carp interface.
189.It Cm description Ar description , Cm descr Ar description
190Set a description of the interface. (0-63 characters)
191.It Cm -description , Cm -descr
192Clear the description of the interface.
193.It Cm debug
194Enable driver dependent debugging code; usually, this turns on
195extra console error logging.
196.It Fl debug
197Disable driver dependent debugging code.
198.It Cm delete
199Remove the network address specified.
200This would be used if you incorrectly specified an alias, or it
201was no longer needed.
202If you have incorrectly set an NS address having the side effect
203of specifying the host portion, removing all NS addresses will
204allow you to respecify the host portion.
205.Cm delete
206does not work for IPv6 addresses.
207Use
208.Fl alias
209with explicit IPv6 address instead.
210.It Ar dest_address
211Specify the address of the correspondent on the other end
212of a point to point link.
213.It Cm down
214Mark an interface ``down''.
215When an interface is
216marked ``down'', the system will not attempt to
217transmit messages through that interface.
218If possible, the interface will be reset to disable reception as well.
219This action does not automatically disable routes using the interface.
220.It Cm media Ar type
221Set the media type of the interface to
222.Ar type .
223Some interfaces support the mutually exclusive use of one of several
224different physical media connectors.
225For example, a 10Mb/s Ethernet
226interface might support the use of either
227.Tn AUI
228or twisted pair connectors.
229Setting the media type to
230.Dq 10base5
231or
232.Dq AUI
233would change the currently active connector to the AUI port.
234Setting it to
235.Dq 10baseT
236or
237.Dq UTP
238would activate twisted pair.
239Refer to the interfaces' driver
240specific man page for a complete list of the available types
241and the
242.Xr ifmedia 4
243manual page for a list of media types.
244See the
245.Fl m
246flag below.
247.It Cm mediaopt Ar opts
248Set the specified media options on the interface.
249.Ar opts
250is a comma delimited list of options to apply to the interface.
251Refer to the interfaces' driver specific man page for a complete
252list of available options.
253Also see the
254.Xr ifmedia 4
255manual page for a list of media options.
256.It Fl mediaopt Ar opts
257Disable the specified media options on the interface.
258.It Cm mode Ar mode
259If the driver supports the media selection system, set the specified
260operating mode on the interface to
261.Ar mode .
262For IEEE 802.11 wireless interfaces that support multiple operating modes
263this directive is used to select between 802.11a
264.Pq Dq 11a ,
265802.11b
266.Pq Dq 11b ,
267and 802.11g
268.Pq Dq 11g
269operating modes.
270.It Cm instance Ar minst
271Set the media instance to
272.Ar minst .
273This is useful for devices which have multiple physical layer interfaces
274.Pq PHYs .
275Setting the instance on such devices may not be strictly required
276by the network interface driver as the driver may take care of this
277automatically; see the driver's manual page for more information.
278.It Cm metric Ar n
279Set the routing metric of the interface to
280.Ar n ,
281default 0.
282The routing metric is used by the routing protocol
283.Pq Xr routed 8 .
284Higher metrics have the effect of making a route
285less favorable; metrics are counted as addition hops
286to the destination network or host.
287.It Cm mtu Ar n
288Set the maximum transmission unit of the interface to
289.Ar n .
290Most interfaces do not support this option.
291.It Cm netmask Ar mask
292.Pq inet and inet6
293Specify how much of the address to reserve for subdividing
294networks into sub-networks.
295The mask includes the network part of the local address
296and the subnet part, which is taken from the host field of the address.
297The mask can be specified as a single hexadecimal number
298with a leading 0x, with a dot-notation Internet address,
299or with a pseudo-network name listed in the network table
300.Xr networks 5 .
301The mask contains 1's for the bit positions in the 32-bit address
302which are to be used for the network and subnet parts,
303and 0's for the host part.
304The mask should contain at least the standard network portion,
305and the subnet field should be contiguous with the network
306portion.
307.Pp
308For INET and INET6 addresses, the netmask can also be given with
309slash-notation after the address
310.Pq e.g 192.168.17.3/24 .
311.\" see
312.\" Xr eon 5 .
313.It Cm state Ar state
314Explicitly force the
315.Xr carp 4
316pseudo-device to enter this state.
317Valid states are
318.Ar INIT ,
319.Ar BACKUP ,
320and
321.Ar MASTER .
322.It Cm frag Ar threshold
323.Pq IEEE 802.11 devices only
324Configure the fragmentation threshold for IEEE 802.11-based wireless
325network interfaces.
326.It Cm rts Ar threshold
327.Pq IEEE 802.11 devices only
328Configure the RTS/CTS threshold for IEEE 802.11-based wireless
329network interfaces.
330This controls the number of bytes used for the RTS/CTS handshake boundary.
331The
332.Ar threshold
333can be any value between 0 and 2347.
334The default is 2347, which indicates the RTS/CTS mechanism should not be used.
335.It Cm ssid Ar id
336.Pq IEEE 802.11 devices only
337Configure the Service Set Identifier (aka the network name)
338for IEEE 802.11-based wireless network interfaces.
339The
340.Ar id
341can either be any text string up to 32 characters in length,
342or a series of up to 64 hexadecimal digits preceded by
343.Dq 0x .
344Setting
345.Ar id
346to the empty string allows the interface to connect to any available
347access point.
348.It Cm nwid Ar id
349Synonym for
350.Dq ssid .
351.It Cm hidessid
352.Pq IEEE 802.11 devices only
353When operating as an access point, do not broadcast the SSID
354in beacon frames or respond to probe request frames unless
355they are directed to the ap (i.e., they include the ap's SSID).
356By default, the SSID is included in beacon frames and
357undirected probe request frames are answered.
358.It Fl hidessid
359.Pq IEEE 802.11 devices only
360When operating as an access point, broadcast the SSID
361in beacon frames and answer and respond to undirected probe
362request frames (default).
363.It Cm nwkey Ar key
364.Pq IEEE 802.11 devices only
365Enable WEP encryption for IEEE 802.11-based wireless network interfaces
366with the
367.Ar key .
368The
369.Ar key
370can either be a string, a series of hexadecimal digits preceded by
371.Dq 0x ,
372or a set of keys in the form
373.Ar n:k1,k2,k3,k4 ,
374where
375.Ar n
376specifies which of keys will be used for all transmitted packets,
377and four keys,
378.Ar k1
379through
380.Ar k4 ,
381are configured as WEP keys.
382Note that the order must be match within same network if multiple keys
383are used.
384For IEEE 802.11 wireless network, the length of each key is restricted to
38540 bits, i.e., 5-character string or 10 hexadecimal digits,
386while the WaveLAN/IEEE Gold cards accept the 104 bits
387.Pq 13 characters
388key.
389.It Cm nwkey Cm persist
390.Pq IEEE 802.11 devices only
391Enable WEP encryption for IEEE 802.11-based wireless network interfaces
392with the persistent key written in the network card.
393.It Cm nwkey Cm persist : Ns Ar key
394.Pq IEEE 802.11 devices only
395Write the
396.Ar key
397to the persistent memory of the network card, and
398enable WEP encryption for IEEE 802.11-based wireless network interfaces
399with the
400.Ar key .
401.It Fl nwkey
402.Pq IEEE 802.11 devices only
403Disable WEP encryption for IEEE 802.11-based wireless network interfaces.
404.It Cm apbridge
405.Pq IEEE 802.11 devices only
406When operating as an access point, pass packets between
407wireless clients directly (default).
408.It Fl apbridge
409.Pq IEEE 802.11 devices only
410When operating as an access point, pass packets through
411the system so that they can be forwarded using some other mechanism.
412Disabling the internal bridging is useful when traffic
413is to be processed with packet filtering.
414.It Cm pass Ar passphrase
415If the driver is a
416.Xr carp 4
417pseudo-device, set the authentication key to
418.Ar passphrase .
419There is no passphrase by default
420.It Cm powersave
421.Pq IEEE 802.11 devices only
422Enable 802.11 power saving mode.
423.It Fl powersave
424.Pq IEEE 802.11 devices only
425Disable 802.11 power saving mode.
426.It Cm powersavesleep Ar duration
427.Pq IEEE 802.11 devices only
428Set the receiver sleep duration in milliseconds for 802.11 power saving mode.
429.It Cm bssid Ar bssid
430.Pq IEEE 802.11 devices only
431Set the desired BSSID for IEEE 802.11-based wireless network interfaces.
432.It Fl bssid
433.Pq IEEE 802.11 devices only
434Unset the desired BSSID for IEEE 802.11-based wireless network interfaces.
435The interface will automatically select a BSSID in this mode, which is
436the default.
437.It Cm chan Ar chan
438.Pq IEEE 802.11 devices only
439Select the channel
440.Pq radio frequency
441to be used for IEEE 802.11-based wireless network interfaces.
442.It Fl chan
443.Pq IEEE 802.11 devices only
444Unset the desired channel to be used
445for IEEE 802.11-based wireless network interfaces.
446It does not affect the channel to be created for IBSS or hostap mode.
447.It Cm list scan
448.Pq IEEE 802.11 devices only
449Display the access points and/or ad-hoc neighbors
450located in the vicinity.
451The
452.Fl v
453flag may be used to display long SSIDs.
454.Fl v
455also causes received information elements to be displayed symbolically.
456The interface must be up before any scanning operation.
457Only the super-user can use this command.
458.It Cm tunnel Ar src_addr Ns Oo Ar ,src_port Oc Ar dest_addr Ns Oo Ar ,dest_port Oc
459.Pq IP tunnel devices only
460Configure the physical source and destination address for IP tunnel
461interfaces, including
462.Xr gif 4 .
463The arguments
464.Ar src_addr
465and
466.Ar dest_addr
467are interpreted as the outer source/destination for the encapsulating
468IPv4/IPv6 header.
469.Pp
470On a
471.Xr gre 4
472interface in UDP mode, the arguments
473.Ar src_port
474and
475.Ar dest_port
476are interpreted as the outer source/destination port for the encapsulating
477UDP header.
478.It Cm deletetunnel
479Unconfigure the physical source and destination address for IP tunnel
480interfaces previously configured with
481.Cm tunnel .
482.It Cm session Ar local_session Ar remote_session
483.Pq L2TPv3 devices only
484Configure local session id and remote session id for L2TPv3
485interface.
486The length of session id is 4 bytes.
487.It Cm deletesession
488Unconfigure the local session id and remote session id for
489L2TPv3 interface previously configured with
490.Cm session .
491.It Cm cookie Ar local_cookie_length Ar local_cookie  Ar remote_cookie_length Ar remote_cookie
492.Pq L2TPv3 devices only
493Configure local cookie and remote cookie for L2TPv3 interface.
494The cookie length must be 4 or 8 bytes.
495Generally, cookies are managed by daemon.
496So, this command would be used for test or debug only.
497.It Cm deletecookie
498Unconfigure the local cookie and remote cookie for L2TPv3
499interface previously configured with
500.Cm cookie .
501.It Cm create
502Create the specified network pseudo-device.
503.It Cm destroy
504Destroy the specified network pseudo-device.
505.It Cm pltime Ar n
506.Pq inet6 only
507Set preferred lifetime for the address.
508.It Cm prefixlen Ar n
509.Pq inet and inet6 only
510Effect is similar to
511.Cm netmask .
512but you can specify by prefix length by digits.
513.It Cm deprecated
514.Pq inet6 only
515Set the IPv6 deprecated address bit.
516.It Fl deprecated
517.Pq inet6 only
518Clear the IPv6 deprecated address bit.
519.It Cm eui64
520.Pq inet6 only
521Fill interface index
522.Pq lowermost 64bit of an IPv6 address
523automatically.
524.It Cm link[0-2]
525Enable special processing of the link level of the interface.
526These three options are interface specific in actual effect, however,
527they are in general used to select special modes of operation.
528An example
529of this is to enable SLIP compression, or to select the connector type
530for some Ethernet cards.
531Refer to the man page for the specific driver
532for more information.
533.It Fl link[0-2]
534Disable special processing at the link level with the specified interface.
535.It Cm linkstr Ar str
536Set a link-level string parameter for the interface.
537This functionality varies from interface to interface.
538Refer to the man page for the specific driver
539for more information.
540.It Fl linkstr
541Remove an interface link-level string parameter.
542.It Cm up
543Mark an interface ``up''.
544This may be used to enable an interface after an ``ifconfig down.''
545It happens automatically when setting the first address on an interface.
546If the interface was reset when previously marked down,
547the hardware will be re-initialized.
548.It Cm vhid Ar n
549If the driver is a
550.Xr carp 4
551pseudo-device, set the virtual host ID to
552.Ar n .
553Acceptable values are 1 to 255.
554.It Cm vlan Ar vid
555If the interface is a
556.Xr vlan 4
557pseudo-interface, set the VLAN identifier to
558.Ar vid .
559These are the first 12 bits (0-4095) from a 16-bit integer used
560to create an 802.1Q VLAN header for packets sent from the
561.Xr vlan 4
562interface.
563Note that
564.Cm vlan
565and
566.Cm vlanif
567must be set at the same time.
568.It Cm vlanif Ar iface
569If the interface is a
570.Xr vlan 4
571pseudo-interface, associate the physical interface
572.Ar iface
573with it.
574Packets transmitted through the
575.Xr vlan 4
576interface will be diverted to the specified physical interface
577.Ar iface
578with 802.1Q VLAN encapsulation.
579Packets with 802.1Q encapsulation received
580by the physical interface with the correct VLAN tag will be diverted to the
581associated
582.Xr vlan 4
583pseudo-interface.
584The VLAN interface is assigned a copy of the physical
585interface's flags and
586.Tn Ethernet
587address.
588If the
589.Xr vlan 4
590interface already has a physical interface associated with it, this command
591will fail.
592To change the association to another physical interface, the
593existing association must be cleared first.
594Note that
595.Cm vlanif
596and
597.Cm vlan
598must be set at the same time.
599.It Cm -vlanif Ar iface
600Dissociate
601.Ar iface
602from the
603.Xr vlan 4
604interface.
605.It Cm agrport Ar iface
606Add
607.Ar iface
608to the
609.Xr agr 4
610interface.
611.It Cm -agrport Ar iface
612Remove
613.Ar iface
614from the
615.Xr agr 4
616interface.
617.It Cm laggport Ar interface Oo Cm pri Ar n Oc
618Add the interface named by
619.Ar interface
620as a port of the
621.Xr lagg 4
622interface,
623and set the priority of
624.Ar interface
625to
626.Ar n .
627.It Cm -laggport Ar interface
628Remove the interface named by
629.Ar interface
630from the
631.Xr lagg 4
632interface.
633.It Cm laggportpri Ar interface Ar n
634If the interface is a
635.Xr lagg 4
636pseudo-interface, set the priority of
637.Ar interface
638to
639.Ar n
640.It Cm laggproto Ar proto
641Set the aggregation protocol of
642.Xr lagg 4 .
643The default is
644.Li none .
645The available options are
646.Li failover ,
647.Li lacp ,
648.Li loadbalance ,
649and
650.Li none .
651.It Cm eee
652Enable IEEE 802.3az Energy Efficiency Ethernet function.
653.It Cm -eee
654Disable IEEE 802.3az Energy Efficiency Ethernet function.
655.It Cm vltime Ar n
656.Pq inet6 only
657Set valid lifetime for the address.
658.It Cm ip4csum
659Shorthand of
660.Dq ip4csum-tx ip4csum-rx
661.It Cm -ip4csum
662Shorthand of
663.Dq -ip4csum-tx -ip4csum-rx
664.It Cm tcp4csum
665Shorthand of
666.Dq tcp4csum-tx tcp4csum-rx
667.It Cm -tcp4csum
668Shorthand of
669.Dq -tcp4csum-tx -tcp4csum-rx
670.It Cm udp4csum
671Shorthand of
672.Dq udp4csum-tx udp4csum-rx
673.It Cm -udp4csum
674Shorthand of
675.Dq -udp4csum-tx -udp4csum-rx
676.It Cm tcp6csum
677Shorthand of
678.Dq tcp6csum-tx tcp6csum-rx
679.It Cm -tcp6csum
680Shorthand of
681.Dq -tcp6csum-tx -tcp6csum-rx
682.It Cm udp6csum
683Shorthand of
684.Dq udp6csum-tx udp6csum-rx
685.It Cm -udp6csum
686Shorthand of
687.Dq -udp6csum-tx -udp6csum-rx
688.It Cm ip4csum-tx
689Enable hardware-assisted IPv4 header checksums for the out-bound direction.
690.It Cm -ip4csum-tx
691Disable hardware-assisted IPv4 header checksums for the out-bound direction.
692.It Cm ip4csum-rx
693Enable hardware-assisted IPv4 header checksums for the in-bound direction.
694.It Cm -ip4csum-rx
695Disable hardware-assisted IPv4 header checksums for the in-bound direction.
696.It Cm tcp4csum-tx
697Enable hardware-assisted TCP/IPv4 checksums for the out-bound direction.
698.It Cm -tcp4csum-tx
699Disable hardware-assisted TCP/IPv4 checksums for the out-bound direction.
700.It Cm tcp4csum-rx
701Enable hardware-assisted TCP/IPv4 checksums for the in-bound direction.
702.It Cm -tcp4csum-rx
703Disable hardware-assisted TCP/IPv4 checksums for the in-bound direction.
704.It Cm udp4csum-tx
705Enable hardware-assisted UDP/IPv4 checksums for the out-bound direction.
706.It Cm -udp4csum-tx
707Disable hardware-assisted UDP/IPv4 checksums for the out-bound direction.
708.It Cm udp4csum-rx
709Enable hardware-assisted UDP/IPv4 checksums for the in-bound direction.
710.It Cm -udp4csum-rx
711Disable hardware-assisted UDP/IPv4 checksums for the in-bound direction.
712.It Cm tcp6csum-tx
713Enable hardware-assisted TCP/IPv6 checksums for the out-bound direction.
714.It Cm -tcp6csum-tx
715Disable hardware-assisted TCP/IPv6 checksums for the out-bound direction.
716.It Cm tcp6csum-rx
717Enable hardware-assisted TCP/IPv6 checksums for the in-bound direction.
718.It Cm -tcp6csum-rx
719Disable hardware-assisted TCP/IPv6 checksums for the in-bound direction.
720.It Cm udp6csum-tx
721Enable hardware-assisted UDP/IPv6 checksums for the out-bound direction.
722.It Cm -udp6csum-tx
723Disable hardware-assisted UDP/IPv6 checksums for the out-bound direction.
724.It Cm udp6csum-rx
725Enable hardware-assisted UDP/IPv6 checksums for the in-bound direction.
726.It Cm -udp6csum-rx
727Disable hardware-assisted UDP/IPv6 checksums for the in-bound direction.
728.It Cm tso4
729Enable hardware-assisted TCP/IPv4 segmentation on interfaces that
730support it.
731.It Cm -tso4
732Disable hardware-assisted TCP/IPv4 segmentation on interfaces that
733support it.
734.It Cm tso6
735Enable hardware-assisted TCP/IPv6 segmentation on interfaces that
736support it.
737.It Cm -tso6
738Disable hardware-assisted TCP/IPv6 segmentation on interfaces that
739support it.
740.It Cm vlan-hwfilter
741Enable hardware-assisted VLAN frame filter on interfaces that support it.
742.It Cm -vlan-hwfilter
743Disable hardware-assisted VLAN frame filter on interfaces that support it.
744.It Cm vlan-hwtagging
745Enable hardware-assisted VLAN tag insertion/removal on interfaces that
746support it.
747.It Cm -vlan-hwtagging
748Disable hardware-assisted VLAN tag insertion/removal on interfaces that
749support it.
750.It Cm maxupd Ar n
751If the driver is a
752.Xr pfsync 4
753pseudo-device, indicate the maximum number
754of updates for a single state which can be collapsed into one.
755This is an 8-bit number; the default value is 128.
756.It Cm syncdev Ar iface
757If the driver is a
758.Xr pfsync 4
759pseudo-device, use the specified interface
760to send and receive pfsync state synchronisation messages.
761.It Fl syncdev
762If the driver is a
763.Xr pfsync 4
764pseudo-device, stop sending pfsync state
765synchronisation messages over the network.
766.It Cm syncpeer Ar peer_address
767If the driver is a
768.Xr pfsync 4
769pseudo-device, make the pfsync link point-to-point rather than using
770multicast to broadcast the state synchronisation messages.
771The peer_address is the IP address of the other host taking part in
772the pfsync cluster.
773With this option,
774.Xr pfsync 4
775traffic can be protected using
776.Xr ipsec 4 .
777.It Fl syncpeer
778If the driver is a
779.Xr pfsync 4
780pseudo-device, broadcast the packets using multicast.
781.It Cm unnumbered
782Treat the interface as unnumbered.
783.It Cm -unnumbered
784Don't treat the interface as unnumbered.
785.El
786.Pp
787.Nm
788displays the current configuration for a network interface
789when no optional parameters are supplied.
790If a protocol family is specified,
791.Nm
792will report only the details specific to that protocol
793family.
794.Pp
795If the
796.Fl s
797flag is passed before an interface name,
798.Nm
799will attempt to query the interface for its media status.
800If the
801interface supports reporting media status, and it reports that it does
802not appear to be connected to a network,
803.Nm
804will exit with status of 1
805.Pq false ;
806otherwise, it will exit with a zero
807.Pq true
808exit status.
809For interface drivers that do not support media status reporting.
810then if the link state is not reported to be up,
811.Nm
812will exit with a status of 1
813.Pq false ;
814otherwise, it will exit with a zero
815.Pq true
816exit status.
817.Pp
818If the
819.Fl m
820flag is passed before an interface name,
821.Nm
822will display all of the supported media for the specified interface.
823If the
824.Fl L
825flag is supplied, address lifetime is displayed for IPv6 addresses,
826as time offset string.
827.Pp
828Optionally, the
829.Fl a
830flag may be used instead of an interface name.
831This flag instructs
832.Nm
833to display information about all interfaces in the system.
834This is also the default behaviour when no arguments are given to
835.Nm
836on the command line.
837When
838.Fl a
839is used, the output can be modified by adding more flags:
840.Fl d
841limits this to interfaces that are down,
842.Fl u
843limits this to interfaces that are up,
844.Fl b
845limits this to broadcast interfaces, and
846.Fl s
847omits interfaces which appear not to be connected to a network.
848.Pp
849The
850.Fl l
851flag may be used to list all available interfaces on the system, with
852no other additional information.
853Use of this flag is mutually exclusive
854with all other flags and commands, except for
855.Fl d
856.Pq only list interfaces that are down ,
857.Fl u
858.Pq only list interfaces that are up ,
859.Fl s
860.Pq only list interfaces that may be connected ,
861.Fl b
862.Pq only list broadcast interfaces .
863.Pp
864The
865.Fl C
866flag may be used to list all of the interface cloners available on
867the system, with no additional information.
868Use of this flag is
869mutually exclusive with all other flags and commands.
870.Pp
871The
872.Fl v
873flag prints additional information like statistics on packets sent and received
874on the interface and the link state of the interface.
875If
876.Fl h
877is used in conjunction with
878.Fl v ,
879the byte statistics will be printed in "human-readable" format.
880The
881.Fl z
882flag is identical to the
883.Fl v
884flag except that it zeros the interface input and output statistics
885after printing them.
886.Pp
887The
888.Fl w
889flag may be used to wait
890.Ar seconds
891seconds for the
892.Cm tentative
893flag to be removed from all addresses.
8940 seconds means to wait indefinitely until all addresses no longer have the
895.Cm tentative
896flag.
897The optional
898.Fl W
899flag may be used to wait
900.Ar seconds
901seconds during the above time for the detached flag to be removed from all
902addresses whose interface is marked ``up'' as well.
903The detached flag is set when the interface does not have a carrier.
904.Pp
905The
906.Fl N
907flag is just the opposite of the
908.Fl n
909flag in
910.Xr netstat 1
911or in
912.Xr route 8 :
913it tells
914.Nm
915to try to resolve numbers to hostnames or to service names.
916The default
917.Nm
918behavior is to print numbers instead of names.
919.Pp
920Only the super-user may modify the configuration of a network interface.
921.Sh EXAMPLES
922Add a link-layer (MAC) address to an Ethernet:
923.Pp
924.Ic ifconfig sip0 link 00:11:22:33:44:55
925.Pp
926Add and activate a link-layer (MAC) address:
927.Pp
928.Ic ifconfig sip0 link 00:11:22:33:44:55 active
929.Sh DIAGNOSTICS
930Messages indicating the specified interface does not exist, the
931requested address is unknown, or the user is not privileged and
932tried to alter an interface's configuration.
933.Sh SEE ALSO
934.Xr netstat 1 ,
935.Xr agr 4 ,
936.Xr lagg 4 ,
937.Xr carp 4 ,
938.Xr ifmedia 4 ,
939.Xr netintro 4 ,
940.Xr pfsync 4 ,
941.Xr vlan 4 ,
942.Xr ifconfig.if 5 ,
943.\" .Xr eon 5 ,
944.Xr ifmcstat 8 ,
945.Xr rc 8 ,
946.Xr routed 8
947.Sh BUGS
948Due to hardware limitations some of the capabilities cannot be turned on
949and off individually and need to be specified together.
950For example the
951.Xr ixg 4
952driver can't enable separately tcp and udp, or the transmit and receive
953checksumming capabilities.
954Unfortunately the diagnostic messages in this case are lacking.
955.Sh HISTORY
956The
957.Nm
958command appeared in
959.Bx 4.2 .
960