NAME
ifconfig —
    configure network interface
    parameters
SYNOPSIS
| ifconfig | [ -AaC] [-Mlladdr] [interface]
      [address_family] [address
      [dest_address]]
      [parameters] | 
DESCRIPTION
The ifconfig utility is used to assign an
    address to a network interface and/or configure network interface
    parameters. Generally speaking,
    hostname.if(5) files are used at boot-time to define the network
    address of each interface present on a machine;
    ifconfig is used at a later time to redefine an
    interface's address or other operating parameters.
ifconfig displays the current
    configuration for a network interface when no optional parameters are
    supplied. If a protocol family is specified,
    ifconfig will report only the details specific to
    that protocol family. If no parameters are provided, a summary of all
    interfaces is provided.
Only the superuser may modify the configuration of a network interface.
The following options are available:
- -A
- Causes full interface alias information for each interface to be displayed.
- -a
- Causes ifconfigto print information on all interfaces. The protocol family may be specified as well. This is the default, if no parameters are given toifconfig.
- -C
- Print the names of all network pseudo-devices that can be created
      dynamically at runtime using ifconfigcreate.
- -Mlladdr
- Scan the non-cloned interface list for the MAC address lladdr and print the name of that interface. If the MAC address is found on multiple interfaces, print nothing.
- interface
- The interface parameter is a string of the form “name unit”, for example, “en0”. If no optional parameters are supplied, this string can instead be just “name”. If an interface group of that name exists, all interfaces in the group will be shown. Otherwise all interfaces of the same type will be displayed (for example, “fxp” will display all fxp(4) interfaces).
- address_family
- Specifies the address family which affects interpretation of the remaining parameters. Since an interface can receive transmissions in differing protocols with different naming schemes, specifying the address family is recommended. The address or protocol families currently supported are “inet” and “inet6”.
- address
- An Internet version 4 or 6 address. Valid formats are dot notation (IPv4), colon-separated (IPv6), CIDR notation, or a host name present in the host name database, hosts(5).
- dest_address
- Specify the address of the correspondent on the other end of a point-to-point link.
The following parameters may be set with
    ifconfig:
- alias
- Establish an additional network address for this interface. This is sometimes useful when changing network numbers, and one wishes to accept packets addressed to the old interface.
- -alias
- A synonym for delete. Use of this option is discouraged in favour ofdelete.
- arp
- Enable the use of the Address Resolution Protocol (ARP) in mapping between network level addresses and link level addresses (default).
- -arp
- Disable the use of ARP.
- autoconf
- Set the AUTOCONF4 or AUTOCONF6 flag on
      the interface, depending on address_family.
      slaacd(8) automatically configures IPv6 addresses for interfaces
      with AUTOCONF6 set.
      dhcpleased(8) automatically configures IPv4 addresses (using DHCP
      protocol) for interfaces with AUTOCONF4 set.
    Automatically mark the interface as “up”. 
- -autoconf
- Unset the AUTOCONF4 or AUTOCONF6 flag on the interface, depending on address_family.
- broadcastaddr
- (inet only) Specify the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part of all 1's.
- create
- Create the specified network pseudo-device. A list of devices which can be
      dynamically created may be shown with the -Coption.
- debug
- Enable driver-dependent debugging code; usually, this turns on extra console error logging.
- -debug
- Disable driver-dependent debugging code.
- delete
- Remove the default inet address associated with the interface, including any netmask or destination address configured with it. An address and address family can be given to make the deletion more specific.
- descr[- iption] value
- Specify a description of the interface. This can be used to label interfaces in situations where they may otherwise be difficult to distinguish.
- -descr[- iption]
- Clear the interface description.
- destroy
- Destroy the specified network pseudo-device.
- down
- Mark an interface “down”. When an interface is marked “down”, the system will not attempt to transmit messages through that interface. If possible, the interface will be reset to disable reception as well. This action automatically disables routes using the interface.
- groupgroup-name
- Assign the interface to a group. The group-name may
      not be longer than 15 characters and must not end with a digit. Any
      interface can be in multiple groups.
    For instance, a group could be used to create a hardware independent pf(4) ruleset (i.e. not one based on the names of NICs) using existing (egress, carp, etc.) or user-defined groups. Some interfaces belong to specific groups by default: - all
- All interfaces.
- egress
- Any interfaces in the default rdomain(4) to which default routes point to.
- netboot
- Any interfaces used for network booting, e.g. via pxeboot(8).
- pppx
- All pppx(4) interfaces.
- wlan
- All IEEE 802.11 wireless interfaces, e.g. athn(4) or iwx(4).
- driver
- Every cloned interface is in the respective driver group, e.g.
          “tun0” in tun. Use-Cto list all possible driver groups.
 
- -groupgroup-name
- Remove the interface from the given group.
- hwfeatures
- Display the interface hardware features:
    
    - CSUM_IPv4
- The device supports IPv4 checksum offload.
- CSUM_TCPv4
- As above, for TCP in IPv4 datagrams.
- CSUM_UDPv4
- As above, for UDP.
- CSUM_TCPv6
- As CSUM_TCPv4, but supports IPv6 datagrams.
- CSUM_UDPv6
- As above, for UDP.
- LRO
- The device supports TCP large receive offload (LRO).
- TSOv4
- The device supports IPv4 TCP segmentation offload (TSO). TSO is used by default. Use the sysctl(8) variable net.inet.tcp.tso to disable this feature.
- TSOv6
- As above, for IPv6.
- VLAN_MTU
- The device can handle full sized frames, plus the size of the vlan(4) tag.
- VLAN_HWTAGGING
- On transmit, the device can add the vlan(4) tag.
- VLAN_HWOFFLOAD
- On transmit, the device can handle checksum or TSO offload without VLAN_HWTAGGING.
- WOL
- The device supports Wake on LAN (WoL).
- hardmtu
- The maximum MTU supported.
 
- -inet
- Remove all configured inet(4) addresses on the given interface.
- -inet6
- Disable inet6(4) on the given interface and remove all configured
      inet6(4)
      addresses, including the link-local ones. This is the default. To turn
      inet6 on, use eui64orautoconf, or assign any inet6 address.
- instanceminst
- Set the media instance to minst. This is useful for devices which have multiple physical layer interfaces (PHYs). Setting the instance on such devices may not be strictly required by the network interface driver as the driver may take care of this automatically; see the driver's manual page for more information.
- link[0-2]
- Enable special processing of the link level of the interface. These three options are interface specific in actual effect; however, they are in general used to select special modes of operation. An example of this is to select the connector type for some Ethernet cards. Refer to the man page for the specific driver for more information.
- -link[0-2]
- Disable special processing at the link level with the specified interface.
- lladdretheraddr|- random
- Change the link layer address (MAC address) of the interface. This should be specified as six colon-separated hex values, or can be chosen randomly.
- llprioprio
- Set the priority for link layer communications (arp(4), bpf(4), pppoe(4)).
- media[type]
- Set the media type of the interface to type. If no
      argument is given, display a list of all available media.
    Some interfaces support the mutually exclusive use of one of several different physical media connectors. For example, a 10Mb/s Ethernet interface might support the use of either AUI or twisted pair connectors. Setting the media type to “10base5” or “AUI” would change the currently active connector to the AUI port. Setting it to “10baseT” or “UTP” would activate twisted pair. Refer to the interface's driver-specific man page for a complete list of the available types, or use the following command for a listing of choices: $ ifconfig interface media
