xref: /freebsd/sbin/ifconfig/ifconfig.8 (revision 6af83ee0d2941d18880b6aaa2b4facd1d30c6106)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 4. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
29.\" $FreeBSD$
30.\"
31.Dd November 2, 2004
32.Dt IFCONFIG 8
33.Os
34.Sh NAME
35.Nm ifconfig
36.Nd configure network interface parameters
37.Sh SYNOPSIS
38.Nm
39.Op Fl L
40.Op Fl m
41.Ar interface
42.Op Cm create
43.Op Ar address_family
44.Oo
45.Ar address
46.Op Ar dest_address
47.Oc
48.Op Ar parameters
49.Nm
50.Ar interface
51.Cm destroy
52.Nm
53.Fl a
54.Op Fl L
55.Op Fl d
56.Op Fl m
57.Op Fl u
58.Op Fl v
59.Op Ar address_family
60.Nm
61.Fl l
62.Op Fl d
63.Op Fl u
64.Op Ar address_family
65.Nm
66.Op Fl L
67.Op Fl d
68.Op Fl m
69.Op Fl u
70.Op Fl v
71.Op Fl C
72.Sh DESCRIPTION
73The
74.Nm
75utility is used to assign an address
76to a network interface and/or configure
77network interface parameters.
78The
79.Nm
80utility must be used at boot time to define the network address
81of each interface present on a machine; it may also be used at
82a later time to redefine an interface's address
83or other operating parameters.
84.Pp
85The following options are available:
86.Bl -tag -width indent
87.It Ar address
88For the
89.Tn DARPA Ns -Internet
90family,
91the address is either a host name present in the host name data
92base,
93.Xr hosts 5 ,
94or a
95.Tn DARPA
96Internet address expressed in the Internet standard
97.Dq dot notation .
98.Pp
99It is also possible to use the CIDR notation (also known as the
100slash notation) to include the netmask.
101That is, one can specify an address like
102.Li 192.168.0.1/16 .
103.Pp
104For
105.Dq inet6
106family, it is also possible to specify the prefix length using the slash
107notation, like
108.Li ::1/128 .
109See the
110.Cm prefixlen
111parameter below for more information.
112.\" For the Xerox Network Systems(tm) family,
113.\" addresses are
114.\" .Ar net:a.b.c.d.e.f ,
115.\" where
116.\" .Ar net
117.\" is the assigned network number (in decimal),
118.\" and each of the six bytes of the host number,
119.\" .Ar a
120.\" through
121.\" .Ar f ,
122.\" are specified in hexadecimal.
123.\" The host number may be omitted on IEEE 802 protocol
124.\" (Ethernet, FDDI, and Token Ring) interfaces,
125.\" which use the hardware physical address,
126.\" and on interfaces other than the first.
127.\" For the
128.\" .Tn ISO
129.\" family, addresses are specified as a long hexadecimal string,
130.\" as in the Xerox family.
131.\" However, two consecutive dots imply a zero
132.\" byte, and the dots are optional, if the user wishes to (carefully)
133.\" count out long strings of digits in network byte order.
134.Pp
135The link-level
136.Pq Dq link
137address
138is specified as a series of colon-separated hex digits.
139This can be used to
140e.g.\& set a new MAC address on an ethernet interface, though the
141mechanism used is not ethernet-specific.
142If the interface is already
143up when this option is used, it will be briefly brought down and
144then brought back up again in order to ensure that the receive
145filter in the underlying ethernet hardware is properly reprogrammed.
146.It Ar address_family
147Specify the
148address family
149which affects interpretation of the remaining parameters.
150Since an interface can receive transmissions in differing protocols
151with different naming schemes, specifying the address family is recommended.
152The address or protocol families currently
153supported are
154.Dq inet ,
155.Dq inet6 ,
156.Dq atalk ,
157.Dq ipx ,
158.\" .Dq iso ,
159and
160.Dq link .
161.\" and
162.\" .Dq ns .
163The default is
164.Dq inet .
165.Dq ether
166and
167.Dq lladdr
168are synonyms for
169.Dq link .
170.It Ar dest_address
171Specify the address of the correspondent on the other end
172of a point to point link.
173.It Ar interface
174This
175parameter is a string of the form
176.Dq name unit ,
177for example,
178.Dq Li ed0 .
179.El
180.Pp
181The following parameters may be set with
182.Nm :
183.Bl -tag -width indent
184.It Cm add
185Another name for the
186.Cm alias
187parameter.
188Introduced for compatibility
189with
190.Bsx .
191.It Cm alias
192Establish an additional network address for this interface.
193This is sometimes useful when changing network numbers, and
194one wishes to accept packets addressed to the old interface.
195If the address is on the same subnet as the first network address
196for this interface, a non-conflicting netmask must be given.
197Usually
198.Li 0xffffffff
199is most appropriate.
200.It Fl alias
201Remove the network address specified.
202This would be used if you incorrectly specified an alias, or it
203was no longer needed.
204If you have incorrectly set an NS address having the side effect
205of specifying the host portion, removing all NS addresses will
206allow you to respecify the host portion.
207.It Cm anycast
208(Inet6 only.)
209Specify that the address configured is an anycast address.
210Based on the current specification,
211only routers may configure anycast addresses.
212Anycast address will not be used as source address of any of outgoing
213IPv6 packets.
214.It Cm arp
215Enable the use of the Address Resolution Protocol
216.Pq Xr arp 4
217in mapping
218between network level addresses and link level addresses (default).
219This is currently implemented for mapping between
220.Tn DARPA
221Internet
222addresses and
223.Tn IEEE
224802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses).
225.It Fl arp
226Disable the use of the Address Resolution Protocol
227.Pq Xr arp 4 .
228.It Cm staticarp
229If the Address Resolution Protocol is enabled,
230the host will only reply to requests for its addresses,
231and will never send any requests.
232.It Fl staticarp
233If the Address Resolution Protocol is enabled,
234the host will perform normally,
235sending out requests and listening for replies.
236.It Cm broadcast
237(Inet only.)
238Specify the address to use to represent broadcasts to the
239network.
240The default broadcast address is the address with a host part of all 1's.
241.It Cm debug
242Enable driver dependent debugging code; usually, this turns on
243extra console error logging.
244.It Fl debug
245Disable driver dependent debugging code.
246.It Cm promisc
247Put interface into permanently promiscuous mode.
248.It Fl promisc
249Disable permanently promiscuous mode.
250.It Cm delete
251Another name for the
252.Fl alias
253parameter.
254.It Cm down
255Mark an interface
256.Dq down .
257When an interface is marked
258.Dq down ,
259the system will not attempt to
260transmit messages through that interface.
261If possible, the interface will be reset to disable reception as well.
262This action does not automatically disable routes using the interface.
263.It Cm eui64
264(Inet6 only.)
265Fill interface index
266(lowermost 64bit of an IPv6 address)
267automatically.
268.It Cm ipdst
269This is used to specify an Internet host who is willing to receive
270IP packets encapsulating IPX packets bound for a remote network.
271An apparent point to point link is constructed, and
272the address specified will be taken as the IPX address and network
273of the destination.
274.It Cm maclabel Ar label
275If Mandatory Access Control support is enabled in the kernel,
276set the MAC label to
277.Ar label .
278.\" (see
279.\" .Xr maclabel 7 ) .
280.It Cm media Ar type
281If the driver supports the media selection system, set the media type
282of the interface to
283.Ar type .
284Some interfaces support the mutually exclusive use of one of several
285different physical media connectors.
286For example, a 10Mb/s Ethernet
287interface might support the use of either
288.Tn AUI
289or twisted pair connectors.
290Setting the media type to
291.Dq Li 10base5/AUI
292would change the currently active connector to the AUI port.
293Setting it to
294.Dq Li 10baseT/UTP
295would activate twisted pair.
296Refer to the interfaces' driver
297specific documentation or man page for a complete list of the
298available types.
299.It Cm mediaopt Ar opts
300If the driver supports the media selection system, set the specified
301media options on the interface.
302The
303.Ar opts
304argument
305is a comma delimited list of options to apply to the interface.
306Refer to the interfaces' driver specific man page for a complete
307list of available options.
308.It Fl mediaopt Ar opts
309If the driver supports the media selection system, disable the
310specified media options on the interface.
311.It Cm mode Ar mode
312If the driver supports the media selection system, set the specified
313operating mode on the interface to
314.Ar mode .
315For IEEE 802.11 wireless interfaces that support multiple operating modes
316this directive is used to select between 802.11a
317.Pq Dq Li 11a ,
318802.11b
319.Pq Dq Li 11b ,
320and 802.11g
321.Pq Dq Li 11g
322operating modes.
323.It Cm name Ar name
324Set the interface name to
325.Ar name .
326.It Cm rxcsum , txcsum
327If the driver supports user-configurable checksum offloading,
328enable receive (or transmit) checksum offloading on the interface.
329Some drivers may not be able to enable these flags independently
330of each other, so setting one may also set the other.
331The driver will offload as much checksum work as it can reliably
332support, the exact level of offloading varies between drivers.
333.It Fl rxcsum , txcsum
334If the driver supports user-configurable checksum offloading,
335disable receive (or transmit) checksum offloading on the interface.
336These settings may not always be independent of each other.
337.It Cm polling
338If the driver has user-configurable
339.Xr polling 4
340support, select the polling mode on the interface.
341.It Fl polling
342If the driver has user-configurable
343.Xr polling 4
344support, select the interrupt mode on the interface.
345.It Cm tunnel Ar src_addr dest_addr
346(IP tunnel devices only.)
347Configure the physical source and destination address for IP tunnel
348interfaces
349.Pq Xr gif 4 .
350The arguments
351.Ar src_addr
352and
353.Ar dest_addr
354are interpreted as the outer source/destination for the encapsulating
355IPv4/IPv6 header.
356.It Cm deletetunnel
357Unconfigure the physical source and destination address for IP tunnel
358interfaces previously configured with
359.Cm tunnel .
360.It Cm create
361Create the specified network pseudo-device.
362If the interface is given without a unit number, try to create a new
363device with an arbitrary unit number.
364If creation of an arbitrary device is successful, the new device name is
365printed to standard output unless the interface is renamed or destroyed
366in the same
367.Nm
368invocation.
369.It Cm destroy
370Destroy the specified network pseudo-device.
371.It Cm plumb
372Another name for the
373.Cm create
374parameter.
375Included for
376.Tn Solaris
377compatibility.
378.It Cm unplumb
379Another name for the
380.Cm destroy
381parameter.
382Included for
383.Tn Solaris
384compatibility.
385.It Cm vlan Ar vlan_tag
386If the interface is a
387.Xr vlan 4
388pseudo interface, set the VLAN tag value
389to
390.Ar vlan_tag .
391This value is a 16-bit number which is used to create an 802.1Q
392VLAN header for packets sent from the
393.Xr vlan 4
394interface.
395Note that
396.Cm vlan
397and
398.Cm vlandev
399must both be set at the same time.
400.It Cm vlandev Ar iface
401If the interface is a
402.Xr vlan 4
403pseudo device, associate physical interface
404.Ar iface
405with it.
406Packets transmitted through the
407.Xr vlan 4
408interface will be
409diverted to the specified physical interface
410.Ar iface
411with 802.1Q VLAN encapsulation.
412Packets with 802.1Q encapsulation received
413by the parent interface with the correct VLAN tag will be diverted to
414the associated
415.Xr vlan 4
416pseudo-interface.
417The
418.Xr vlan 4
419interface is assigned a
420copy of the parent interface's flags and the parent's ethernet address.
421The
422.Cm vlandev
423and
424.Cm vlan
425must both be set at the same time.
426If the
427.Xr vlan 4
428interface already has
429a physical interface associated with it, this command will fail.
430To
431change the association to another physical interface, the existing
432association must be cleared first.
433.Pp
434Note: if the hardware tagging capability
435is set on the parent interface, the
436.Xr vlan 4
437pseudo
438interface's behavior changes:
439the
440.Xr vlan 4
441interface recognizes that the
442parent interface supports insertion and extraction of VLAN tags on its
443own (usually in firmware) and that it should pass packets to and from
444the parent unaltered.
445.It Fl vlandev Ar iface
446If the driver is a
447.Xr vlan 4
448pseudo device, disassociate the physical interface
449.Ar iface
450from it.
451This breaks the link between the
452.Xr vlan 4
453interface and its parent,
454clears its VLAN tag, flags and its link address and shuts the interface down.
455.It Cm vlanmtu , vlanhwtag
456If the driver offers user-configurable VLAN support, enable
457reception of extended frames or tag processing in hardware,
458respectively.
459Note that this must be issued on a physical interface associated with
460.Xr vlan 4 ,
461not on a
462.Xr vlan 4
463interface itself.
464.It Fl vlanmtu , vlanhwtag
465If the driver offers user-configurable VLAN support, disable
466reception of extended frames or tag processing in hardware,
467respectively.
468.It Cm metric Ar n
469Set the routing metric of the interface to
470.Ar n ,
471default 0.
472The routing metric is used by the routing protocol
473.Pq Xr routed 8 .
474Higher metrics have the effect of making a route
475less favorable; metrics are counted as addition hops
476to the destination network or host.
477.It Cm mtu Ar n
478Set the maximum transmission unit of the interface to
479.Ar n ,
480default is interface specific.
481The MTU is used to limit the size of packets that are transmitted on an
482interface.
483Not all interfaces support setting the MTU, and some interfaces have
484range restrictions.
485.It Cm netmask Ar mask
486.\" (Inet and ISO.)
487(Inet only.)
488Specify how much of the address to reserve for subdividing
489networks into sub-networks.
490The mask includes the network part of the local address
491and the subnet part, which is taken from the host field of the address.
492The mask can be specified as a single hexadecimal number
493with a leading
494.Ql 0x ,
495with a dot-notation Internet address,
496or with a pseudo-network name listed in the network table
497.Xr networks 5 .
498The mask contains 1's for the bit positions in the 32-bit address
499which are to be used for the network and subnet parts,
500and 0's for the host part.
501The mask should contain at least the standard network portion,
502and the subnet field should be contiguous with the network
503portion.
504.Pp
505The netmask can also be specified in CIDR notation after the address.
506See the
507.Ar address
508option above for more information.
509.It Cm prefixlen Ar len
510(Inet6 only.)
511Specify that
512.Ar len
513bits are reserved for subdividing networks into sub-networks.
514The
515.Ar len
516must be integer, and for syntactical reason it must be between 0 to 128.
517It is almost always 64 under the current IPv6 assignment rule.
518If the parameter is omitted, 64 is used.
519.Pp
520The prefix can also be specified using the slash notation after the address.
521See the
522.Ar address
523option above for more information.
524.\" see
525.\" Xr eon 5 .
526.\" .It Cm nsellength Ar n
527.\" .Pf ( Tn ISO
528.\" only)
529.\" This specifies a trailing number of bytes for a received
530.\" .Tn NSAP
531.\" used for local identification, the remaining leading part of which is
532.\" taken to be the
533.\" .Tn NET
534.\" (Network Entity Title).
535.\" The default value is 1, which is conformant to US
536.\" .Tn GOSIP .
537.\" When an ISO address is set in an ifconfig command,
538.\" it is really the
539.\" .Tn NSAP
540.\" which is being specified.
541.\" For example, in
542.\" .Tn US GOSIP ,
543.\" 20 hex digits should be
544.\" specified in the
545.\" .Tn ISO NSAP
546.\" to be assigned to the interface.
547.\" There is some evidence that a number different from 1 may be useful
548.\" for
549.\" .Tn AFI
550.\" 37 type addresses.
551.It Cm range Ar netrange
552Under appletalk, set the interface to respond to a
553.Ar netrange
554of the form
555.Ar startnet Ns - Ns Ar endnet .
556Appletalk uses this scheme instead of
557netmasks though
558.Fx
559implements it internally as a set of netmasks.
560.It Cm remove
561Another name for the
562.Fl alias
563parameter.
564Introduced for compatibility
565with
566.Bsx .
567.It Cm phase
568The argument following this specifies the version (phase) of the
569Appletalk network attached to the interface.
570Values of 1 or 2 are permitted.
571.Sm off
572.It Cm link Op Cm 0 No - Cm 2
573.Sm on
574Enable special processing of the link level of the interface.
575These three options are interface specific in actual effect, however,
576they are in general used to select special modes of operation.
577An example
578of this is to enable SLIP compression, or to select the connector type
579for some Ethernet cards.
580Refer to the man page for the specific driver
581for more information.
582.Sm off
583.It Fl link Op Cm 0 No - Cm 2
584.Sm on
585Disable special processing at the link level with the specified interface.
586.It Cm monitor
587Put the interface in monitor mode.
588No packets are transmitted, and received packets are discarded after
589.Xr bpf 4
590processing.
591.It Fl monitor
592Take the interface out of monitor mode.
593.It Cm up
594Mark an interface
595.Dq up .
596This may be used to enable an interface after an
597.Dq Nm Cm down .
598It happens automatically when setting the first address on an interface.
599If the interface was reset when previously marked down,
600the hardware will be re-initialized.
601.El
602.Pp
603The following parameters are specific to IEEE 802.11 wireless interfaces:
604.Bl -tag -width indent
605.It Cm apbridge
606When operating as an access point, pass packets between
607wireless clients directly (default).
608To instead let them pass up through the
609system and be forwarded using some other mechanism, use
610.Fl apbridge .
611Disabling the internal bridging
612is useful when traffic is to be processed with
613packet filtering.
614.It Cm authmode Ar mode
615Set the desired authentication mode in infrastructure mode.
616Not all adaptors support all modes.
617The set of
618valid modes is
619.Dq Li none ,
620.Dq Li open ,
621.Dq Li shared
622(shared key),
623.Dq Li 8021x
624(IEEE 802.1x),
625or
626.Dq Li wpa
627(IEEE WPA/WPA2/802.11i).
628The
629.Dq Li 8021x
630and
631.Dq Li wpa
632modes are only useful when used an authentication service
633(a supplicant for client operation or an authenticator when
634operating as an access point).
635Modes are case insensitive.
636.It Cm bssid Ar address
637Specify the MAC address of the access point to use when operating
638as a station in a BSS network.
639This overrides any automatic selection done by the system.
640To disable a previously selected access point, supply
641.Dq Li any ,
642.Dq Li none ,
643or
644.Dq Li -
645for the address.
646This option is useful when more than one access points have the same SSID.
647Another name for the
648.Cm bssid
649parameter is
650.Cm ap .
651.It Cm chanlist Ar channels
652Set the desired channels to use when scanning for access
653points, neighbors in an IBSS network, or looking for unoccupied
654channels when operating as an access point.
655The set of channels is specified as a comma-separated list with
656each element in the list representing either a single channel number or a range
657of the form
658.Dq Li a-b .
659Channel numbers must be in the range 1 to 255 and be permissible
660according to the operating characteristics of the device.
661.It Cm channel Ar number
662Set a single desired channel.
663Channels range from 1 to 255, but the exact selection available
664depends on the region your adaptor was manufactured for.
665Setting
666the channel to
667.Dq Li 0 ,
668.Dq Li any ,
669or
670.Dq Li -
671will give you the default for your adaptor.
672Many
673adaptors ignore this setting unless you are in ad-hoc mode.
674Alternatively the frequency, in megahertz, may be specified
675instead of the channel number.
676.It Cm hidessid
677When operating as an access point, do not broadcast the SSID
678in beacon frames.
679By default, the SSID is included in beacon frames.
680To re-enable the broadcast of the SSID, use
681.Fl hidessid .
682.It Cm powersave
683Enable powersave operation.
684When operating as a client, the station will conserve power by
685periodically turning off the radio and listening for
686messages from the access point telling it there are packets waiting.
687The station must then retrieve the packets.
688When operating as an access point, the station must honor power
689save operation of associated clients.
690Not all devices support power save operation, either as a client
691or as an access point.
692Use
693.Fl powersave
694to disable powersave operation.
695.It Cm powersavesleep Ar sleep
696Set the desired max powersave sleep time in milliseconds.
697.It Cm protmode Ar technique
698For interfaces operating in 802.11g, use the specified
699.Ar technique
700for protecting OFDM frames in a mixed 11b/11g network.
701The set of valid techniques is
702.Dq Li off ,
703.Dq Li cts
704(CTS to self),
705and
706.Dq Li rtscts
707(RTS/CTS).
708Technique names are case insensitive.
709.It Cm roaming Ar mode
710When operating as a station, control how the system will
711behave when communication with the current access point
712is broken.
713The
714.Ar mode
715argument may be one of
716.Dq Li device
717(leave it to the hardware device to decide),
718.Dq Li auto
719(handle either in the device or the operating system\[em]as appropriate),
720.Dq Li manual
721(do nothing until explicitly instructed).
722By default, the device is left to handle this if it is
723capable; otherwise, the operating system will automatically
724attempt to reestablish communication.
725Manual mode is mostly useful when an application wants to
726control the selection of an access point.
727.It Cm rtsthreshold Ar length
728Set the threshold for which
729transmitted frames are preceded by transmission of an
730RTS
731control frame.
732The
733.Ar length
734argument
735is the frame size in bytes and must be in the range 1 to 2312.
736Not all adaptors support setting the RTS threshold.
737.It Cm ssid Ar ssid
738Set the desired Service Set Identifier (aka network name).
739The SSID is a string up to 32 characters
740in length and may be specified as either a normal string or in
741hexadecimal when proceeded by
742.Ql 0x .
743Additionally, the SSID may be cleared by setting it to
744.Ql - .
745.It Cm scan
746Display the current set of scanned neighbors and/or trigger a new scan.
747Only the super-user can trigger a scan.
748.It Cm stationname Ar name
749Set the name of this station.
750It appears that the station name is not really part of the IEEE 802.11
751protocol though all interfaces seem to support it.
752As such it only
753seems to be meaningful to identical or virtually identical equipment.
754Setting the station name is identical in syntax to setting the SSID.
755.It Cm txpower Ar power
756Set the power used to transmit frames.
757The
758.Ar power
759argument
760is a unitless value in the range 0 to 100 that is interpreted
761by drivers to derive a device-specific value.
762Out of range values are truncated.
763Typically only a few discreet power settings are available and
764the driver will use the setting closest to the specified value.
765Not all adaptors support changing the transmit power.
766.It Cm wepmode Ar mode
767Set the desired WEP mode.
768Not all adaptors support all modes.
769The set of valid modes is
770.Dq Li off ,
771.Dq Li on ,
772and
773.Dq Li mixed .
774The
775.Dq Li mixed
776mode explicitly tells the adaptor to allow association with access
777points which allow both encrypted and unencrypted traffic.
778On these adaptors,
779.Dq Li on
780means that the access point must only allow encrypted connections.
781On other adaptors,
782.Dq Li on
783is generally another name for
784.Dq Li mixed .
785Modes are case insensitive.
786.It Cm weptxkey Ar index
787Set the WEP key to be used for transmission.
788.It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key
789Set the selected WEP key.
790If an
791.Ar index
792is not given, key 1 is set.
793A WEP key will be either 5 or 13
794characters (40 or 104 bits) depending of the local network and the
795capabilities of the adaptor.
796It may be specified either as a plain
797string or as a string of hexadecimal digits proceeded by
798.Ql 0x .
799For maximum portability, hex keys are recommended;
800the mapping of text keys to WEP encryption is usually driver-specific.
801In particular, the
802.Tn Windows
803drivers do this mapping differently to
804.Fx .
805A key may be cleared by setting it to
806.Ql - .
807If WEP is supported then there are at least four keys.
808Some adaptors support more than four keys.
809If that is the case, then the first four keys
810(1-4) will be the standard temporary keys and any others will be adaptor
811specific keys such as permanent keys stored in NVRAM.
812.It Cm wme
813Enable Wireless Media Extensions (WME) support, if available,
814for the specified interface.
815WME is a subset of the IEEE 802.11e standard to support the
816efficient communication of realtime and multimedia data.
817To disable WME support, use
818.Fl wme .
819.El
820.Pp
821The following parameters are support for compatibility with other systems:
822.Bl -tag -width indent
823.It Cm nwid Ar ssid
824Another name for the
825.Cm ssid
826parameter.
827Included for
828.Nx
829compatibility.
830.It Cm station Ar name
831Another name for the
832.Cm stationname
833parameter.
834Included for
835.Bsx
836compatibility.
837.It Cm wep
838Another way of saying
839.Cm wepmode on .
840Included for
841.Bsx
842compatibility.
843.It Fl wep
844Another way of saying
845.Cm wepmode off .
846Included for
847.Bsx
848compatibility.
849.It Cm nwkey key
850Another way of saying:
851.Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" .
852Included for
853.Nx
854compatibility.
855.It Cm nwkey Xo
856.Sm off
857.Ar n : k1 , k2 , k3 , k4
858.Sm on
859.Xc
860Another way of saying
861.Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" .
862Included for
863.Nx
864compatibility.
865.It Fl nwkey
866Another way of saying
867.Cm wepmode off .
868Included for
869.Nx
870compatibility.
871.El
872.Pp
873The
874.Nm
875utility displays the current configuration for a network interface
876when no optional parameters are supplied.
877If a protocol family is specified,
878.Nm
879will report only the details specific to that protocol family.
880.Pp
881If the
882.Fl m
883flag is passed before an interface name,
884.Nm
885will display the capability list and all
886of the supported media for the specified interface.
887If
888.Fl L
889flag is supplied, address lifetime is displayed for IPv6 addresses,
890as time offset string.
891.Pp
892Optionally, the
893.Fl a
894flag may be used instead of an interface name.
895This flag instructs
896.Nm
897to display information about all interfaces in the system.
898The
899.Fl d
900flag limits this to interfaces that are down, and
901.Fl u
902limits this to interfaces that are up.
903When no arguments are given,
904.Fl a
905is implied.
906.Pp
907The
908.Fl l
909flag may be used to list all available interfaces on the system, with
910no other additional information.
911Use of this flag is mutually exclusive
912with all other flags and commands, except for
913.Fl d
914(only list interfaces that are down)
915and
916.Fl u
917(only list interfaces that are up).
918.Pp
919The
920.Fl v
921flag may be used to get more verbose status for an interface.
922.Pp
923The
924.Fl C
925flag may be used to list all of the interface cloners available on
926the system, with no additional information.
927Use of this flag is mutually exclusive with all other flags and commands.
928.Pp
929Only the super-user may modify the configuration of a network interface.
930.Sh NOTES
931The media selection system is relatively new and only some drivers support
932it (or have need for it).
933.Sh DIAGNOSTICS
934Messages indicating the specified interface does not exist, the
935requested address is unknown, or the user is not privileged and
936tried to alter an interface's configuration.
937.Sh SEE ALSO
938.Xr netstat 1 ,
939.Xr netintro 4 ,
940.Xr vlan 4 ,
941.\" .Xr eon 5 ,
942.Xr rc 8 ,
943.Xr routed 8 ,
944.Xr sysctl 8
945.Sh HISTORY
946The
947.Nm
948utility appeared in
949.Bx 4.2 .
950.Sh BUGS
951Basic IPv6 node operation requires a link-local address on each
952interface configured for IPv6.
953Normally, such an address is automatically configured by the
954kernel on each interface added to the system; this behaviour may
955be disabled by setting the sysctl MIB variable
956.Va net.inet6.ip6.auto_linklocal
957to 0.
958.Pp
959If you delete such an address using
960.Nm ,
961the kernel may act very oddly.
962Do this at your own risk.
963