ifconfig

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Yobot (talk | contribs) at 00:23, 5 April 2011 (WP:CHECKWIKI error 61 fixes + general fixes, References after punctuation per WP:REFPUNC and WP:PAIC using AWB (7671)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

ifconfig (short for interface configuration) is a system administration utility in Unix-like operating systems to configure, control, and query TCP/IP network interface parameters from a command line interface (CLI) or in system configuration scripts. ifconfig originally appeared in 4.2BSD as part of the BSD TCP/IP suite.

Usage

Common uses for ifconfig include setting an interface's IP address and netmask, and disabling or enabling a given interface.[1] At boot time, many UNIX-like operating systems initialize their network interfaces with shell-scripts that call ifconfig. As an interactive tool, system administrators routinely use the utility to display and analyze network interface parameters. The following example output samples display the state of a single active interface each on a Linux-based host (interface eth0) and the ural0 interface on an OpenBSD installation.

eth0      Link encap:Ethernet  HWaddr 00:0F:20:CF:8B:42
          inet addr:217.149.127.10  Bcast:217.149.127.63  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2472694671 errors:1 dropped:0 overruns:0 frame:0
          TX packets:44641779 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1761467179 (1679.8 Mb)  TX bytes:2870928587 (2737.9 Mb)
          Interrupt:28

ural0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0d:0b:ed:84:fb
        media: IEEE802.11 DS2 mode 11b hostap (autoselect mode 11b hostap)
        status: active
        ieee80211: nwid ARK chan 11 bssid 00:0d:0b:ed:84:fb  100dBm
        inet 172.30.50.1 netmask 0xffffff00 broadcast 172.30.50.255
        inet6 fe80::20d:bff:feed:84fb%ural0 prefixlen 64 scopeid 0xa

Current status

The free Berkeley Software Distribution UNIX operating systems (e.g., NetBSD, OpenBSD, and FreeBSD) continue active development of ifconfig and extension of its functionality to cover the configuration of wireless networking interfaces, VLAN trunking, controlling hardware features such as TSO or hardware checksumming or setting up bridge and tunnel interfaces. Solaris has historically used ifconfig for all network interface configuration, but as of Solaris 10 introduced dladm to perform data-link (OSI model layer 2) configuration, reducing ifconfig's purview to IP configuration.

In older Linux distributions, ifconfig, and the route command operated together to connect a computer to a network, and to define routes between networks. ifconfig for Linux is part of the net-tools package, which is no longer maintained, based upon the fact that its last version 1.60 was released on 2001-April-15.[2]

Modern distributions have deprecated[citation needed] ifconfig and route, replacing them with iproute2, which has a track record for having been available since 1999-April-17 for Linux 2.2.4,[3] though many distributions still fail to use it throughout.[4] iproute2 includes support for all common functions of ifconfig(8), route(8), arp(8) and netstat(1), and beyond that, multicast configuration support, tunnel and virtual link management, traffic control (such as bandwidth shaping), and (lowlevel) IPsec configuration among others.

Related tools

Versions of Microsoft Windows from Windows 95 to Windows Me used winipcfg to give a graphical display of current IP information. ipconfig, a command similar to ifconfig, comes with Microsoft operating-systems based on the Windows NT kernel. ipconfig also controls the Windows DHCP client.

In Mac OS X, the ifconfig command functions as a wrapper to the IPConfiguration agent, and can control the BootP and DHCP clients from the command-line. Use of ifconfig to modify network settings in Mac OS X is discouraged, because ifconfig operates below the level of the system frameworks which help manage network configuration. To change network settings in Mac OS X from the command line, use /usr/sbin/ipconfig or /usr/sbin/networksetup.

iwconfig (one of the Wireless tools for Linux), which took its name from ifconfig, manages wireless network interfaces outside the original scope of Linux's ifconfig. iwconfig sets such specialized settings as a wireless network's SSID and WEP keys, and functions in tandem with iwlist. Linux also features iwspy, to read the signal, noise and quality of a wireless connection.

Other related tools for configuring Ethernet adapters are: ethtool, mii-tool, and mii-diag for Linux and show-link for Solaris.

References

  1. ^ Linux Network Administrators Guide Section 5.7. Interface Configuration for IP
  2. ^ Upstream URL contained in openSUSE's .spec file for net-tools — http://www.tazenda.demon.co.uk/phil/net-tools/
  3. ^ Based upon the availability of tarballs in iproute2's project space. (The GIT history does not reach as far back.) Furthermore, iproute2 release versions follow the kernel version.
  4. ^ https://fedorahosted.org/releases/i/n/initscripts/ release 9.24 still showing traces of invocations of ifconfig

External links