- mediaoptopts
- Set the specified media options on the interface.
      opts is a comma delimited list of options to apply
      to the interface. Refer to the interface's driver-specific man page for a
      complete list of available options, or use the following command for a
      listing of choices:
    
    $ ifconfig interface media
- -mediaoptopts
- Disable the specified media options on the interface.
- metricnhops
- Set the routing metric of the interface to nhops, default 0. The routing metric can be used by routing protocols. Higher metrics have the effect of making a route less favorable.
- modemode
- If the driver for the interface supports the media selection system, force the mode of the interface to the given mode. For IEEE 802.11 wireless interfaces that support multiple modes, this directive is used to select between 802.11a (“11a”), 802.11b (“11b”), 802.11g (“11g”), 802.11n (“11n”), and 802.11ac (“11ac”) modes.
- -mode
- Select the mode automatically. This is the default for IEEE 802.11 wireless interfaces.
- monitor
- Enable monitor mode on the interface, preventing the processing of incoming packets by the network stack.
- -monitor
- Disable monitor mode on the interface, allowing the processing of incoming packets by the network stack.
- mpls
- Enable Multiprotocol Label Switching (MPLS) on the interface, allowing it to send and receive MPLS traffic.
- -mpls
- Disable MPLS on the interface.
- mtuvalue
- Set the MTU for this device to the given value.
      Cloned routes inherit this value as a default. For Ethernet devices which
      support setting the MTU, a value greater than 1500 enables jumbo frames.
      The hardmtu output from
      hwfeaturesshows the maximum supported MTU.
- netmaskmask
- (inet and inet6 only) Specify how much of the address to reserve for subdividing networks into subnetworks. The mask includes the network part of the local address and the subnet part, which is taken from the host field of the address. The mask can be specified as a single hexadecimal number with a leading 0x, or with a dot-notation Internet address. The mask contains 1's for the bit positions in the 32-bit address which are to be used for the network and subnet parts, and 0's for the host part. The mask should contain at least the standard network portion, and the subnet field should be contiguous with the network portion.
- prefixlenn
- (inet and inet6 only) Effect is similar to
      netmask, but you can specify prefix length by digits.
- priorityn
- Set the interface routing priority to n. n is in the range of 0 to 15 with smaller numbers being better. The default priority of an interface is 0, except for IEEE 802.11 wireless interfaces (priority 4), umb(4) interfaces (priority 6), and carp(4) interfaces (priority 15). The default priority of newly connected routes (routes created by configuring an IP address on an interface) is calculated by adding 4 (RTP_CONNECTED) to the interface priority. The default priority of new static routes added to the kernel is calculated by adding 8 (RTP_STATIC) to the interface priority.
- rdomainrdomainid
- Attach the interface to the routing domain with the specified rdomainid. Interfaces in different routing domains are separated and cannot directly pass traffic between each other. It is therefore possible to reuse the same addresses in different routing domains. If the specified rdomain does not yet exist it will be created, including a routing table with the same id. By default all interfaces belong to routing domain 0.
- -rdomain
- Remove the interface from the routing domain and return it to routing domain 0. Any inet and inet6 addresses on the interface will also be removed.
- rtlabelroute-label
- (inet) Attach route-label to new network routes of the specified interface. Route labels can be used to implement policy routing; see route(4), route(8), and pf.conf(5).
- -rtlabel
- Clear the route label.
- sff
- Query and display Small Form Factor pluggable module information. This is
      an alias for transceiver.
- sffdump
- Query and display Small Form Factor pluggable module information, and dump the raw bytes from the pages requested from module.
- staticarp
- If ARP is enabled, the host will only reply to requests for its addresses, and will never send any requests.
- -staticarp
- If ARP is enabled, the host will perform normally, sending out requests and listening for replies.
- transceiver
- Query and display information and diagnostics from GBIC, SFP, or QSFP Small Form Factor modules installed in an interface. It is only supported by drivers implementing the necessary functionality on hardware which supports it.
- tcplro
- Enable TCP large receive offload (LRO) if it's supported by the hardware;
      see hwfeatures. LRO enabled network interfaces modify received TCP/IP packets. This will also affect traffic of upper layer interfaces, such as vlan(4), aggr(4), and carp(4). It is not possible to use LRO with interfaces attached to a bridge(4), veb(4), or tpmr(4). Changing this option will re-initialize the network interface.
- -tcplro
- Disable LRO.
- up
- Mark an interface “up”. This may be used to enable an
      interface after an ifconfig down. It happens automatically when setting the first address on an interface. If the interface was reset when previously marked down, the hardware will be re-initialized.
- wol
- Enable Wake on LAN (WoL). When enabled, reception of a WoL frame will cause the network card to power up the system from standby or suspend mode. WoL frames are sent using arp(8).
- -wol
- Disable WoL. WoL is disabled at boot by the driver, if possible.
BPE
| ifconfig | bpe-interface
      [[ -]parentparent-interface]
      [vnetidvnetid-tag] | 
The following options are available for bpe(4) interfaces:
- parentparent-interface
- Associate the BPE interface with the interface parent-interface.
- -parent
- Disassociate from the parent interface. This breaks the link between the BPE interface and its parent.
- vnetidvnetid-tag
- Set the virtual network identifier tag value to vnetid-tag. This is a 24-bit value in the range 0 to 16777215.
BRIDGE
The following options are available for a bridge(4) interface:
- addinterface
- Add interface as a member of the bridge. The interface is put into promiscuous mode so that it can receive every packet sent on the network. An interface can be a member of at most one bridge.
- addr
- Display the addresses that have been learned by the bridge.
- addspaninterface
- Add interface as a span port on the bridge.
- autoedgeinterface
- Automatically detect the spanning tree edge port status on interface. This is the default for interfaces added to the bridge.
- -autoedgeinterface
- Disable automatic spanning tree edge port detection on interface.
- autoptpinterface
- Automatically detect the point-to-point status on interface by checking the full duplex link status. This is the default for interfaces added to the bridge.
- -autoptpinterface
- Disable automatic point-to-point link detection on interface.
- blocknonipinterface
- Mark interface so that only IPv4, IPv6, ARP, and Reverse ARP packets are accepted from it or forwarded to it from other bridge member interfaces.
- -blocknonipinterface
- Allow non-IPv4, IPv6, ARP, or Reverse ARP packets through interface.
- delinterface
- Remove interface from the bridge. Promiscuous mode is turned off for the interface when it is removed from the bridge.
- deladdraddress
- Delete address from the cache.
- delspaninterface
- Delete interface from the list of span ports of the bridge.
- discoverinterface
- Mark interface so that packets are sent out of the interface if the destination port of the packet is unknown. If the bridge has no address cache entry for the destination of a packet, meaning that there is no static entry and no dynamically learned entry for the destination, the bridge will forward the packet to all member interfaces that have this flag set. This is the default for interfaces added to the bridge.
- -discoverinterface
- Mark interface so that packets are not sent out of the interface if the destination port of the packet is unknown. Turning this flag off means that the bridge will not send packets out of this interface unless the packet is a broadcast packet, multicast packet, or a packet with a destination address found on the interface's segment. This, in combination with static address cache entries, prevents potentially sensitive packets from being sent on segments that have no need to see the packet.
- down
- Stop the bridge from forwarding packets.
- edgeinterface
- Set interface as a spanning tree edge port. An edge port is a single connection to the network and cannot create bridge loops. This allows a straight transition to forwarding.
- -edgeinterface
- Disable edge port status on interface.
- flush
- Remove all dynamically learned addresses from the cache.
- flushall
- Remove all addresses from the cache including static addresses.
- flushruleinterface
- Remove all Ethernet MAC filtering rules from interface.
- fwddelaytime
- Set the time (in seconds) before an interface begins forwarding packets. Defaults to 15 seconds, minimum of 4, maximum of 30.
- hellotimetime
- Set the time (in seconds) between broadcasting spanning tree protocol
      configuration packets. Defaults to 2 seconds, minimum of 1, maximum of 2.
      This option is only supported in STP mode with rapid transitions disabled;
      see the protocommand for setting the protocol version.
