TCP/IP command. Assign an address to a network interface and/or configure network interface parameters. ifconfig is typically used at boot time to define the network address of each interface on a machine. It may be used at a later time to redefine an interface's address or other parameters. Without arguments, ifconfig displays the current configuration for a network interface. Used with a single interface argument, ifconfig displays that particular interface's current configuration. Note that interfaces are numbered starting at zero: eth0, eth1, eth2, and so forth. In most cases, eth0 will be the primary PCI Ethernet interface, and wireless network interfaces will begin with ath0 or wlan0.
String of the form name unit: for example, en0.
Since an interface may receive transmissions in differing protocols, each of which may require separate naming schemes, you can specify the address_family to change the interpretation of the remaining parameters. You may specify inet (for TCP/IP, the default), ax25 (AX.25 Packet Radio), ddp (Appletalk Phase 2), or ipx (Novell).
The following parameters may be set with ifconfig:
Add an IPv6 address and prefix length.
Assign the specified IP address to the interface.
Enable/disable sending of incoming frames to the kernel's network layer.
Enable/disable use of the Address Resolution Protocol in mapping between network-level addresses and link-level addresses.
(inet only) Specify address to use to represent broadcasts to the network. Default is the address with a host part of all ones (i.e., x.y.z.255 for a class C network).
Enable/disable driver-dependent debugging code.
Delete an IPv6 address and prefix length.
Mark an interface "down" (unresponsive).
Set the interface's hardware class and address. class may be ether (Ethernet), ax25 (AX.25 Packet Radio), or ARCnet.
I/O memory start address for device.
Set the device's interrupt line.
Set routing metric of the interface to n. Default is 0.
Shared memory start address for device.
Set media type. Common values are 10base2, 10baseT, and AUI. If auto is specified, ifconfig will attempt to autosense the media type.
Set the interface's Maximum Transfer Unit (MTU).
Set the multicast flag.
(inet only) Specify how much of the address to reserve for subdividing networks into subnetworks. mask can be specified as a single hexadecimal number with a leading 0x, with a dot notation Internet address, or with a pseudo-network name listed in the network table /etc/networks.
Enable/disable point-to-point interfacing, so that the connection between the two machines is dedicated.
Enable/disable promiscuous mode. Promiscuous mode allows the device to receive all packets on the network.
Specify the transmit queue length.
Create an IPv6-in-IPv4 (SIT) device, tunneling to IPv4 address addr.
Mark an interface "up" (ready to send and receive).
Each address is either a hostname present in the hostname database (/etc/hosts), or an Internet address expressed in the Internet standard dot notation.