| 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 | .\" 3. All advertising materials mentioning features or use of this software |
| 13 | .\" must display the following acknowledgment: |
| 14 | .\" This product includes software developed by the University of |
| 15 | .\" California, Berkeley and its contributors. |
| 16 | .\" 4. Neither the name of the University nor the names of its contributors |
| 17 | .\" may be used to endorse or promote products derived from this software |
| 18 | .\" without specific prior written permission. |
| 19 | .\" |
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. |
| 31 | .\" |
| 32 | .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 |
| 33 | .\" $FreeBSD: src/sbin/ifconfig/ifconfig.8,v 1.27.2.22 2003/01/26 03:33:56 keramida Exp $ |
| 34 | .\" |
| 35 | .Dd July 2, 2001 |
| 36 | .Dt IFCONFIG 8 |
| 37 | .Os |
| 38 | .Sh NAME |
| 39 | .Nm ifconfig |
| 40 | .Nd configure network interface parameters |
| 41 | .Sh SYNOPSIS |
| 42 | .Nm |
| 43 | .Op Fl L |
| 44 | .Op Fl m |
| 45 | .Ar interface |
| 46 | .Op Cm create |
| 47 | .Op Ar address_family |
| 48 | .Oo |
| 49 | .Ar address |
| 50 | .Op Ar dest_address |
| 51 | .Oc |
| 52 | .Op Ar parameters |
| 53 | .Nm |
| 54 | .Ar interface |
| 55 | .Cm destroy |
| 56 | .Nm |
| 57 | .Fl a |
| 58 | .Op Fl L |
| 59 | .Op Fl d |
| 60 | .Op Fl m |
| 61 | .Op Fl u |
| 62 | .Op Ar address_family |
| 63 | .Nm |
| 64 | .Fl l |
| 65 | .Op Fl d |
| 66 | .Op Fl u |
| 67 | .Op Ar address_family |
| 68 | .Nm |
| 69 | .Op Fl L |
| 70 | .Op Fl d |
| 71 | .Op Fl m |
| 72 | .Op Fl u |
| 73 | .Op Fl C |
| 74 | .Sh DESCRIPTION |
| 75 | The |
| 76 | .Nm |
| 77 | utility is used to assign an address |
| 78 | to a network interface and/or configure |
| 79 | network interface parameters. |
| 80 | The |
| 81 | .Nm |
| 82 | utility must be used at boot time to define the network address |
| 83 | of each interface present on a machine; it may also be used at |
| 84 | a later time to redefine an interface's address |
| 85 | or other operating parameters. |
| 86 | .Pp |
| 87 | The following options are available: |
| 88 | .Bl -tag -width indent |
| 89 | .It Ar address |
| 90 | For the |
| 91 | .Tn DARPA Ns -Internet |
| 92 | family, |
| 93 | the address is either a host name present in the host name data |
| 94 | base, |
| 95 | .Xr hosts 5 , |
| 96 | or a |
| 97 | .Tn DARPA |
| 98 | Internet address expressed in the Internet standard |
| 99 | .Dq dot notation . |
| 100 | .Pp |
| 101 | It is also possible to use the CIDR notation (also known as the |
| 102 | slash notation) to include the netmask. |
| 103 | That is, one can specify an address like |
| 104 | .Li 192.168.0.1/16 . |
| 105 | .Pp |
| 106 | For |
| 107 | .Dq inet6 |
| 108 | family, it is also possible to specify the prefix length using the slash |
| 109 | notation, like |
| 110 | .Li ::1/128 . |
| 111 | See the |
| 112 | .Cm prefixlen |
| 113 | parameter below for more information. |
| 114 | .\" For the Xerox Network Systems(tm) family, |
| 115 | .\" addresses are |
| 116 | .\" .Ar net:a.b.c.d.e.f , |
| 117 | .\" where |
| 118 | .\" .Ar net |
| 119 | .\" is the assigned network number (in decimal), |
| 120 | .\" and each of the six bytes of the host number, |
| 121 | .\" .Ar a |
| 122 | .\" through |
| 123 | .\" .Ar f , |
| 124 | .\" are specified in hexadecimal. |
| 125 | .\" The host number may be omitted on IEEE 802 protocol |
| 126 | .\" (Ethernet, FDDI, and Token Ring) interfaces, |
| 127 | .\" which use the hardware physical address, |
| 128 | .\" and on interfaces other than the first. |
| 129 | .\" For the |
| 130 | .\" .Tn ISO |
| 131 | .\" family, addresses are specified as a long hexadecimal string, |
| 132 | .\" as in the Xerox family. |
| 133 | .\" However, two consecutive dots imply a zero |
| 134 | .\" byte, and the dots are optional, if the user wishes to (carefully) |
| 135 | .\" count out long strings of digits in network byte order. |
| 136 | .Pp |
| 137 | The link-level |
| 138 | .Pq Dq link |
| 139 | address |
| 140 | is specified as a series of colon-separated hex digits. |
| 141 | This can be used to |
| 142 | e.g. set a new MAC address on an ethernet interface, though the |
| 143 | mechanism used is not ethernet-specific. |
| 144 | If the interface is already |
| 145 | up when this option is used, it will be briefly brought down and |
| 146 | then brought back up again in order to ensure that the receive |
| 147 | filter in the underlying ethernet hardware is properly reprogrammed. |
| 148 | .It Ar address_family |
| 149 | Specify the |
| 150 | address family |
| 151 | which affects interpretation of the remaining parameters. |
| 152 | Since an interface can receive transmissions in differing protocols |
| 153 | with different naming schemes, specifying the address family is recommended. |
| 154 | The address or protocol families currently |
| 155 | supported are |
| 156 | .Dq inet , |
| 157 | .Dq inet6 , |
| 158 | .Dq atalk , |
| 159 | .Dq ipx , |
| 160 | .\" .Dq iso , |
| 161 | and |
| 162 | .Dq link . |
| 163 | .\" and |
| 164 | .\" .Dq ns . |
| 165 | The default is |
| 166 | .Dq inet . |
| 167 | .Dq ether |
| 168 | and |
| 169 | .Dq lladdr |
| 170 | are synonyms for |
| 171 | .Dq link . |
| 172 | .It Ar dest_address |
| 173 | Specify the address of the correspondent on the other end |
| 174 | of a point to point link. |
| 175 | .It Ar interface |
| 176 | This |
| 177 | parameter is a string of the form |
| 178 | .Dq name unit , |
| 179 | for example, |
| 180 | .Dq Li ed0 . |
| 181 | .El |
| 182 | .Pp |
| 183 | The following parameters may be set with |
| 184 | .Nm : |
| 185 | .Bl -tag -width indent |
| 186 | .It Cm add |
| 187 | Another name for the |
| 188 | .Cm alias |
| 189 | parameter. |
| 190 | Introduced for compatibility |
| 191 | with |
| 192 | .Bsx . |
| 193 | .It Cm alias |
| 194 | Establish an additional network address for this interface. |
| 195 | This is sometimes useful when changing network numbers, and |
| 196 | one wishes to accept packets addressed to the old interface. |
| 197 | If the address is on the same subnet as the first network address |
| 198 | for this interface, a non-conflicting netmask must be given. |
| 199 | Usually |
| 200 | .Li 0xffffffff |
| 201 | is most appropriate. |
| 202 | .It Fl alias |
| 203 | Remove the network address specified. |
| 204 | This would be used if you incorrectly specified an alias, or it |
| 205 | was no longer needed. |
| 206 | If you have incorrectly set an NS address having the side effect |
| 207 | of specifying the host portion, removing all NS addresses will |
| 208 | allow you to respecify the host portion. |
| 209 | .It Cm anycast |
| 210 | (Inet6 only.) |
| 211 | Specify that the address configured is an anycast address. |
| 212 | Based on the current specification, |
| 213 | only routers may configure anycast addresses. |
| 214 | Anycast address will not be used as source address of any of outgoing |
| 215 | IPv6 packets. |
| 216 | .It Cm arp |
| 217 | Enable the use of the Address Resolution Protocol |
| 218 | .Pq Xr arp 4 |
| 219 | in mapping |
| 220 | between network level addresses and link level addresses (default). |
| 221 | This is currently implemented for mapping between |
| 222 | .Tn DARPA |
| 223 | Internet |
| 224 | addresses and |
| 225 | .Tn IEEE |
| 226 | 802 48-bit MAC addresses (Ethernet, FDDI, and Token Ring addresses). |
| 227 | .It Fl arp |
| 228 | Disable the use of the Address Resolution Protocol |
| 229 | .Pq Xr arp 4 . |
| 230 | .It Cm broadcast |
| 231 | (Inet only.) |
| 232 | Specify the address to use to represent broadcasts to the |
| 233 | network. |
| 234 | The default broadcast address is the address with a host part of all 1's. |
| 235 | .It Cm debug |
| 236 | Enable driver dependent debugging code; usually, this turns on |
| 237 | extra console error logging. |
| 238 | .It Fl debug |
| 239 | Disable driver dependent debugging code. |
| 240 | .It Cm promisc |
| 241 | Put interface into permanently promiscuous mode. |
| 242 | .It Fl promisc |
| 243 | Disable permanently promiscuous mode. |
| 244 | .It Cm delete |
| 245 | Another name for the |
| 246 | .Fl alias |
| 247 | parameter. |
| 248 | .It Cm down |
| 249 | Mark an interface |
| 250 | .Dq down . |
| 251 | When an interface is marked |
| 252 | .Dq down , |
| 253 | the system will not attempt to |
| 254 | transmit messages through that interface. |
| 255 | If possible, the interface will be reset to disable reception as well. |
| 256 | This action does not automatically disable routes using the interface. |
| 257 | .It Cm eui64 |
| 258 | (Inet6 only.) |
| 259 | Fill interface index |
| 260 | (lowermost 64bit of an IPv6 address) |
| 261 | automatically. |
| 262 | .\" .It Cm ipdst |
| 263 | .\" This is used to specify an Internet host who is willing to receive |
| 264 | .\" ip packets encapsulating NS packets bound for a remote network. |
| 265 | .\" An apparent point to point link is constructed, and |
| 266 | .\" the address specified will be taken as the NS address and network |
| 267 | .\" of the destination. |
| 268 | .\" IP encapsulation of |
| 269 | .\" .Tn CLNP |
| 270 | .\" packets is done differently. |
| 271 | .It Cm media Ar type |
| 272 | If the driver supports the media selection system, set the media type |
| 273 | of the interface to |
| 274 | .Ar type . |
| 275 | Some interfaces support the mutually exclusive use of one of several |
| 276 | different physical media connectors. |
| 277 | For example, a 10Mb/s Ethernet |
| 278 | interface might support the use of either |
| 279 | .Tn AUI |
| 280 | or twisted pair connectors. |
| 281 | Setting the media type to |
| 282 | .Dq 10base5/AUI |
| 283 | would change the currently active connector to the AUI port. |
| 284 | Setting it to |
| 285 | .Dq 10baseT/UTP |
| 286 | would activate twisted pair. |
| 287 | Refer to the interfaces' driver |
| 288 | specific documentation or man page for a complete list of the |
| 289 | available types. |
| 290 | .It Cm mediaopt Ar opts |
| 291 | If the driver supports the media selection system, set the specified |
| 292 | media options on the interface. |
| 293 | The |
| 294 | .Ar opts |
| 295 | argument |
| 296 | is a comma delimited list of options to apply to the interface. |
| 297 | Refer to the interfaces' driver specific man page for a complete |
| 298 | list of available options. |
| 299 | .It Fl mediaopt Ar opts |
| 300 | If the driver supports the media selection system, disable the |
| 301 | specified media options on the interface. |
| 302 | .It Cm tunnel Ar src_addr dest_addr |
| 303 | (IP tunnel devices only.) |
| 304 | Configure the physical source and destination address for IP tunnel |
| 305 | interfaces |
| 306 | .Pq Xr gif 4 . |
| 307 | The arguments |
| 308 | .Ar src_addr |
| 309 | and |
| 310 | .Ar dest_addr |
| 311 | are interpreted as the outer source/destination for the encapsulating |
| 312 | IPv4/IPv6 header. |
| 313 | .It Cm deletetunnel |
| 314 | Unconfigure the physical source and destination address for IP tunnel |
| 315 | interfaces previously configured with |
| 316 | .Cm tunnel . |
| 317 | .It Cm create |
| 318 | Create the specified network pseudo-device. |
| 319 | If the interface is given without a unit number, try to create a new |
| 320 | device with an arbitrary unit number. |
| 321 | If creation of an arbitrary device is successful, the new device name is |
| 322 | printed to standard output. |
| 323 | .It Cm destroy |
| 324 | Destroy the specified network pseudo-device. |
| 325 | .It Cm plumb |
| 326 | Another name for the |
| 327 | .Cm create |
| 328 | parameter. |
| 329 | Included for |
| 330 | .Tn Solaris |
| 331 | compatibility. |
| 332 | .It Cm unplumb |
| 333 | Another name for the |
| 334 | .Cm destroy |
| 335 | parameter. |
| 336 | Included for |
| 337 | .Tn Solaris |
| 338 | compatibility. |
| 339 | .It Cm vlan Ar vlan_tag |
| 340 | If the interface is a vlan pseudo interface, set the vlan tag value |
| 341 | to |
| 342 | .Ar vlan_tag . |
| 343 | This value is a 16-bit number which is used to create an 802.1Q |
| 344 | vlan header for packets sent from the vlan interface. |
| 345 | Note that |
| 346 | .Cm vlan |
| 347 | and |
| 348 | .Cm vlandev |
| 349 | must both be set at the same time. |
| 350 | .It Cm vlandev Ar iface |
| 351 | If the interface is a vlan pseudo device, associate physical interface |
| 352 | .Ar iface |
| 353 | with it. |
| 354 | Packets transmitted through the vlan interface will be |
| 355 | diverted to the specified physical interface |
| 356 | .Ar iface |
| 357 | with 802.1Q vlan encapsulation. |
| 358 | Packets with 802.1Q encapsulation received |
| 359 | by the parent interface with the correct vlan tag will be diverted to |
| 360 | the associated vlan pseudo-interface. |
| 361 | The vlan interface is assigned a |
| 362 | copy of the parent interface's flags and the parent's ethernet address. |
| 363 | The |
| 364 | .Cm vlandev |
| 365 | and |
| 366 | .Cm vlan |
| 367 | must both be set at the same time. |
| 368 | If the vlan interface already has |
| 369 | a physical interface associated with it, this command will fail. |
| 370 | To |
| 371 | change the association to another physical interface, the existing |
| 372 | association must be cleared first. |
| 373 | .Pp |
| 374 | Note: if the |
| 375 | .Cm link0 |
| 376 | flag is set on the vlan interface, the vlan pseudo |
| 377 | interface's behavior changes: the |
| 378 | .Cm link0 |
| 379 | tells the vlan interface that the |
| 380 | parent interface supports insertion and extraction of vlan tags on its |
| 381 | own (usually in firmware) and that it should pass packets to and from |
| 382 | the parent unaltered. |
| 383 | .It Fl vlandev Ar iface |
| 384 | If the driver is a vlan pseudo device, disassociate the physical interface |
| 385 | .Ar iface |
| 386 | from it. |
| 387 | This breaks the link between the vlan interface and its parent, |
| 388 | clears its vlan tag, flags and its link address and shuts the interface down. |
| 389 | .It Cm metric Ar n |
| 390 | Set the routing metric of the interface to |
| 391 | .Ar n , |
| 392 | default 0. |
| 393 | The routing metric is used by the routing protocol |
| 394 | .Pq Xr routed 8 . |
| 395 | Higher metrics have the effect of making a route |
| 396 | less favorable; metrics are counted as addition hops |
| 397 | to the destination network or host. |
| 398 | .It Cm mtu Ar n |
| 399 | Set the maximum transmission unit of the interface to |
| 400 | .Ar n , |
| 401 | default is interface specific. |
| 402 | The MTU is used to limit the size of packets that are transmitted on an |
| 403 | interface. |
| 404 | Not all interfaces support setting the MTU, and some interfaces have |
| 405 | range restrictions. |
| 406 | .It Cm netmask Ar mask |
| 407 | .\" (Inet and ISO.) |
| 408 | (Inet only.) |
| 409 | Specify how much of the address to reserve for subdividing |
| 410 | networks into sub-networks. |
| 411 | The mask includes the network part of the local address |
| 412 | and the subnet part, which is taken from the host field of the address. |
| 413 | The mask can be specified as a single hexadecimal number |
| 414 | with a leading |
| 415 | .Ql 0x , |
| 416 | with a dot-notation Internet address, |
| 417 | or with a pseudo-network name listed in the network table |
| 418 | .Xr networks 5 . |
| 419 | The mask contains 1's for the bit positions in the 32-bit address |
| 420 | which are to be used for the network and subnet parts, |
| 421 | and 0's for the host part. |
| 422 | The mask should contain at least the standard network portion, |
| 423 | and the subnet field should be contiguous with the network |
| 424 | portion. |
| 425 | .Pp |
| 426 | The netmask can also be specified in CIDR notation after the address. |
| 427 | See the |
| 428 | .Ar address |
| 429 | option above for more information. |
| 430 | .It Cm prefixlen Ar len |
| 431 | (Inet6 only.) |
| 432 | Specify that |
| 433 | .Ar len |
| 434 | bits are reserved for subdividing networks into sub-networks. |
| 435 | The |
| 436 | .Ar len |
| 437 | must be integer, and for syntactical reason it must be between 0 to 128. |
| 438 | It is almost always 64 under the current IPv6 assignment rule. |
| 439 | If the parameter is omitted, 64 is used. |
| 440 | .Pp |
| 441 | The prefix can also be specified using the slash notation after the address. |
| 442 | See the |
| 443 | .Ar address |
| 444 | option above for more information. |
| 445 | .\" see |
| 446 | .\" Xr eon 5 . |
| 447 | .\" .It Cm nsellength Ar n |
| 448 | .\" .Pf ( Tn ISO |
| 449 | .\" only) |
| 450 | .\" This specifies a trailing number of bytes for a received |
| 451 | .\" .Tn NSAP |
| 452 | .\" used for local identification, the remaining leading part of which is |
| 453 | .\" taken to be the |
| 454 | .\" .Tn NET |
| 455 | .\" (Network Entity Title). |
| 456 | .\" The default value is 1, which is conformant to US |
| 457 | .\" .Tn GOSIP . |
| 458 | .\" When an ISO address is set in an ifconfig command, |
| 459 | .\" it is really the |
| 460 | .\" .Tn NSAP |
| 461 | .\" which is being specified. |
| 462 | .\" For example, in |
| 463 | .\" .Tn US GOSIP , |
| 464 | .\" 20 hex digits should be |
| 465 | .\" specified in the |
| 466 | .\" .Tn ISO NSAP |
| 467 | .\" to be assigned to the interface. |
| 468 | .\" There is some evidence that a number different from 1 may be useful |
| 469 | .\" for |
| 470 | .\" .Tn AFI |
| 471 | .\" 37 type addresses. |
| 472 | .It Cm range Ar netrange |
| 473 | Under appletalk, set the interface to respond to a |
| 474 | .Ar netrange |
| 475 | of the form |
| 476 | .Ar startnet Ns - Ns Ar endnet . |
| 477 | Appletalk uses this scheme instead of |
| 478 | netmasks though |
| 479 | .Fx |
| 480 | implements it internally as a set of netmasks. |
| 481 | .It Cm remove |
| 482 | Another name for the |
| 483 | .Fl alias |
| 484 | parameter. |
| 485 | Introduced for compatibility |
| 486 | with |
| 487 | .Bsx . |
| 488 | .It Cm phase |
| 489 | The argument following this specifies the version (phase) of the |
| 490 | Appletalk network attached to the interface. |
| 491 | Values of 1 or 2 are permitted. |
| 492 | .Sm off |
| 493 | .It Cm link Op Cm 0 No - Cm 2 |
| 494 | .Sm on |
| 495 | Enable special processing of the link level of the interface. |
| 496 | These three options are interface specific in actual effect, however, |
| 497 | they are in general used to select special modes of operation. |
| 498 | An example |
| 499 | of this is to enable SLIP compression, or to select the connector type |
| 500 | for some Ethernet cards. |
| 501 | Refer to the man page for the specific driver |
| 502 | for more information. |
| 503 | .Sm off |
| 504 | .It Fl link Op Cm 0 No - Cm 2 |
| 505 | .Sm on |
| 506 | Disable special processing at the link level with the specified interface. |
| 507 | .It Cm up |
| 508 | Mark an interface |
| 509 | .Dq up . |
| 510 | This may be used to enable an interface after an |
| 511 | .Dq Nm Cm down . |
| 512 | It happens automatically when setting the first address on an interface. |
| 513 | If the interface was reset when previously marked down, |
| 514 | the hardware will be re-initialized. |
| 515 | .It Cm ssid Ar ssid |
| 516 | For IEEE 802.11 wireless interfaces, set the desired Service Set |
| 517 | Identifier (aka network name). |
| 518 | The SSID is a string up to 32 characters |
| 519 | in length and may be specified as either a normal string or in |
| 520 | hexadecimal when proceeded by |
| 521 | .Ql 0x . |
| 522 | Additionally, the SSID may be cleared by setting it to |
| 523 | .Ql - . |
| 524 | .It Cm nwid Ar ssid |
| 525 | Another name for the |
| 526 | .Cm ssid |
| 527 | parameter. |
| 528 | Included for |
| 529 | .Nx |
| 530 | compatibility. |
| 531 | .It Cm stationname Ar name |
| 532 | For IEEE 802.11 wireless interfaces, set the name of this station. |
| 533 | It appears that the station name is not really part of the IEEE 802.11 |
| 534 | protocol though all interfaces seem to support it. |
| 535 | As such it only |
| 536 | seems to be meaningful to identical or virtually identical equipment. |
| 537 | Setting the station name is identical in syntax to setting the SSID. |
| 538 | .It Cm station Ar name |
| 539 | Another name for the |
| 540 | .Cm stationname |
| 541 | parameter. |
| 542 | Included for |
| 543 | .Bsx |
| 544 | compatibility. |
| 545 | .It Cm channel Ar number |
| 546 | For IEEE 802.11 wireless interfaces, set the desired channel. |
| 547 | Channels range from 1 to 14, but the exact selection available |
| 548 | depends on the region your adaptor was manufactured for. |
| 549 | Setting |
| 550 | the channel to 0 will give you the default for your adaptor. |
| 551 | Many |
| 552 | adaptors ignore this setting unless you are in ad-hoc mode. |
| 553 | .It Cm authmode Ar mode |
| 554 | For IEEE 802.11 wireless interfaces, set the desired authentication mode |
| 555 | in infrastructure mode. |
| 556 | Not all adaptors support all modes. |
| 557 | The set of |
| 558 | valid modes is |
| 559 | .Dq none , |
| 560 | .Dq open , |
| 561 | and |
| 562 | .Dq shared . |
| 563 | Modes are case insensitive. |
| 564 | .It Cm powersave |
| 565 | For IEEE 802.11 wireless interfaces, enable powersave mode. |
| 566 | .It Fl powersave |
| 567 | For IEEE 802.11 wireless interfaces, disable powersave mode. |
| 568 | .It Cm powersavesleep Ar sleep |
| 569 | For IEEE 802.11 wireless interfaces, set the desired max powersave sleep |
| 570 | time in milliseconds. |
| 571 | .It Cm wepmode Ar mode |
| 572 | For IEEE 802.11 wireless interfaces, set the desired WEP mode. |
| 573 | Not all adaptors support all modes. |
| 574 | The set of valid modes is |
| 575 | .Dq off , |
| 576 | .Dq on , |
| 577 | and |
| 578 | .Dq mixed . |
| 579 | .Dq Mixed |
| 580 | mode explicitly tells the adaptor to allow association with access |
| 581 | points which allow both encrypted and unencrypted traffic. |
| 582 | On these adaptors, |
| 583 | .Dq on |
| 584 | means that the access point must only allow encrypted connections. |
| 585 | On other adaptors, |
| 586 | .Dq on |
| 587 | is generally another name for |
| 588 | .Dq mixed . |
| 589 | Modes are case insensitive. |
| 590 | .It Cm weptxkey Ar index |
| 591 | For IEEE 802.11 wireless interfaces, set the WEP key to be used for |
| 592 | transmission. |
| 593 | .It Cm wepkey Ar key Ns | Ns Ar index : Ns Ar key |
| 594 | For IEEE 802.11 wireless interfaces, set the selected WEP key. |
| 595 | If an |
| 596 | .Ar index |
| 597 | is not given, key 1 is set. |
| 598 | A WEP key will be either 5 or 13 |
| 599 | characters (40 or 104 bits) depending of the local network and the |
| 600 | capabilities of the adaptor. |
| 601 | It may be specified either as a plain |
| 602 | string or as a string of hexadecimal digits proceeded by |
| 603 | .Ql 0x . |
| 604 | For maximum portability, hex keys are recommended; |
| 605 | the mapping of text keys to WEP encryption is usually driver-specific. |
| 606 | In particular, the |
| 607 | .Tn Windows |
| 608 | drivers do this mapping differently to |
| 609 | .Fx . |
| 610 | A key may be cleared by setting it to |
| 611 | .Ql - . |
| 612 | If WEP is supported then there are at least four keys. |
| 613 | Some adaptors support more than four keys. |
| 614 | If that is the case, then the first four keys |
| 615 | (1-4) will be the standard temporary keys and any others will be adaptor |
| 616 | specific keys such as permanent keys stored in NVRAM. |
| 617 | .It Cm wep |
| 618 | Another way of saying |
| 619 | .Cm wepmode on . |
| 620 | Included for |
| 621 | .Bsx |
| 622 | compatibility. |
| 623 | .It Fl wep |
| 624 | Another way of saying |
| 625 | .Cm wepmode off . |
| 626 | Included for |
| 627 | .Bsx |
| 628 | compatibility. |
| 629 | .It Cm nwkey key |
| 630 | Another way of saying: |
| 631 | .Pp |
| 632 | .Dq Li "wepmode on weptxkey 1 wepkey 1:key wepkey 2:- wepkey 3:- wepkey 4:-" . |
| 633 | .Pp |
| 634 | Included for |
| 635 | .Nx |
| 636 | compatibility. |
| 637 | .It Cm nwkey Xo |
| 638 | .Sm off |
| 639 | .Ar n : k1 , k2 , k3 , k4 |
| 640 | .Sm on |
| 641 | .Xc |
| 642 | Another way of saying |
| 643 | .Pp |
| 644 | .Dq Li "wepmode on weptxkey n wepkey 1:k1 wepkey 2:k2 wepkey 3:k3 wepkey 4:k4" . |
| 645 | .Pp |
| 646 | Included for |
| 647 | .Nx |
| 648 | compatibility. |
| 649 | .It Fl nwkey |
| 650 | Another way of saying |
| 651 | .Cm wepmode off . |
| 652 | .Pp |
| 653 | Included for |
| 654 | .Nx |
| 655 | compatibility. |
| 656 | .El |
| 657 | .Pp |
| 658 | The |
| 659 | .Nm |
| 660 | utility displays the current configuration for a network interface |
| 661 | when no optional parameters are supplied. |
| 662 | If a protocol family is specified, |
| 663 | .Nm |
| 664 | will report only the details specific to that protocol family. |
| 665 | .Pp |
| 666 | If the driver does supports the media selection system, the supported |
| 667 | media list will be included in the output. |
| 668 | .Pp |
| 669 | If the |
| 670 | .Fl m |
| 671 | flag is passed before an interface name, |
| 672 | .Nm |
| 673 | will display all |
| 674 | of the supported media for the specified interface. |
| 675 | If |
| 676 | .Fl L |
| 677 | flag is supplied, address lifetime is displayed for IPv6 addresses, |
| 678 | as time offset string. |
| 679 | .Pp |
| 680 | Optionally, the |
| 681 | .Fl a |
| 682 | flag may be used instead of an interface name. |
| 683 | This flag instructs |
| 684 | .Nm |
| 685 | to display information about all interfaces in the system. |
| 686 | The |
| 687 | .Fl d |
| 688 | flag limits this to interfaces that are down, and |
| 689 | .Fl u |
| 690 | limits this to interfaces that are up. |
| 691 | When no arguments are given, |
| 692 | .Fl a |
| 693 | is implied. |
| 694 | .Pp |
| 695 | The |
| 696 | .Fl l |
| 697 | flag may be used to list all available interfaces on the system, with |
| 698 | no other additional information. |
| 699 | Use of this flag is mutually exclusive |
| 700 | with all other flags and commands, except for |
| 701 | .Fl d |
| 702 | (only list interfaces that are down) |
| 703 | and |
| 704 | .Fl u |
| 705 | (only list interfaces that are up). |
| 706 | .Pp |
| 707 | The |
| 708 | .Fl C |
| 709 | flag may be used to list all of the interface cloners available on |
| 710 | the system, with no additional information. |
| 711 | Use of this flag is mutually exclusive with all other flags and commands. |
| 712 | .Pp |
| 713 | Only the super-user may modify the configuration of a network interface. |
| 714 | .Sh NOTES |
| 715 | The media selection system is relatively new and only some drivers support |
| 716 | it (or have need for it). |
| 717 | .Sh DIAGNOSTICS |
| 718 | Messages indicating the specified interface does not exist, the |
| 719 | requested address is unknown, or the user is not privileged and |
| 720 | tried to alter an interface's configuration. |
| 721 | .Sh BUGS |
| 722 | IPv6 link-local addresses are required for several basic communication |
| 723 | between IPv6 node. |
| 724 | If they are deleted by |
| 725 | .Nm |
| 726 | manually, the kernel might show very strange behavior. |
| 727 | So, such manual deletions are strongly discouraged. |
| 728 | .Sh SEE ALSO |
| 729 | .Xr netstat 1 , |
| 730 | .Xr netintro 4 , |
| 731 | .\" .Xr eon 5 , |
| 732 | .Xr rc 8 , |
| 733 | .Xr routed 8 |
| 734 | .Sh HISTORY |
| 735 | The |
| 736 | .Nm |
| 737 | utility appeared in |
| 738 | .Bx 4.2 . |