- holdcnttime
- Set the transmit hold count, which is the number of spanning tree protocol packets transmitted before being rate limited. Defaults to 6, minimum of 1, maximum of 10.
- ifcostinterface num
- Set the spanning tree path cost of interface to num. Defaults to 55, minimum of 1, maximum of 200000000 in RSTP mode, and maximum of 65535 in STP mode.
- -ifcostinterface
- Automatically calculate the spanning tree priority of interface based on the current link speed, interface status, and spanning tree mode. This is the default for interfaces added to the bridge.
- ifpriorityinterface num
- Set the spanning tree priority of interface to num. Defaults to 128, minimum of 0, maximum of 240.
- learninterface
- Mark interface so that the source address of packets received from the interface are entered into the address cache. This is the default for interfaces added to the bridge.
- -learninterface
- Mark interface so that the source address of packets received from interface are not entered into the address cache.
- link0
- Setting this flag stops all IP multicast packets from being forwarded by the bridge.
- -link0
- Clear the link0flag on the bridge interface.
- link1
- Setting this flag stops all non-IP multicast packets from being forwarded by the bridge.
- -link1
- Clear the link1flag on the bridge interface.
- link2
- Setting this flag causes all packets to be passed on to ipsec(4) for processing, based on the policies established by the administrator using the ipsecctl(8) command and ipsec.conf(5). If appropriate security associations (SAs) exist, they will be used to encrypt or decrypt the packets. Otherwise, any key management daemons such as isakmpd(8) that are running on the bridge will be invoked to establish the necessary SAs. These daemons have to be configured as if they were running on the host whose traffic they are protecting (i.e. they need to have the appropriate authentication and authorization material, such as keys and certificates, to impersonate the protected host(s)).
- -link2
- Clear the link2flag on the bridge interface.
- maxaddrsize
- Set the address cache size to size. The default is 100 entries.
- maxagetime
- Set the time (in seconds) that a spanning tree protocol configuration is valid. Defaults to 20 seconds, minimum of 6, maximum of 40.
- protectedinterface ids
- Put interface in protected domains. ids is a comma delimited list of domain IDs, between 1 and 31, to put the interface in. Interfaces that are part of a protected domain cannot forward traffic to any other interface in that domain. Interfaces do not belong to any protected domain by default.
- -protectedinterface
- Remove interface from all protected domains.
- protovalue
- Force the spanning tree protocol version. The available values are rstp to operate in the default Rapid Spanning Tree (RSTP) mode or stp to force operation in Spanning Tree (STP) mode with rapid transitions disabled.
- ptpinterface
- Set interface as a point-to-point link. This is required for straight transitions to forwarding and should be enabled for a full duplex link or a trunk(4) with at least two physical links to the same network segment.
- -ptpinterface
- Disable point-to-point link status on interface. This should be disabled for a half duplex link and for an interface connected to a shared network segment, like a hub or a wireless network.
- rule- block|- pass[- in|- out]- oninterface [- srclladdr] [- dstlladdr] [- tagtagname] [- arp|- rarp[- request|- reply] [- shalladdr] [- spaipaddr] [- thalladdr] [- tpaipaddr]]
- Add a filtering rule to an interface. Rules have a similar syntax to those
      in pf.conf(5). Rules can be used to selectively
      blockorpassframes based on Ethernet MAC addresses or totagpackets for pf(4) to filter on.arp(4) packets can be matched with the arpkeyword for regular packets andrarpfor reverse arp.requestandreplylimit matches to requests or replies. The source and target host addresses can be matched with theshaandthakeywords, and the protocol addresses withspaandtpa.Rules are processed in the order in which they were added to the interface. The first rule matched takes the action (block or pass) and, if given, the tag of the rule. If no source or destination address is specified, the rule will match all frames (good for creating a catchall policy). 
- rulefilefilename
- Load a set of rules from the file filename.
- rulesinterface
- Display the active filtering rules in use on interface.
- spanprioritynum
- Set the spanning priority of this bridge to num. Defaults to 32768, minimum of 0, maximum of 61440.
- staticinterface address
- Add a static entry into the address cache pointing to interface. Static entries are never aged out of the cache or replaced, even if the address is seen on a different interface.
- stpinterface
- Enable spanning tree protocol on interface.
- -stpinterface
- Disable spanning tree protocol on interface. This is the default for interfaces added to the bridge.
- timeouttime
- Set the timeout, in seconds, for addresses in the cache to time. The default is 240 seconds. If time is set to zero, then entries will not be expired.
- up
- Start the bridge forwarding packets.
CARP
| ifconfig | carp-interface
      [ advbasen]
      [advskewn]
      [balancingmode]
      [carpnodesvhid:advskew,vhid:advskew,...]
      [carpdeviface]
      [[-]carppeerpeer_address]
      [passpassphrase]
      [statestate]
      [vhidhost-id] | 
The following options are available for a carp(4) interface:
- advbasen
- Set the base advertisement interval to n seconds. Acceptable values are 0 to 254; the default value is 1 second.
- advskewn
- Skew the advertisement interval by n. Acceptable values are 0 to 254; the default value is 0.
- balancingmode
- Set the load balancing mode to mode. Valid modes are
      ip,ip-stealth, andip-unicast.
- carpnodesvhid:advskew,vhid:advskew,...
- Create a load balancing group consisting of up to 32 nodes. Each node is specified as a vhid:advskew tuple in a comma-separated list.
- carpdeviface
- Attach to parent interface iface.
- carppeerpeer_address
- Send the carp advertisements to a specified point-to-point peer or multicast group instead of sending the messages to the default carp multicast group. The peer_address is the IP address of the other host taking part in the carp cluster. With this option, carp(4) traffic can be protected using ipsec(4) and it may be desired in networks that do not allow or have problems with IPv4 multicast traffic.
- -carppeer
- Send the advertisements to the default carp multicast group.
- passpassphrase
- Set the authentication key to passphrase. There is no passphrase by default.
- statestate
- Explicitly force the interface to enter this state. Valid states are init, backup, and master.
- vhidn
- Set the virtual host ID to n. Acceptable values are 1 to 255.
Taken together, the advbase and
    advskew indicate how frequently, in seconds, the
    host will advertise the fact that it considers itself master of the virtual
    host. The formula is advbase +
    (advskew / 256). If the master does not advertise
    within three times this interval, this host will begin advertising as
    master.
IEEE 802.11 (WIRELESS DEVICES)
| ifconfig | wireless-interface
      [[ -]bssidbssid]
      [[-]chan[n]]
      [[-]joinid]
      [[-]joinlist]
      [[-]nwflagflag]
      [[-]nwidid]
      [[-]nwkeykey]
      [[-]powersave[duration]]
      [scan]
      [[-]wpa]
      [wpaakmsakm,akm,...]
      [wpacipherscipher,cipher,...]
      [wpagroupciphercipher]
      [[-]wpakeypassphrase | hexkey]
      [wpaprotosproto,proto,...] | 
The following options are available for a wireless interface:
- bssidbssid
- Set the desired BSSID.
- -bssid
- Unset the desired BSSID. The interface will automatically select a BSSID in this mode, which is the default.
- chan[n]
- Set the channel (radio frequency) to n.
    With no channel specified, show the list of channels supported by the device. 
- -chan
- Unset the desired channel. It doesn't affect the channel to be created for IBSS or Host AP mode.
- joinid
- Add the network with ESSID id to the
      joinlist. The interface will automatically attempt to connect to networks on this list if they are found during a scan.The id can either be a printable ASCII string up to 32 characters in length, or a series of hexadecimal digits up to 64 digits preceded by “0x”. If id is the empty string ("") and none of the networks on the joinlist are found during a scan, the interface will automatically connect to any available networks, provided they do not require WEP or WPA authentication.Apart from the id, the joinlist will recordwpakey,wpaprotos, ornwkeyparameters for the network, provided they are passed in the same invocation ofifconfig. Because multiple access points may exist in a given network, themode(11a/11b/11g/11n/11ac),chan, andbssidparameters cannot be stored withjoin. However, they may be used separately to force the selection of a particular access point when the automatic access point selection turns out to be suboptimal.joinandnwidcannot be used together in the same invocation ofifconfig.
- -joinid
- Remove the network with ESSID id from the
      joinlist and disconnect the interface from the access point if it is currently connected to this network. The interface will keep scanning for access points as long as it remains marked as “up”. A new connection will be established either if a network on thejoinlist is found during the scan or if a network ID is configured withnwid.
- joinlist
- Show the list of networks stored on the joinlist.
- -joinlist
- Remove all networks from the joinlist.
- nwflagflag
- Set specified flag. The flag name can be:
    - hidenwid
- The ‘hidenwid’ flag will hide the network ID (ESSID) in beacon frames when operating in Host AP mode. It will also prevent responses to probe requests with an unspecified network ID.
- nobridge
- The ‘nobridge’ flag will disable the direct bridging of frames between associated nodes when operating in Host AP mode. Setting this flag will block and filter direct inter-station communications.
- nomimo
- The ‘nomimo’ flag will disable MIMO reception and transmission even if the driver and wireless network device support MIMO. This flag can be used to work around packet loss in 11n mode if the wireless network device has unused antenna connectors.
- stayauth
- The ‘stayauth’ flag will cause the interface to ignore deauth frames. This flag should only be used on wifi networks which are being attacked with spoofed deauth frames. It breaks interoperability with spectrum management solutions and access points that perform band-steering of clients.
 Note that the ‘ hidenwid’ and ‘nobridge’ options do not provide any security. The hidden network ID will be sent in clear text by associating stations and can be easily discovered with tools like tcpdump(8) and hostapd(8).
- -nwflagflag
- Remove specified flag.
- nwidid
- Connect to the network with NWID/ESSID id. The
      id can either be a printable ASCII string up to 32
      characters in length, or a series of hexadecimal digits up to 64 digits
      preceded by “0x”.
    Unlike join, thenwidoption only allows one network to be configured at a time. Thenwidoption may not be used together withjoinin the same invocation ofifconfigbut may be used to momentarily override the automatic selection of networks stored in thejoinlist.
- -nwid
- Clear the network ID configured with nwidand disconnect the interface from the access point if it is currently connected to this network. The interface will keep scanning for access points as long as it remains marked as “up”. A new connection will be established either if a network on thejoinlist is found during the scan or if a network ID is configured withnwid.
- nwkeykey
- Enable WEP encryption using the specified key. The
      key can either be a string, a series of hexadecimal
      digits (preceded by ‘0x’), or a set of keys of the form
      “n:k1,k2,k3,k4” where ‘n’ specifies which of
      the keys will be used for transmitted packets, and the four keys,
      “k1” through “k4”, are configured as WEP keys.
      If a set of keys is specified, a comma (‘,’) within the key
      must be escaped with a backslash. Note that if multiple keys are used,
      their order must be the same within the network.
    The length of each key must be either 40 bits for 64-bit encryption (5-character ASCII string or 10 hexadecimal digits) or 104 bits for 128-bit encryption (13-character ASCII string or 26 hexadecimal digits). 
- -nwkey
- Disable WEP encryption.
- nwkey- persist
- Enable WEP encryption using the persistent key stored in the network card.
- nwkey- persist:key
- Write key to the persistent memory of the network card, and enable WEP encryption using that key.
- powersave
- Enable 802.11 power saving mode. This option is generally only relevant to older devices where power saving is disabled by default. On modern hardware, drivers will ask the firmware to automatically enable any applicable power-saving features.
- -powersave
- Disable 802.11 power saving mode.
- scan
- Show the results of an access point scan. In Host AP mode, this will dump
      the list of known nodes without scanning. In station mode, this will list
      each access point's SSID, channel, MAC address (BSSID), received signal
      strength indicator, maximum data transfer rate, and supported feature
      flags. If an access point cannot be selected due to incompatibilities with
      the interface configuration, ifconfigindicates mismatching configuration items with an exclamation mark.Because the list of access points is continuously updated while a scan is in progress, scanmay sometimes show incomplete scan results.Some interfaces support scanning in the background while remaining associated to the current access point. The superuser may use scanto trigger a background scan while associated, which will update the scan result list and also trigger a search for a better access point to roam to.
