xref: /netbsd/sbin/ifconfig/ifconfig.8 (revision 6550d01e)
1.\"	$NetBSD: ifconfig.8,v 1.102 2010/11/15 22:42:37 pooka 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 November 15, 2010
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 C
63.Sh DESCRIPTION
64.Nm
65is used to assign an address
66to a network interface and/or configure
67network interface parameters.
68.Nm
69must be used at boot time to define the network address
70of each interface present on a machine; it may also be used at
71a later time to redefine an interface's address
72or other operating parameters.
73.Pp
74Available operands for
75.Nm :
76.Bl -tag -width Ds
77.It Ar address
78For the
79.Tn DARPA-Internet
80family,
81the address is either a host name present in the host name data
82base,
83.Xr hosts 5 ,
84or a
85.Tn DARPA
86Internet address expressed in the Internet standard
87.Dq dot notation .
88For the Xerox Network Systems(tm) family,
89addresses are
90.Ar net:a.b.c.d.e.f ,
91where
92.Ar net
93is the assigned network number
94.Pq in decimal ,
95and each of the six bytes of the host number,
96.Ar a
97through
98.Ar f ,
99are specified in hexadecimal.
100The host number may be omitted on Ethernet interfaces,
101which use the hardware physical address,
102and on interfaces other than the first.
103For the
104.Tn ISO
105family, addresses are specified as a long hexadecimal string,
106as in the Xerox family.
107However, two consecutive dots imply a zero
108byte, and the dots are optional, if the user wishes to
109.Pq carefully
110count out long strings of digits in network byte order.
111.It Ar address_family
112Specifies the
113.Ar address_family
114which affects interpretation of the remaining parameters.
115Since an interface can receive transmissions in differing protocols
116with different naming schemes, specifying the address family is recommended.
117The address or protocol families currently
118supported are
119.Dq inet ,
120.Dq inet6 ,
121.Dq atalk ,
122.Dq iso ,
123and
124.Dq link .
125.It Ar interface
126The
127.Ar interface
128parameter is a string of the form
129.Dq name unit ,
130for example,
131.Dq en0
132.El
133.Pp
134The following parameters may be set with
135.Nm :
136.Bl -tag -width dest_addressxx
137.It Cm active
138This keyword applies when
139.Nm
140adds or modifies any link-layer address.
141It indicates that
142.Nm
143should
144.Dq activate
145the address.
146Activation makes an address the default source for transmissions
147on the interface.
148You may not delete the active address from an interface.
149You must activate some other address, first.
150.It Cm advbase Ar n
151If the driver is a
152.Xr carp 4
153pseudo-device, set the base advertisement interval to
154.Ar n
155seconds.
156This ia an 8-bit number; the default value is 1 second.
157.It Cm advskew Ar n
158If the driver is a
159.Xr carp 4
160pseudo-device, skew the advertisement interval by
161.Ar n .
162This is an 8-bit number; the default value is 0.
163.Pp
164Taken together the
165.Cm advbase
166indicate how frequently, in seconds, the host will advertise the fact that it
167considers itself the master of the virtual host.
168The formula is
169.Cm advbase
170+
171.Pf ( Cm advskew
172/ 256).
173If the master does not advertise within three times this interval, this host
174will begin advertising as master.
175.It Cm alias
176Establish an additional network address for this interface.
177This is sometimes useful when changing network numbers, and
178one wishes to accept packets addressed to the old interface.
179.It Fl alias
180Remove the specified network address alias.
181.It Cm arp
182Enable the use of the Address Resolution Protocol in mapping
183between network level addresses and link level addresses
184.Pq default .
185This is currently implemented for mapping between
186.Tn DARPA
187Internet
188addresses and Ethernet addresses.
189.It Fl arp
190Disable the use of the Address Resolution Protocol.
191.It Cm anycast
192.Pq inet6 only
193Set the IPv6 anycast address bit.
194.It Fl anycast
195.Pq inet6 only
196Clear the IPv6 anycast address bit.
197.It Cm broadcast Ar mask
198.Pq Inet only
199Specify the address to use to represent broadcasts to the
200network.
201The default broadcast address is the address with a host part of all 1's.
202.It Cm carpdev Ar iface
203If the driver is a
204.Xr carp 4
205pseudo-device, attach it to
206.Ar iface .
207If not specified, the kernel will attempt to select an interface with
208a subnet matching that of the carp interface.
209.It Cm debug
210Enable driver dependent debugging code; usually, this turns on
211extra console error logging.
212.It Fl debug
213Disable driver dependent debugging code.
214.It Cm delete
215Remove the network address specified.
216This would be used if you incorrectly specified an alias, or it
217was no longer needed.
218If you have incorrectly set an NS address having the side effect
219of specifying the host portion, removing all NS addresses will
220allow you to respecify the host portion.
221.Cm delete
222does not work for IPv6 addresses.
223Use
224.Fl alias
225with explicit IPv6 address instead.
226.It Ar dest_address
227Specify the address of the correspondent on the other end
228of a point to point link.
229.It Cm down
230Mark an interface ``down''.
231When an interface is
232marked ``down'', the system will not attempt to
233transmit messages through that interface.
234If possible, the interface will be reset to disable reception as well.
235This action does not automatically disable routes using the interface.
236.It Cm ipdst
237This is used to specify an Internet host who is willing to receive
238ip packets encapsulating NS packets bound for a remote network.
239An apparent point to point link is constructed, and
240the address specified will be taken as the NS address and network
241of the destination.
242IP encapsulation of
243.Tn CLNP
244packets is done differently.
245.It Cm media Ar type
246Set the media type of the interface to
247.Ar type .
248Some interfaces support the mutually exclusive use of one of several
249different physical media connectors.
250For example, a 10Mb/s Ethernet
251interface might support the use of either
252.Tn AUI
253or twisted pair connectors.
254Setting the media type to
255.Dq 10base5
256or
257.Dq AUI
258would change the currently active connector to the AUI port.
259Setting it to
260.Dq 10baseT
261or
262.Dq UTP
263would activate twisted pair.
264Refer to the interfaces' driver
265specific man page for a complete list of the available types
266and the
267.Xr ifmedia 4
268manual page for a list of media types.
269See the
270.Fl m
271flag below.
272.It Cm mediaopt Ar opts
273Set the specified media options on the interface.
274.Ar opts
275is a comma delimited list of options to apply to the interface.
276Refer to the interfaces' driver specific man page for a complete
277list of available options.
278Also see the
279.Xr ifmedia 4
280manual page for a list of media options.
281.It Fl mediaopt Ar opts
282Disable the specified media options on the interface.
283.It Cm mode Ar mode
284If the driver supports the media selection system, set the specified
285operating mode on the interface to
286.Ar mode .
287For IEEE 802.11 wireless interfaces that support multiple operating modes
288this directive is used to select between 802.11a
289.Pq Dq 11a ,
290802.11b
291.Pq Dq 11b ,
292and 802.11g
293.Pq Dq 11g
294operating modes.
295.It Cm instance Ar minst
296Set the media instance to
297.Ar minst .
298This is useful for devices which have multiple physical layer interfaces
299.Pq PHYs .
300Setting the instance on such devices may not be strictly required
301by the network interface driver as the driver may take care of this
302automatically; see the driver's manual page for more information.
303.It Cm metric Ar n
304Set the routing metric of the interface to
305.Ar n ,
306default 0.
307The routing metric is used by the routing protocol
308.Pq Xr routed 8 .
309Higher metrics have the effect of making a route
310less favorable; metrics are counted as addition hops
311to the destination network or host.
312.It Cm mtu Ar n
313Set the maximum transmission unit of the interface to
314.Ar n .
315Most interfaces don't support this option.
316.It Cm netmask Ar mask
317.Pq inet, inet6, and ISO
318Specify how much of the address to reserve for subdividing
319networks into sub-networks.
320The mask includes the network part of the local address
321and the subnet part, which is taken from the host field of the address.
322The mask can be specified as a single hexadecimal number
323with a leading 0x, with a dot-notation Internet address,
324or with a pseudo-network name listed in the network table
325.Xr networks 5 .
326The mask contains 1's for the bit positions in the 32-bit address
327which are to be used for the network and subnet parts,
328and 0's for the host part.
329The mask should contain at least the standard network portion,
330and the subnet field should be contiguous with the network
331portion.
332.Pp
333For INET and INET6 addresses, the netmask can also be given with
334slash-notation after the address
335.Pq e.g 192.168.17.3/24 .
336.\" see
337.\" Xr eon 5 .
338.It Cm nsellength Ar n
339.Pf ( Tn ISO
340only)
341This specifies a trailing number of bytes for a received
342.Tn NSAP
343used for local identification, the remaining leading part of which is
344taken to be the
345.Tn NET
346.Pq Network Entity Title .
347The default value is 1, which is conformant to US
348.Tn GOSIP .
349When an ISO address is set in an ifconfig command,
350it is really the
351.Tn NSAP
352which is being specified.
353For example, in
354.Tn US GOSIP ,
35520 hex digits should be
356specified in the
357.Tn ISO NSAP
358to be assigned to the interface.
359There is some evidence that a number different from 1 may be useful
360for
361.Tn AFI
36237 type addresses.
363.It Cm state Ar state
364Explicitly force the
365.Xr carp 4
366pseudo-device to enter this state.
367Valid states are
368.Ar init ,
369.Ar backup ,
370and
371.Ar master .
372.It Cm frag Ar threshold
373.Pq IEEE 802.11 devices only
374Configure the fragmentation threshold for IEEE 802.11-based wireless
375network interfaces.
376.It Cm rts Ar threshold
377.Pq IEEE 802.11 devices only
378Configure the RTS/CTS threshold for IEEE 802.11-based wireless
379network interfaces.
380This controls the number of bytes used for the RTS/CTS handshake boundary.
381The
382.Ar threshold
383can be any value between 0 and 2347.
384The default is 2347, which indicates the RTS/CTS mechanism should not be used.
385.It Cm ssid Ar id
386.Pq IEEE 802.11 devices only
387Configure the Service Set Identifier (a.k.a. the network name)
388for IEEE 802.11-based wireless network interfaces.
389The
390.Ar id
391can either be any text string up to 32 characters in length,
392or a series of up to 64 hexadecimal digits preceded by
393.Dq 0x .
394Setting
395.Ar id
396to the empty string allows the interface to connect to any available
397access point.
398.It Cm nwid Ar id
399Synonym for
400.Dq ssid .
401.It Cm hidessid
402.Pq IEEE 802.11 devices only
403When operating as an access point, do not broadcast the SSID
404in beacon frames or respond to probe request frames unless
405they are directed to the ap (i.e., they include the ap's SSID).
406By default, the SSID is included in beacon frames and
407undirected probe request frames are answered.
408.It Fl hidessid
409.Pq IEEE 802.11 devices only
410When operating as an access point, broadcast the SSID
411in beacon frames and answer and respond to undirected probe
412request frames (default).
413.It Cm nwkey Ar key
414.Pq IEEE 802.11 devices only
415Enable WEP encryption for IEEE 802.11-based wireless network interfaces
416with the
417.Ar key .
418The
419.Ar key
420can either be a string, a series of hexadecimal digits preceded by
421.Dq 0x ,
422or a set of keys in the form
423.Ar n:k1,k2,k3,k4 ,
424where
425.Ar n
426specifies which of keys will be used for all transmitted packets,
427and four keys,
428.Ar k1
429through
430.Ar k4 ,
431are configured as WEP keys.
432Note that the order must be match within same network if multiple keys
433are used.
434For IEEE 802.11 wireless network, the length of each key is restricted to
43540 bits, i.e. 5-character string or 10 hexadecimal digits,
436while the WaveLAN/IEEE Gold cards accept the 104 bits
437.Pq 13 characters
438key.
439.It Cm nwkey Cm persist
440.Pq IEEE 802.11 devices only
441Enable WEP encryption for IEEE 802.11-based wireless network interfaces
442with the persistent key written in the network card.
443.It Cm nwkey Cm persist: Ns Ar key
444.Pq IEEE 802.11 devices only
445Write the
446.Ar key
447to the persistent memory of the network card, and
448enable WEP encryption for IEEE 802.11-based wireless network interfaces
449with the
450.Ar key .
451.It Fl nwkey
452.Pq IEEE 802.11 devices only
453Disable WEP encryption for IEEE 802.11-based wireless network interfaces.
454.It Cm apbridge
455.Pq IEEE 802.11 devices only
456When operating as an access point, pass packets between
457wireless clients directly (default).
458.It Fl apbridge
459.Pq IEEE 802.11 devices only
460When operating as an access point, pass packets through
461the system so that they can be forwared using some other mechanism.
462Disabling the internal bridging is useful when traffic
463is to be processed with packet filtering.
464.It Cm pass Ar passphrase
465If the driver is a
466.Xr carp 4
467pseudo-device, set the authentication key to
468.Ar passphrase .
469There is no passphrase by default
470.It Cm powersave
471.Pq IEEE 802.11 devices only
472Enable 802.11 power saving mode.
473.It Fl powersave
474.Pq IEEE 802.11 devices only
475Disable 802.11 power saving mode.
476.It Cm powersavesleep Ar duration
477.Pq IEEE 802.11 devices only
478Set the receiver sleep duration in milliseconds for 802.11 power saving mode.
479.It Cm bssid Ar bssid
480.Pq IEEE 802.11 devices only
481Set the desired BSSID for IEEE 802.11-based wireless network interfaces.
482.It Fl bssid
483.Pq IEEE 802.11 devices only
484Unset the desired BSSID for IEEE 802.11-based wireless network interfaces.
485The interface will automatically select a BSSID in this mode, which is
486the default.
487.It Cm chan Ar chan
488.Pq IEEE 802.11 devices only
489Select the channel
490.Pq radio frequency
491to be used for IEEE 802.11-based wireless network interfaces.
492.It Fl chan
493.Pq IEEE 802.11 devices only
494Unset the desired channel to be used
495for IEEE 802.11-based wireless network interfaces.
496It doesn't affect the channel to be created for IBSS or hostap mode.
497.It Cm list scan
498.Pq IEEE 802.11 devices only
499Display the access points and/or ad-hoc neighbors
500located in the vicinity.
501The
502.Fl v
503flag may be used to display long SSIDs.
504.Fl v
505also causes received information elements to be displayed symbolicaly.
506Only the super-user can use this command.
507.It Cm tunnel Ar src_addr Ns Op Ar ,src_port
508.Ar dest_addr Ns Op Ar ,dest_port
509.Pq IP tunnel devices only
510Configure the physical source and destination address for IP tunnel
511interfaces, including
512.Xr gif 4 .
513The arguments
514.Ar src_addr
515and
516.Ar dest_addr
517are interpreted as the outer source/destination for the encapsulating
518IPv4/IPv6 header.
519.Pp
520On a
521.Xr gre 4
522interface in UDP mode, the arguments
523.Ar src_port
524and
525.Ar dest_port
526are interpreted as the outer source/destination port for the encapsulating
527UDP header.
528.It Cm deletetunnel
529Unconfigure the physical source and destination address for IP tunnel
530interfaces previously configured with
531.Cm tunnel .
532.It Cm create
533Create the specified network pseudo-device.
534.It Cm destroy
535Destroy the specified network pseudo-device.
536.It Cm pltime Ar n
537.Pq inet6 only
538Set preferred lifetime for the address.
539.It Cm prefixlen Ar n
540.Pq inet and inet6 only
541Effect is similar to
542.Cm netmask .
543but you can specify by prefix length by digits.
544.It Cm deprecated
545.Pq inet6 only
546Set the IPv6 deprecated address bit.
547.It Fl deprecated
548.Pq inet6 only
549Clear the IPv6 deprecated address bit.
550.It Cm tentative
551.Pq inet6 only
552Set the IPv6 tentative address bit.
553.It Fl tentative
554.Pq inet6 only
555Clear the IPv6 tentative address bit.
556.It Cm eui64
557.Pq inet6 only
558Fill interface index
559.Pq lowermost 64bit of an IPv6 address
560automatically.
561.It Cm link[0-2]
562Enable special processing of the link level of the interface.
563These three options are interface specific in actual effect, however,
564they are in general used to select special modes of operation.
565An example
566of this is to enable SLIP compression, or to select the connector type
567for some Ethernet cards.
568Refer to the man page for the specific driver
569for more information.
570.It Fl link[0-2]
571Disable special processing at the link level with the specified interface.
572.It Cm linkstr
573Set a link-level string parameter for the interface.
574This functionality varies from interface to interface.
575Refer to the man page for the specific driver
576for more information.
577.It Fl linkstr
578Remove an interface link-level string parameter.
579.It Cm up
580Mark an interface ``up''.
581This may be used to enable an interface after an ``ifconfig down.''
582It happens automatically when setting the first address on an interface.
583If the interface was reset when previously marked down,
584the hardware will be re-initialized.
585.It Cm vhid Ar n
586If the driver is a
587.Xr carp 4
588pseudo-device, set the virtual host ID to
589.Ar n .
590Acceptable values are 1 to 255.
591.It Cm vlan Ar vid
592If the interface is a
593.Xr vlan 4
594pseudo-interface, set the VLAN identifier to
595.Ar vid .
596These are the first 12 bits (0-4095) from a 16-bit integer used
597to create an 802.1Q VLAN header for packets sent from the
598.Xr vlan 4
599interface.
600Note that
601.Cm vlan
602and
603.Cm vlanif
604must be set at the same time.
605.It Cm vlanif Ar iface
606If the interface is a
607.Xr vlan 4
608pseudo-interface, associate the physical interface
609.Ar iface
610with it.
611Packets transmitted through the
612.Xr vlan 4
613interface will be diverted to the specified physical interface
614.Ar iface
615with 802.1Q VLAN encapsulation.
616Packets with 802.1Q encapsulation received
617by the physical interface with the correct VLAN tag will be diverted to the
618associated
619.Xr vlan 4
620pseudo-interface.
621The VLAN interface is assigned a copy of the physical
622interface's flags and
623.Tn Ethernet
624address.
625If the
626.Xr vlan 4
627interface already has a physical interface associated with it, this command
628will fail.
629To change the association to another physical interface, the
630existing association must be cleared first.
631Note that
632.Cm vlanif
633and
634.Cm vlan
635must be set at the same time.
636.It Cm agrport Ar iface
637Add
638.Ar iface
639to the
640.Xr agr 4
641interface.
642.It Cm -agrport Ar iface
643Remove
644.Ar iface
645from the
646.Xr agr 4
647interface.
648.It Cm vltime Ar n
649.Pq inet6 only
650Set valid lifetime for the address.
651.It Cm ip4csum
652Shorthand of
653.Dq ip4csum-tx ip4csum-rx
654.It Cm -ip4csum
655Shorthand of
656.Dq -ip4csum-tx -ip4csum-rx
657.It Cm tcp4csum
658Shorthand of
659.Dq tcp4csum-tx tcp4csum-rx
660.It Cm -tcp4csum
661Shorthand of
662.Dq -tcp4csum-tx -tcp4csum-rx
663.It Cm udp4csum
664Shorthand of
665.Dq udp4csum-tx udp4csum-rx
666.It Cm -udp4csum
667Shorthand of
668.Dq -udp4csum-tx -udp4csum-rx
669.It Cm tcp6csum
670Shorthand of
671.Dq tcp6csum-tx tcp6csum-rx
672.It Cm -tcp6csum
673Shorthand of
674.Dq -tcp6csum-tx -tcp6csum-rx
675.It Cm udp6csum
676Shorthand of
677.Dq udp6csum-tx udp6csum-rx
678.It Cm -udp6csum
679Shorthand of
680.Dq -udp6csum-tx -udp6csum-rx
681.It Cm ip4csum-tx
682Enable hardware-assisted IPv4 header checksums for the out-bound direction.
683.It Cm -ip4csum-tx
684Disable hardware-assisted IPv4 header checksums for the out-bound direction.
685.It Cm ip4csum-rx
686Enable hardware-assisted IPv4 header checksums for the in-bound direction.
687.It Cm -ip4csum-rx
688Disable hardware-assisted IPv4 header checksums for the in-bound direction.
689.It Cm tcp4csum-tx
690Enable hardware-assisted TCP/IPv4 checksums for the out-bound direction.
691.It Cm -tcp4csum-tx
692Disable hardware-assisted TCP/IPv4 checksums for the out-bound direction.
693.It Cm tcp4csum-rx
694Enable hardware-assisted TCP/IPv4 checksums for the in-bound direction.
695.It Cm -tcp4csum-rx
696Disable hardware-assisted TCP/IPv4 checksums for the in-bound direction.
697.It Cm udp4csum-tx
698Enable hardware-assisted UDP/IPv4 checksums for the out-bound direction.
699.It Cm -udp4csum-tx
700Disable hardware-assisted UDP/IPv4 checksums for the out-bound direction.
701.It Cm udp4csum-rx
702Enable hardware-assisted UDP/IPv4 checksums for the in-bound direction.
703.It Cm -udp4csum-rx
704Disable hardware-assisted UDP/IPv4 checksums for the in-bound direction.
705.It Cm tcp6csum-tx
706Enable hardware-assisted TCP/IPv6 checksums for the out-bound direction.
707.It Cm -tcp6csum-tx
708Disable hardware-assisted TCP/IPv6 checksums for the out-bound direction.
709.It Cm tcp6csum-rx
710Enable hardware-assisted TCP/IPv6 checksums for the in-bound direction.
711.It Cm -tcp6csum-rx
712Disable hardware-assisted TCP/IPv6 checksums for the in-bound direction.
713.It Cm udp6csum-tx
714Enable hardware-assisted UDP/IPv6 checksums for the out-bound direction.
715.It Cm -udp6csum-tx
716Disable hardware-assisted UDP/IPv6 checksums for the out-bound direction.
717.It Cm udp6csum-rx
718Enable hardware-assisted UDP/IPv6 checksums for the in-bound direction.
719.It Cm -udp6csum-rx
720Disable hardware-assisted UDP/IPv6 checksums for the in-bound direction.
721.It Cm tso4
722Enable hardware-assisted TCP/IPv4 segmentation on interfaces that
723support it.
724.It Cm -tso4
725Disable hardware-assisted TCP/IPv4 segmentation on interfaces that
726support it.
727.It Cm tso6
728Enable hardware-assisted TCP/IPv6 segmentation on interfaces that
729support it.
730.It Cm -tso6
731Disable hardware-assisted TCP/IPv6 segmentation on interfaces that
732support it.
733.It Cm maxupd Ar n
734If the driver is a
735.Xr pfsync 4
736pseudo-device, indicate the maximum number
737of updates for a single state which can be collapsed into one.
738This is an 8-bit number; the default value is 128.
739.It Cm syncdev Ar iface
740If the driver is a
741.Xr pfsync 4
742pseudo-device, use the specified interface
743to send and receive pfsync state synchronisation messages.
744.It Fl syncdev
745If the driver is a
746.Xr pfsync 4
747pseudo-device, stop sending pfsync state
748synchronisation messages over the network.
749.It Cm syncpeer Ar peer_address
750If the driver is a
751.Xr pfsync 4
752pseudo-device, make the pfsync link point-to-point rather than using
753multicast to broadcast the state synchronisation messages.
754The peer_address is the IP address of the other host taking part in
755the pfsync cluster.
756With this option,
757.Xr pfsync 4
758traffic can be protected using
759.Xr ipsec 4 .
760.It Fl syncpeer
761If the driver is a
762.Xr pfsync 4
763pseudo-device, broadcast the packets using multicast.
764.El
765.Pp
766.Nm
767displays the current configuration for a network interface
768when no optional parameters are supplied.
769If a protocol family is specified,
770.Nm
771will report only the details specific to that protocol
772family.
773.Pp
774If the
775.Fl s
776flag is passed before an interface name,
777.Nm
778will attempt to query the interface for its media status.
779If the
780interface supports reporting media status, and it reports that it does
781not appear to be connected to a network,
782.Nm
783will exit with status of 1
784.Pq false ;
785otherwise, it will exit with a
786zero
787.Pq true
788exit status.
789Not all interface drivers support media
790status reporting.
791.Pp
792If the
793.Fl m
794flag is passed before an interface name,
795.Nm
796will display all of the supported media for the specified interface.
797If the
798.Fl L
799flag is supplied, address lifetime is displayed for IPv6 addresses,
800as time offset string.
801.Pp
802Optionally, the
803.Fl a
804flag may be used instead of an interface name.
805This flag instructs
806.Nm
807to display information about all interfaces in the system.
808.Fl d
809limits this to interfaces that are down,
810.Fl u
811limits this to interfaces that are up,
812.Fl b
813limits this to broadcast interfaces, and
814.Fl s
815omits interfaces which appear not to be connected to a network.
816.Pp
817The
818.Fl l
819flag may be used to list all available interfaces on the system, with
820no other additional information.
821Use of this flag is mutually exclusive
822with all other flags and commands, except for
823.Fl d
824.Pq only list interfaces that are down ,
825.Fl u
826.Pq only list interfaces that are up ,
827.Fl s
828.Pq only list interfaces that may be connected ,
829.Fl b
830.Pq only list broadcast interfaces .
831.Pp
832The
833.Fl C
834flag may be used to list all of the interface cloners available on
835the system, with no additional information.
836Use of this flag is
837mutually exclusive with all other flags and commands.
838.Pp
839The
840.Fl v
841flag prints statistics on packets sent and received on the given
842interface.
843If
844.Fl h
845is used in conjunction with
846.Fl v ,
847the byte statistics will be printed in "human-readable" format.
848The
849.Fl z
850flag is identical to the
851.Fl v
852flag except that it zeros the interface input and output statistics
853after printing them.
854.Pp
855The
856.Fl N
857flag is just the opposite of the
858.Fl n
859flag in
860.Xr netstat 1
861or in
862.Xr route 8 :
863it tells
864.Nm
865to try to resolve numbers to hostnames or to service names.
866The default
867.Nm
868behavior is to print numbers instead of names.
869.Pp
870Only the super-user may modify the configuration of a network interface.
871.Sh EXAMPLES
872Add a link-layer (MAC) address to an Ethernet:
873.Pp
874.Ic ifconfig sip0 link 00:11:22:33:44:55
875.Pp
876Add and activate a link-layer (MAC) address:
877.Pp
878.Ic ifconfig sip0 link 00:11:22:33:44:55 active
879.Sh DIAGNOSTICS
880Messages indicating the specified interface does not exist, the
881requested address is unknown, or the user is not privileged and
882tried to alter an interface's configuration.
883.Sh SEE ALSO
884.Xr netstat 1 ,
885.Xr agr 4 ,
886.Xr carp 4 ,
887.Xr ifmedia 4 ,
888.Xr netintro 4 ,
889.Xr pfsync 4 ,
890.Xr vlan 4 ,
891.Xr ifconfig.if 5 ,
892.\" .Xr eon 5 ,
893.Xr rc 8 ,
894.Xr routed 8
895.Sh HISTORY
896The
897.Nm
898command appeared in
899.Bx 4.2 .
900