BDS version here


a network interface

See also ethtool

ifconfig [interface [aftype] options | adress]

Without arguments displays the status of the currently active interfaces.

-a displays the status of all interfaces, even those that are down.

With an interface and options, configures that interface.

sudo ifconfig wlan0 down; sudo ifconfig wlan0 up # invokes wpa_supplicant

Address Families If the first argument after the interface name is an address family, it is used for decoding and displaying all protocol addresses. Address families include inet (TCP/IP, default), inet6 (IPv6), ax25 (AMPR Packet Radio), ddp (Appletalk Phase 2), ipx (Novell IPX) and netrom (AMPR Packet radio).

IPv4 dotted decimal notation:Numbers may be decimal, octal ( with leading ), or hexadecimal (leading 0̸x)

interfacename of the interface. a driver name followed by a unit number, for example eth0 for the first Ethernet interface.
address Set the IP address Example:
up activates the interface. Implied if an address is assigned.
May cause wpa_supplicant to be invoked.
down causes the driver for this interface to be shut down.
netmask addr Set the IP network mask for this interface.
Defaults to the network mask derived from the interface IP address.
For example if the IP address is a netmask of specifies that nodes which begin with 192.168.1 are in the same subnet and no gateway is involved.
Packets destined for nodes that do not begin with 192.168.1 are directed to the gateway.
[-]broadcast [addr] set the broadcast address (frequently the network address with all subnet bits set. For example with netmask of, and the network address of 192.168.3,
the broadcast address is . or
Set (or clear) IFF_BROADCAST
[-]arp Enable or disable the use of the ARP (Address Resolution Protocol) on this interface.
The conversion of IP (nnn.nnn.nnn.nnn) addresses to MAC ( xx:xx:xx:xx:xx:xx:xx) addesses See arp
[-]allmulti Enable or disable all-multicast mode.
If selected, all multicast packets on the network will be received by the interface.
metric N sets the interface metric (cost for computing cheapest (fastest) route)
mtu N sets the Maximum Transfer Unit (MTU)
dstaddr addr Set the destination IP address for a point-to-point link (such as PPP).
add addr/prefixlen Add an IPv6 address
del addr/prefixlen Remove an IPv6 address
tunnel Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.
irq addr specify the interrupt line used by this device.
io_addr addr specify the start address in I/O space for this device.
mem_start addr Specify the start address for shared memory used by this device.
media type Set the physical port or medium type to be used by the device.
values include: type 10base2 (thin Ethernet, coax), 10baseT (twisted-pair 10Mbps Ethernet)( 8 wire with RJ45 block connector>, AUI (external transceiver) .
auto can be used to tell the driver to auto-sense the media type.
[-]pointopoint [addr] enables the point-to-point mode.
a link between 2 and only 2 nodes (for example a dial up or dedicated circuit).
If the addr is given, set the address of the destination node.
Otherwise, set or clear IFF_POINTOPOINT
hw class address Set the hardware address.
Hardware classes include ether (Ethernet), ax25 (AMPR AX.25), ARCnet and netrom (AMPR NET/ROM).
multicast Set the multicast flag
txqueuelen length Set the length of the transmit queue of the device.
Set small for slower devices with a high latency (modem links, ISDN) to prevent bulk transfers from disturbing interactive traffic like telnet
[-]promisc Enable or disable the promiscuous mode.
All packets on the network will be received by the interface even if not addressed to this node for debugging network packets.
  ifconfig [-a] [-v] [-s] interface 
  [[-]broadcast [address]]  
  [netmask address]  
  [outfill NN] [keepalive NN]
  [hw HW address]  
  [metric NN]  [mtu NN]
  [[-]trailers]  [[-]arp]  [[-]allmulti]
  [mem_start NN]  [io_addr NN]  [irq NN]  
  [txqueuelen NN]
  [[-]pointopoint [address]]
  [dstaddr address]  
  [[AF] address]
  [tunnel address]
  [multicast]  [[-]promisc]
  [add|del address[/prefixlen]] 
  [media type]
  HW=Hardware Type.
    loop Local Loopback 
    slip Serial Line IP       slip6 6-bit Serial Line IP 
    cslip VJ Serial Line IP   cslip6 VJ 6-bit Serial Line IP 
    ppp Point-to-Point Protocol 
    adaptive Adaptive Serial Line IP 
    strip Metricom Starmode IP     
    ether Ethernet            ash Ash                   
    tr 16/4 Mbps Token Ring    tr 16/4 Mbps Token Ring New ax25 AMPR AX.25 
    netrom AMPR NET/ROM       rose AMPR ROSE             tunnel IPIP Tunnel 
    hdlc Cisco-HDLC           lapb LAPB 
    arcnet ARCnet             dlci Frame Relay DLCI      frad FrameRelayAccessDevice 
    sit IPv6-in-IPv4          
    fddi Fiber Distributed Data Interface          hippi HIPPI 
    irda IrLAP                 ec Econet           x25 generic X.25 
    infiniband InfiniBand     eui64 Generic EUI-64 

  AF=Address family. Default: inet
    unix (UNIX Domain)      inet (DARPA Internet)       inet6 (IPv6) 
    ax25 (AMPR AX.25)       netrom (AMPR NET/ROM)       rose (AMPR ROSE) 
    ipx (Novell IPX)        ddp (Appletalk DDP)         ec (Econet) 
    ash (Ash)               x25 (CCITT X.25) 

The statistics printed for the original address are shared with all alias addresses on the same device. For per-address statistics add explicit accounting rules for the address using the ipchains(8) command.

Interrupt problems with Ethernet device drivers fail with EAGAIN. See for more information.


/proc/net/socket, /proc/net/dev, /proc/net/if_inet6


Appletalk DDP and IPX addresses will be displayed but cannot be altered by this command.

SEE ALSO route(8), netstat(8), arp(8), rarp(8), ipchains(8)