- wpa
- Enable Wi-Fi Protected Access. WPA is a Wi-Fi Alliance protocol based on the IEEE 802.11i standard. It was designed to enhance the security of wireless networks. Notice that not all drivers support WPA. Check the driver's manual page to know if this option is supported.
- -wpa
- Disable Wi-Fi Protected Access.
- wpaakmsakm,akm,...
- Set the comma-separated list of allowed authentication and key management
      protocols.
    The supported values are “psk” and “802.1x”. psk authentication (also known as personal mode) uses a 256-bit pre-shared key. 802.1x authentication (also known as enterprise mode) is used with an external IEEE 802.1X authentication server, such as wpa_supplicant. The default value is “psk”. “psk” can only be used if a pre-shared key is configured using the wpakeyoption.
- wpacipherscipher,cipher,...
- Set the comma-separated list of allowed pairwise ciphers.
    The supported values are “tkip”, “ccmp”, and “usegroup”. usegroup specifies that no pairwise ciphers are supported and that only group keys should be used. The default value is “ccmp”. If multiple pairwise ciphers are specified, the pairwise cipher will be negotiated between the station and the access point at association time. A station will always try to use ccmp over tkip if both ciphers are allowed and supported by the access point. If the selected cipher is not supported by the hardware, software encryption will be used. Check the driver's manual page to know which ciphers are supported in hardware. 
- wpagroupciphercipher
- Set the group cipher used to encrypt broadcast and multicast traffic.
    The supported values are “wep40”, “wep104”, “tkip”, and “ccmp”. The default value is “ccmp”. The use of tkip or wep40 or wep104 as the group cipher is discouraged due to weaknesses in TKIP and WEP. The wpagroupcipheroption is available in Host AP mode only. A station will always use the group cipher of the BSS.
- wpakeypassphrase | hexkey
- Set the WPA key and enable WPA. The key can be given using either a
      passphrase or a full length hex key, starting with 0x. If a passphrase is
      used the nwidorjoinoption must first be specified, sinceifconfigwill hash the nwid along with the passphrase to create the key.
- -wpakey
- Delete the pre-shared WPA key and disable WPA.
- wpaprotosproto,proto,...
- Set the comma-separated list of allowed WPA protocol versions.
    The supported values are “wpa1” and “wpa2”. wpa1 is based on draft 3 of the IEEE 802.11i standard whereas wpa2 is based on the ratified standard. The default value is “wpa2”. If “wpa1,wpa2” is specified, a station will always use the wpa2 protocol when supported by the access point. 
INET6
| ifconfig | interface inet6[[-]anycast]
      [[-]temporary]
      [eui64]
      [pltimen]
      [[-]soii]
      [[-]tentative]
      [vltimen] | 
The following options are available for an ip6(4) interface:
- anycast
- Set the IPv6 anycast address bit.
- -anycast
- Clear the IPv6 anycast address bit.
- temporary
- Enable temporary address extensions for stateless IPv6 address
      autoconfiguration (RFC 8981) on the interface. These extensions are
      enabled by default. The purpose of these extensions is to prevent tracking
      of individual devices which connect to the IPv6 internet from different
      networks using stateless autoconfiguration. The interface identifier often
      remains constant and provides the lower 64 bits of an autoconfigured IPv6
      address, facilitating tracking of individual devices (and hence,
      potentially, users of these devices) over long periods of time (weeks to
      months to years). When these extensions are active, random interface
      identifiers are used for autoconfigured addresses.
    Autoconfigured addresses are also made temporary, which means that they will automatically be replaced regularly. Temporary addresses are deprecated after 24 hours. Once a temporary address has been deprecated, a new temporary address will be configured upon reception of a router advertisement indicating that the prefix is still valid. Deprecated addresses will not be used for new connections as long as a non-deprecated address remains available. Temporary addresses become invalid after another 24 hours, at which time they will be removed from the interface. 
- -temporary
- Disable IPv6 autoconf temporary address extensions on the interface. Currently configured addresses will not be removed until they become invalid.
- eui64
- Fill the interface index (the lowermost 64 bits of an IPv6 address) automatically.
- pltimen
- Set preferred lifetime for the address, in seconds.
- soii
- Enable persistent Semantically Opaque Interface Identifiers (SOIIs), as per RFC 7217, for SLAAC addresses on the interface. The purpose of these identifiers is to make discovery of hosts by scanning a whole prefix more difficult. SOIIs use the whole 64 bits of the host part while SLAAC addresses are formed from MAC addresses which can lower the entropy to 24 bits if the host is running in a virtualization environment or the hardware manufacturer is known. See RFC 7721 and RFC 8064 for details. SOIIs are enabled by default.
- -soii
- Disable IPv6 persistent Semantically Opaque Interface Identifiers on the interface. Currently configured addresses will not be removed until they become invalid.
- tentative
- Set the IPv6 tentative address bit.
- -tentative
- Clear the IPv6 tentative address bit.
- vltimen
- Set valid lifetime for the address, in seconds.
INTERFACE GROUPS
ifconfig -g
    group-name
    [[-]carpdemote
    [number]]
The following options are available for interface groups:
- -ggroup-name
- Specify the group.
- carpdemote[number]
- Increase carp(4) demotion counter for given interface group by number. Acceptable values are 0 to 128. If number is omitted, it is increased by 1. The maximum value for a demotion counter is 255.
- -carpdemote[number]
- Decrease carp(4) demotion counter for given interface group by number. Acceptable values are 0 to 128. If number is omitted, it is decreased by 1.
MPLS
| ifconfig | mpls-interface
      [[ -]mplslabelmpls-label]
      [[-]pwecw]
      [[-]pwefat]
      [[-]pweneighbormpls-label neighbor]
      [[-]tunneldomainrdomain] | 
The following options are available for mpe(4), mpip(4), and mpw(4) interfaces:
- mplslabelmpls-label
- Set the local MPLS label to mpls-label. MPLS packets sent to this label on the local system will be decapsulated for input. An MPLS label is a 20-bit number. Labels 0 to 15 inclusive are reserved labels and cannot be used.
- -mplslabel
- Unset the local MPLS label.
- tunneldomainrdomain
- Use the routing domain rdomain for MPLS transit. The MPLS encapsulated traffic does not need to terminate in the same routing domain as the interface itself.
- -tunneldomain
- Use the default routing domain 0 for MPLS transit.
The following options are available for the mpip(4) and mpw(4) interfaces that provide MPLS Pseudowire Emulation Edge-to-Edge (PWE3) functionality:
- pwecw
- Enable the use of the PWE3 Control Word.
- -- pwecw
- Disable the use of the PWE3 Control Word.
- pwefat
- Enable the use of the Flow-Aware Transport (FAT) flow label.
- -- pwefat
- Disable the use of the Flow-Aware Transport (FAT) flow label.
- pweneighbormpls-label neighbor
- Use mpls-label and neighbor as the remote MPLS label and neighbor respectively. Remote MPLS labels have the same restrictions on values as local MPLS labels.
- -- pweneighbor
- Unset the remote MPLS label and neighbor.
PAIR
| ifconfig | pair-interface
      [[ -]patchinterface] | 
The following options are available for a pair(4) interface:
- patchinterface
- Connect the interface with a second pair(4) interface. Any outgoing packets from the first pair-interface will be received by the second interface, and vice versa. This makes it possible to interconnect two routing domains locally.
- -patch
- If configured, disconnect the interface pair.
PFLOW
| ifconfig | pflow-interface
      [[ -]flowdstaddr:port]
      [[-]flowsrcaddr[:port]]
      [pflowproton] | 
