Ifconfig
Encyclopedia
ifconfig is a system administration utility in Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 operating systems to configure, control, and query TCP/IP network interface
Network card
A network interface controller is a computer hardware component that connects a computer to a computer network....

 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
IP address
An Internet Protocol address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing...

 and netmask, and disabling or enabling a given interface. 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
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

-based host (interface eth
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....

0) and the ural0
Ralink
Ralink Technology, Corp. is a Wi-Fi chipset manufacturer which is mainly known for their WLAN chipsets. Now headquartered in Hsinchu, Taiwan, Ralink was founded in 2001 in Cupertino, California and it was bought in 2009 by the taiwanese company MediaTek....

 interface on an OpenBSD
OpenBSD
OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...

 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.7 Mb) TX bytes:2870928587 (2737.9 Mb)
Interrupt:28


ural0: flags=8843 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
Berkeley Software Distribution
Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

 UNIX
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 operating systems (e.g., NetBSD
NetBSD
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...

, OpenBSD
OpenBSD
OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...

, and FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

) 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
TCP segmentation offloading
In computer networking, large segment offload is a technique for increasing outbound throughput of high-bandwidth network connections by reducing CPU overhead. It works by queuing up large buffers and letting the network interface card split them into separate packets...

 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
Route (command)
route is a command used to view and manipulate the TCP/IP routing table in both Unix-like and Windows operating systems. Manual manipulation of the routing table is characteristic of static routing....

 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, while still maintained, released its latest version 1.60 on 2001-April-15.

Modern distributions are in the process of deprecating ifconfig and route, replacing them with iproute2
Iproute2
iproute2 is a collection of utilities for controllingTCP and UDP IP networking and traffic control in Linux, in both IPv4 and IPv6 networks. It is currently maintained by Stephen Hemminger...

, which has been available since 1999-April-17 for Linux 2.2.4, though many distributions still fail to use it throughout. 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
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 from Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

 to Windows Me
Windows Me
Windows Millennium Edition, or Windows Me , is a graphical operating system released on September 14, 2000 by Microsoft, and was the last operating system released in the Windows 9x series. Support for Windows Me ended on July 11, 2006....

 used winipcfg to give a graphical display of current IP information. ipconfig
Ipconfig
ipconfig in Microsoft Windows is a console application that displays all current TCP/IP network configuration values and can modify Dynamic Host Configuration Protocol DHCP and Domain Name System DNS settings....

, a command similar to ifconfig, comes with Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 operating-system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s based on the Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

 kernel. ipconfig
Ipconfig
ipconfig in Microsoft Windows is a console application that displays all current TCP/IP network configuration values and can modify Dynamic Host Configuration Protocol DHCP and Domain Name System DNS settings....

 also controls the Windows DHCP client
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

.

In Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, the ifconfig command functions as a wrapper
Wrapper
Wrapper generally refers to a type of packaging, such as a flat sheet made out of paper, cellophane or plastic to enclose an object.Wrapper may also refer to:* Wrapper , a woman's garment which is worn over nightwear or lingerie...

 to the IPConfiguration agent, and can control the BootP
BOOTP
In computer networking, the Bootstrap Protocol, or BOOTP, is a network protocol used by a network client to obtain an IP address from a configuration server. The BOOTP protocol was originally defined in RFC 951....

 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, a component of Wireless tools for Linux
Wireless tools for Linux
Wireless tools for Linux is a package of Linux commands intended to support and facilitate the configuration of wireless devices using the Linux Wireless Extension...

, which took its name from ifconfig, manages wireless network
Wireless network
Wireless network refers to any type of computer network that is not connected by cables of any kind. It is a method by which homes, telecommunications networks and enterprise installations avoid the costly process of introducing cables into a building, or as a connection between various equipment...

 interfaces outside the original scope of Linux's ifconfig. iwconfig sets such specialized settings as a wireless network's SSID and WEP
Wired Equivalent Privacy
Wired Equivalent Privacy is a weak security algorithm for IEEE 802.11 wireless networks. Introduced as part of the original 802.11 standard ratified in September 1999, its intention was to provide data confidentiality comparable to that of a traditional wired network...

 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
Ethtool
ethtool is a Unix command that allows to display or modify a NIC's parameters.- Example :To display the current parameters: ethtool eth0Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full...

, mii-tool
Mii-tool
mii-tool is a Unix command allowing to modify the Network Interface Controller parameters.- Example :To display the current parameters: mii-tooleth0: no autonegotiation, 100baseTx-HD, link ok...

, and mii-diag for Linux and show-link for Solaris.

External links

  • ifconfig(8), manpage for Linux net-tools ifconfig
  • ifconfig(8), manpage for the FreeBSD ifconfig
  • ifconfig(8), manpage for the OpenBSD ifconfig
  • link titleipconfig(8), manpage for Ubuntu
    Ubuntu (operating system)
    Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software. It is named after the Southern African philosophy of Ubuntu...

     ipconfig
  • networksetup(8), manpage for the Mac OS X networksetup
  • ifconfig for Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

  • ipconfig for Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

    on a technet.microsoft.com
  • ip, manpage for the Linux command ip
  • Debian net-tools page, which includes sources of the Linux version of ifconfig
  • net-tools future thread, from current maintainers
  • ifconfig examples
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK