BDS version here
ifconfig - configure a network interface
see also ethtool
ifconfig [interface [aftype] options | adress ... ]
At boot time to set up interfaces, after that, needed when debugging or tuning .
Without arguments displays the status of the currently active interfaces.
If a single interface is given displays the status of that interface only;
-a displays the status of all interfaces, even those that are down.
With an interface and options, configures that interface.
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).
Numbers as parts in IPv4 dotted decimal notation
may be decimal, octal ( with leading 0), or hexadecimal (leading 0x)
interfaceThe name of the interface. This is usually a driver name followed by a unit number,
for example eth0 for the first Ethernet interface.
| address| Set the IP address
| up| activates the interface implicitly specified if an address is assigned to the interface.
| down | causes the driver for this interface to be shut down.
| netmask addr Set the IP network mask for this interface.
This value defaults to the usual class A, B or C network mask (as derived from the interface IP address), but it can be set to other values.
For example if the IP address is 192.168.1.4 a netmask of 255.255.255.0 would specify
that all nodes which begin with 192.168.1 are in the same subnet and no gateway device need be contacted
to send packets. Packets destined for nodes that do not begin with 192.168.1 must first be directed to the gateway which then forwards the packets to another network which (eventually) can send the packets to the
subnet containing the destination node.See route
| [-]broadcast [addr] 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 may be 192.168.3.255 .
or
set (or clear) the IFF_BROADCAST flag
| [-]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 aa.bb.cc.dd| 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 the IFF_POINTOPOINT flag
| 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.
It is useful to set this to small
values for slower devices with a high latency (modem links, ISDN) to prevent fast
bulk transfers from disturbing interactive traffic like telnet too much.
| [-]promisc Enable or disable the promiscuous mode of the interface.
That is, all packets on the network will be received by the interface even if not addressed
to this node. Used for debugging network packets.
| | | | | | | | | | | | | | | | | | | | | | | |
Usage:
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]
[[-]dynamic]
[up|down]
[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. If you want per-address statistics you should add explicit accounting
rules for the address using the ipchains(8) command.
Interrupt problems with Ethernet device drivers fail with EAGAIN. See
http://www.scyld.com/expert/irq-conflict.html for more information.
FILES
/proc/net/socket, /proc/net/dev, /proc/net/if_inet6
restrictions
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)