The following options are available for a pflow(4) interface:
- flowdstaddr:port
- Set the receiver address and the port for pflow(4) packets. Both must be defined to export pflow data. addr is the IP address and port is the port number of the flow collector. Pflow data will be sent to this address/port.
- -flowdst
- Unset the receiver address and stop sending pflow data.
- flowsrcaddr[:port]
- Set the source IP address for pflow packets. addr is the IP address used as sender of the UDP packets and may be used to identify the source of the data on the pflow collector.
- -flowsrc
- Unset the source address.
- pflowproton
- Set the protocol version. The default is version 5.
PFSYNC
| ifconfig | pfsync-interface
      [[ -]defer]
      [maxupdn]
      [[-]syncdeviface]
      [[-]syncpeerpeer_address] | 
The following options are available for a pfsync(4) interface:
- defer
- Defer transmission of the first packet in a state until a peer has acknowledged that the associated state has been inserted. See pfsync(4) for more information.
- -defer
- Do not defer the first packet in a state. This is the default.
- maxupdn
- Indicate the maximum number of updates for a single state which can be collapsed into one. This is an 8-bit number; the default value is 128.
- syncdeviface
- Use the specified interface to send and receive pfsync state synchronisation messages.
- -syncdev
- Stop sending pfsync state synchronisation messages over the network.
- syncpeerpeer_address
- Make the pfsync link point-to-point rather than using multicast to broadcast the state synchronisation messages. The peer_address is the IP address of the other host taking part in the pfsync cluster. With this option, pfsync(4) traffic can be protected using ipsec(4).
- -syncpeer
- Broadcast the packets using multicast.
PPPOE
| ifconfig | pppoe-interface
      [ authkeykey]
      [authnamename]
      [authprotoproto]
      [[-]peerflagflag]
      [peerkeykey]
      [peernamename]
      [peerprotoproto]
      [[-]pppoeacaccess-concentrator]
      [pppoedevparent-interface]
      [[-]pppoesvcservice] | 
pppoe(4) uses the sppp(4) "generic" SPPP framework. Any options not described in the section immediately following are described in the SPPP section, below.
The following options are available for a pppoe(4) interface:
- pppoeacaccess-concentrator
- Set the name of the access-concentrator.
- -pppoeac
- Clear a previously set access-concentrator name.
- pppoedevparent-interface
- Set the name of the interface through which packets will be transmitted and received.
- pppoesvcservice
- Set the service name of the interface.
- -pppoesvc
- Clear a previously set service name.
SPPP (PPP LINK CONTROL PROTOCOL)
| ifconfig | sppp-interface
      [ authkeykey]
      [authnamename]
      [authprotoproto]
      [[-]peerflagflag]
      [peerkeykey]
      [peernamename]
      [peerprotoproto] | 
The following options are available for an sppp(4) or pppoe(4) interface:
- authkeykey
- Set the client key or password for the PPP authentication protocol.
- authnamename
- Set the client name for the PPP authentication protocol.
- authprotoproto
- Set the PPP authentication protocol on the specified interface acting as a
      client. The protocol name can be either
      ‘chap’, ‘pap’, or ‘none’. In the latter case, authentication will be turned off.
- peerflagflag
- Set a specified PPP flag for the remote authenticator. The flag name can
      be either ‘callin’ or ‘norechallenge’. The ‘callin’ flag will require the remote peer to authenticate only when he's calling in, but not when the peer is called by the local client. This is required for some peers that do not implement the authentication protocols symmetrically. The ‘norechallenge’ flag is only meaningful with the CHAP protocol to not re-challenge once the initial CHAP handshake has been successful. This is used to work around broken peer implementations that can't grok being re-challenged once the connection is up.
- -peerflagflag
- Remove a specified PPP flag for the remote authenticator.
- peerkeykey
- Set the authenticator key or password for the PPP authentication protocol.
- peernamename
- Set the authenticator name for the PPP authentication protocol.
- peerprotoproto
- Set the PPP authentication protocol on the specified interface acting as
      an authenticator. The protocol name can be either
      ‘chap’, ‘pap’, or ‘none’. In the latter case, authentication will be turned off.
TPMR
| ifconfig | tpmr-interface
      [ addchild-iface]
      [delchild-iface]
      [[-]link0]
      [[-]link1]
      [[-]link2] | 
The following options are available for a tpmr(4) interface:
- addchild-iface
- Add child-iface as a member.
- delchild-iface
- Remove the member child-iface.
- link0
- Disable the filtering of Ethernet frames destined for the TPMR component reserved addresses, as specified by IEEE 802.1Q.
- -link0
- Enable the filtering of Ethernet frames destined for the TPMR component reserved addresses, as specified by IEEE 802.1Q. This is the default.
- link1
- Disable the filtering of IPv4 and IPv6 packets with pf(4).
- -link1
- Enable the filtering of IPv4 and IPv6 packets with pf(4). This is the default.
- link2
- Disable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
- -link2
- Enable the filtering of 802.1Q VLAN and QinQ SVLAN packets. This is the default.
TRUNK (LINK AGGREGATION)
| ifconfig | trunk-interface
      [ lacpmodeactive|passive]
      [lacptimeoutfast|slow]
      [[-]trunkportchild-iface]
      [trunkprotoproto] | 
The following options are available for aggr(4) and trunk(4) interfaces:
- lacpmode- active|- passive
- Set the LACP trunk mode to either active(default) orpassive.
- lacptimeout- fast|- slow
- Set the LACP timeout speed to either fastorslow(default).
- trunkportchild-iface
- Add child-iface as a trunk port.
- -trunkportchild-iface
- Remove the trunk port child-iface.
- trunkprotoproto
- Set the link aggregation protocol on trunk(4) interfaces. Refer to trunk(4) for a complete list of the available protocols.
TUNNEL
| ifconfig | tunnel-interface
      [[ -]endpointdest_address dest_mac]
      [[-]keepaliveperiod count]
      [[-]parentparent-interface]
      [rxprioprio]
      [[-]tunnelsrc_address dest_address]
      [tunneladdrsrc_address]
      [[-]tunneldf]
      [[-]tunneldomainrtable]
      [tunnelttlttl]
      [txprioprio]
      [[-]vnetflowid]
      [[-]vnetidnetwork-id] | 
