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
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
ax25 (AMPR Packet Radio),
ddp (Appletalk Phase 2),
ipx (Novell IPX) and
IPv4 dotted decimal notation:Numbers may be decimal, octal ( with leading
0̸), or hexadecimal (leading
|name of the interface. a driver name followed by a unit number,
for example |
eth0 for the first Ethernet interface.
| Set the IP address Example: 192.168.1.29
| activates the interface. Implied if an address is assigned. |
wpa_supplicant to be invoked.
|causes the driver for this interface to be shut down.
| 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 192.168.1.4 a
netmask of 255.255.255.0 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.
| set the broadcast address (frequently the network address with
all subnet bits set. For example with netmask of 255.255.255.0, and the network address of 192.168.3, |
the broadcast address is 192.168.3.255 .
Set (or clear)
|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
| Enable or disable all-multicast mode. |
If selected, all multicast packets on the network will be received by the interface.
| sets the interface metric (cost for computing cheapest (fastest) route)
|sets the Maximum Transfer Unit (MTU)
| Set the destination IP address for a point-to-point link (such as PPP).
| Add an IPv6 address
| Remove an IPv6 address
| Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.
| specify the interrupt line used by this device.
| specify the start address in I/O space for this device.
| Specify the start address for shared memory used by this device.
| Set the physical port or medium type to be used by the device. |
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.
| enables the point-to-point mode. |
a link between 2 and only 2 nodes (for example a dial up or dedicated circuit).
addr is given, set the address of the destination node.
Otherwise, set or clear
hw class address
| Set the hardware address. |
Hardware classes include
ax25 (AMPR AX.25),
netrom (AMPR NET/ROM).
| Set the multicast flag
| 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
| 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.
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.
ifconfig [-a] [-v] [-s] interface
[outfill NN] [keepalive NN]
[hw HW address]
[metric NN] [mtu NN]
[[-]trailers] [[-]arp] [[-]allmulti]
[mem_start NN] [io_addr NN] [irq NN]
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
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
dlci Frame Relay DLCI
fddi Fiber Distributed Data Interface
x25 generic X.25
eui64 Generic EUI-64
AF=Address family. Default:
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)
Interrupt problems with Ethernet device drivers fail with EAGAIN. See
http://www.scyld.com/expert/irq-conflict.html 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.
route(8), netstat(8), arp(8), rarp(8), ipchains(8)