egre(4), eoip(4), etherip(4), gif(4), gre(4), mgre(4), nvgre(4), and vxlan(4) are all tunnel interfaces. The following options are available:
- endpointdest_address dest_mac
- When vxlan(4) is in endpoint mode, set the tunnel endpoint dest_address where dest_mac MAC address can be reached.
- -endpointdest_mac
- When vxlan(4) is in endpoint mode, remove the tunnel endpoint for dest_mac MAC address.
- keepaliveperiod count
- Enable gre(4) and eoip(4) keepalive with a packet sent every period seconds. A second timer is run with a timeout of count * period. If no keepalive response is received during that time, the link is considered down. The minimal usable count is 2 since the round-trip time of keepalive packets needs to be accounted for.
- -keepalive
- Disable the gre(4) keepalive mechanism.
- parentparent-interface
- Associate the nvgre(4) interface with the interface parent-interface.
- -parent
- Disassociate from the parent interface. This breaks the link between the nvgre(4) interface and its parent.
- rxprioprio
- Configure the source used for the packet priority when decapsulating a packet. The value can be a priority number from 0 to 7, or packet to use the priority currently set on the packet. If supported by the interface, the value may also be set to outer to have the priority field copied from the tunnel protocol headers, or payload to have the priority field copied from the encapsulated protocol headers.
- tunnelsrc_address dest_address[:dest_port]
- Set the source and destination tunnel addresses on a tunnel interface.
      Packets routed to this interface will be encapsulated in IPv4 or IPv6,
      depending on the source and destination address families. Both addresses
      must be of the same family. The optional destination port can be specified
      for interfaces such as vxlan(4), which further encapsulate the packets in UDP
      datagrams. This directive is incompatible with
      tunneladdr.
- -tunnel
- Remove the source and destination tunnel addresses.
- tunneladdrsrc_address
- Set the outer IP address of the tunnel. This is useful for
      point-to-multipoint tunnels where peers are in different subnets like
      vxlan(4)
      endpoint mode or mgre(4). It is incompatible with the tunneldirective.
- tunneldf
- Do not allow fragmentation of encapsulated packets.
- -tunneldf
- Allow fragmentation of encapsulated packets.
- tunneldomainrtable
- Use routing table rtable instead of the default table. The tunnel does not need to terminate in the same routing domain as the interface itself. rtable can be set to any valid routing table ID; the corresponding routing domain is derived from this table.
- -tunneldomain
- Use the default routing table and routing domain 0.
- tunnelttlttl
- Set the IP or multicast TTL of the tunnel packets. If supported by the tunnel protocol, the value can also be set to copy to have the TTL copied between the encapsulated protocol headers and the tunnel protocol headers.
- txprioprio
- Configure the value used for the priority field in the tunnel protocol headers. The value can be a priority number from 0 to 7, or packet to use the priority currently set on the packet. If supported by the interface, the value can also be set to payload to have the priority field copied from the encapsulated protocol headers to the tunnel protocol headers.
- vnetflowid
- Use a portion of the virtual network identifier space for a flow identifier. This allows load balancing of the encapsulated traffic over multiple links.
- -vnetflowid
- Disable the use of a flow identifier in the virtual network identifier.
- vnetidnetwork-id
- Set the virtual network identifier. This is a number which is used by tunnel protocols such as eoip(4) and vxlan(4) to identify packets with a virtual network. The accepted size of the number depends on the individual tunnel protocol; it is a 16-bit number for eoip(4), and a 24-bit number for vxlan(4). If supported by the tunnel protocol, the value can also be set to any to accept packets with arbitrary network identifiers (for example for multipoint-to-multipoint modes).
- -vnetid
- Clear the virtual network identifier.
UMB
| ifconfig | umb-interface
      [[ -]apnapn]
      [chgpinoldpin newpin]
      [[-]classclass,class,...]
      [pinpin]
      [pukpuk newpin]
      [[-]roaming] | 
The following options are available for a umb(4) interface:
- apnapn
- Set the Access Point Name (APN) required by the network provider.
- -apn
- Clear the current APN.
- chgpinoldpin newpin
- Permanently change the PIN of the SIM card from the current value oldpin to newpin.
- class
- List all available cell classes.
- classclass,class,...
- Set the preferred cell classes. Apart from those listed by
      classthe following aliases can be used: 4G, 3G, and 2G.
- -class
- Clear any cell class preferences.
- down
- Marking the interface as "down" will terminate any existing data connection and deregister with the service provider.
- pinpin
- Enter the PIN required to unlock the SIM card. Most SIM cards will not be able to establish a network association without providing a PIN.
- pukpuk newpin
- Sets the PIN of the SIM card to newpin using the PUK puk to validate the request.
- roaming
- Enable data roaming.
- -roaming
- Disable data roaming.
- up
- As soon as the interface is marked as "up", the umb(4) device will try to establish a data connection with the service provider.
VEB
| ifconfig | veb-interface
      [ addchild-iface]
      [addspanchild-iface]
      [delchild-iface]
      [deladdraddress]
      [delspanchild-iface]
      [[-]discoverchild-iface]
      [flushruleinterface]
      [[-]learnchild-iface]
      [[-]lockedchild-iface]
      [[-]link0]
      [[-]link1]
      [maxaddrsize]
      [[-]protectedchild-iface ids]
      [rulefiltering-rule]
      [rulefilefilename]
      [rulesinterface]
      [staticinterface address]
      [timeouttime]
      [up] | 
The following options are available for a veb(4) interface:
- addchild-iface
- Add child-iface as a member.
- addspanchild-iface
- Add child-iface as a span port on the bridge.
- delchild-iface
- Remove the member child-iface.
- deladdraddress
- Delete address from the cache.
- delspanchild-iface
- Delete child-iface from the list of span ports of the bridge.
- discoverchild-iface
- Mark child-iface so that packets are sent out of the interface if the destination port of the packet is unknown. If the bridge has no address cache entry for the destination of a packet, meaning that there is no static entry and no dynamically learned entry for the destination, the bridge will forward the packet to all member interfaces that have this flag set. This is the default for interfaces added to the bridge.
- -discoverchild-iface
- Mark child-iface so that packets are not sent out of the interface if the destination port of the packet is unknown. Turning this flag off means that the bridge will not send packets out of this interface unless the packet is a broadcast packet, multicast packet, or a packet with a destination address found on the interface's segment. This, in combination with static address cache entries, prevents potentially sensitive packets from being sent on segments that have no need to see the packet.
- flushruleinterface
- Remove all Ethernet MAC filtering rules from interface.
- learnchild-iface
- Mark child-iface so that the source address of packets received from the interface are entered into the address cache. This is the default for interfaces added to the bridge.
- -learnchild-iface
- Mark child-iface so that the source address of packets received from interface are not entered into the address cache.
- lockedchild-iface
- Mark child-iface so that the source address of
      packets received from the interface must have an entry in the address
      cache that refers to this interface. This option is mutually exclusive
      with the learnanddiscoveroptions on the same interface.
- -lockedchild-iface
- Mark child-iface so that the source address of packets received from the interface does not need an existing entry in the address cache that refers to this interface. This is the default for interfaces added to the bridge.
- link0
- Disable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
- -link0
- Enable the filtering of 802.1Q VLAN and QinQ SVLAN packets. This is the default.
- link1
- Enable the filtering of IPv4 and IPv6 packets with pf(4).
- -link1
- Disable the filtering of IPv4 and IPv6 packets with pf(4). This is the default.
- protectedchild-iface ids
- Put child-iface in protected domains. ids is a comma delimited list of domain IDs, between 1 and 31, to put the interface in. Interfaces that are part of a protected domain cannot forward traffic to any other interface in that domain. Interfaces do not belong to any protected domain by default.
- -protectedchild-iface
- Remove child-iface from all protected domains.
- maxaddrsize
- Set the address cache size to size. The default is 100 entries.
- rule- block|- pass[- in|- out]- oninterface [- srclladdr] [- dstlladdr] [- tagtagname] [- arp|- rarp[- request|- reply] [- shalladdr] [- spaipaddr] [- thalladdr] [- tpaipaddr]]
- Add a filtering rule to an interface. Rules have a similar syntax to those
      in pf.conf(5). Rules can be used to selectively
      blockorpassframes based on Ethernet MAC addresses or totagpackets for pf(4) to filter on.arp(4) packets can be matched with the arpkeyword for regular packets andrarpfor reverse arp.requestandreplylimit matches to requests or replies. The source and target host addresses can be matched with theshaandthakeywords, and the protocol addresses withspaandtpa.Rules are processed in the order in which they were added to the interface. The first rule matched takes the action (block or pass) and, if given, the tag of the rule. If no source or destination address is specified, the rule will match all frames (good for creating a catchall policy). 
- rulefilefilename
- Load a set of rules from the file filename.
- rulesinterface
- Display the active filtering rules in use on interface.
- staticinterface address
- Add a static entry into the address cache pointing to interface. Static entries are never aged out of the cache or replaced, even if the address is seen on a different interface.
- timeouttime
- Set the timeout, in seconds, for addresses in the cache to time. The default is 240 seconds. If time is set to zero, then entries will not be expired.
- up
- Start forwarding packets.
VLAN
| ifconfig | vlan-interface
      [[ -]parentparent-interface]
      [rxprioprio]
      [txprioprio]
      [[-]vnetidvlan-tag] | 
The following options are available for vlan(4) and svlan(4) VLAN interfaces:
- parentparent-interface
- Associate the VLAN interface with the interface parent-interface. Packets transmitted on vlan(4) or svlan(4) interfaces will be tagged with 802.1Q or 802.1ad headers respectively and transmitted on the specified parent interface. Packets with 802.1Q or 802.1ad tags received by the parent interface with the specified VLAN tag will be diverted to the associated VLAN interface. Unless a custom Ethernet address is assigned to the VLAN interface, it will inherit a copy of the parent interface's Ethernet address.
- -parent
- Disassociate from the parent interface. This breaks the link between the VLAN interface and its parent.
- rxprioprio
- Set the value used for the packet priority field. Values may be from 0 to 7, packet to maintain the current packet priority, or outer to use the priority field in the 802.1Q or 802.1ad headers.
- txprioprio
- Set the value used for the priority field in the 802.1Q or 802.1ad headers. Values may be from 0 to 7, or packet to use the priority of packets transmitted on the interface.
- vnetidvlan-tag
- Set the VLAN tag value to vlan-tag. This value is a 12-bit number which is used in the 802.1Q or 802.1ad headers in packets handled by vlan(4) or svlan(4) interfaces respectively. Valid tag values are from 1 to 4094 inclusive.
- -vnetid
- Clear the tag value. Packets on a VLAN interface without a tag set will use a value of 0 in their headers.
WIREGUARD
| ifconfig | wg-interface
      [ wgkeyprivatekey]
      [wgportport]
      [wgrtablertable]
      [-wgpeerall]
      [[-]wgpeerpublickey
      [[-]wgdescr[iption] value]
      [wgaipallowed-ip_address/prefix]
      [wgendpointpeer_address port]
      [wgpkainterval]
      [wgpskpresharedkey]
      [-wgpsk]] | 
Detailed peer information is available to the superuser when
    ifconfig is run with the -A
    flag or when passed specific wg-interface names.
The following options are available for wg(4) interfaces:
- wgkeyprivatekey
- Set the private key of the interface. The privatekey
      is 32 bytes, base64-encoded. It can be generated as follows:
    
    $ openssl rand -base64 32The corresponding public key will then be displayed in the interface status for distribution to peers. 
- wgpeerpublickey
- Specify an interface peer by its publickey, which is 32 bytes, base64-encoded. Repeat the option to specify multiple peers in a single command.
- -wgpeerpublickey
- Remove the peer with the given publickey.
- -wgpeerall
- Remove all peers from the interface.
- wgportport
- Set the interface's UDP port for exchanging traffic
      with its peers. The interface will bind to
      INADDR_ANYandIN6ADDR_ANY_INIT. By default, the interface will choose a port.
- wgrtablertable
- Exchange traffic with peers under the routing table rtable, instead of the default rtable(4). The routing domain of the rtable needn't be the routing domain to which the interface is attached, in which the interface's tunneled traffic appears.
Peer configuration options, which apply to the
    wgpeer immediately preceding them, are as
  follows:
- wgdescr[- iption] value
- Set the peer's description. This can be used to label peers in situations where they may otherwise be difficult to distinguish.
- -wgdescr[- iption]
- Clear the peer description.
- wgaipallowed-ip_address/prefix
- Set the peer's IPv4 or IPv6 allowed-ip_address range for tunneled traffic. Repeat the option to set multiple ranges. By default, no addresses are allowed.
- wgendpointpeer_address port
- Address traffic to the peer's IPv4 or IPv6
      peer_address and UDP port. The
      interface will track the peer, updating wgendpointto the source of its last authenticated packet. By default, the endpoint is unknown and so the peer cannot be addressed until it initiates communication. This implies that at least one peer in each pair must specifywgendpoint.
- wgpkainterval
- Set the interval of persistent keepalive packets in seconds. The default, zero, disables these. They can be used to maintain connectivity to a peer otherwise blocked to unsolicited traffic by an intermediate firewall or NAT device. For this, an interval of 25 seconds should suffice.
- wgpskpresharedkey
- Set a unique key pre-shared with the peer. This strengthens the
      Diffie-Hellman exchange should in future a quantum-computational attack on
      it become feasible. The presharedkey is 32 bytes,
      base64-encoded. It is optional but recommended and can be generated as
      follows:
    
    $ openssl rand -base64 32
- -wgpsk
- Remove the pre-shared key for this peer.
EXAMPLES
Assign the address of 192.168.1.10 with a network mask of 255.255.255.0 to interface fxp0:
# ifconfig fxp0 inet 192.168.1.10
  netmask 255.255.255.0Configure the xl0 interface to use 100baseTX, full duplex:
# ifconfig xl0 media 100baseTX
  mediaopt full-duplexLabel the em0 interface as an uplink:
# ifconfig em0 description
  "Uplink to Gigabit Switch 2"Create the gif1 network interface:
# ifconfig gif1 createPut the athn0 wireless interface into monitor mode:
# ifconfig athn0 mediaopt
  monitorDIAGNOSTICS
Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and tried to alter an interface's configuration.
SEE ALSO
netstat(1), ifmedia(4), inet(4), intro(4), netintro(4), rtable(4), hostname.if(5), hosts(5), rc(8), route(8), slaacd(8), tcpdump(8)
HISTORY
The ifconfig command appeared in
    4.2BSD.