Ifconfig

From Wikipedia, the free encyclopedia

The correct title of this article is ifconfig. The initial letter is shown capitalized due to technical restrictions.
Sample output from ifconfig on Linux
Sample output from ifconfig on Linux

The Unix command ifconfig serves to configure and control TCP/IP network interfaces from a command-line interface (CLI). The name ifconfig expresses the purpose of the command: an interface configurator. ifconfig originally appeared in 4.2BSD as part of the BSD TCP/IP suite — so in effect it formed part of the original internet toolkit. [1]

Common uses for ifconfig include setting an interface's IP address and netmask, and disabling or enabling a given interface. At boot time, most UNIX & Linux distributions initialize their network interfaces with shell-scripts that call ifconfig. ifconfig can also virtually airwall a machine, functionally disconnecting it from a network.

Contents

The following screen-dialog shows the result of displaying the current state of a single active interface on two machines, eth0 on a Linux-based system and ural0 on OpenBSD.

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 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

The free Berkeley Software Distribution UNIX operating systems (i.e. NetBSD, OpenBSD, and FreeBSD) continue active development of ifconfig and extension of its functionality to cover the configuration of wireless networking interfaces.

In Linux distributions based on 2.2.x Linux kernels, ifconfig, ipchains, and the route command operated together to connect a computer to a network, to define routes between networks, and to configure firewalls. Distributions based on later kernels have deprecated ifconfig, route, and ipchains, replacing them to large extent with iptables and iproute2. iproute2 includes support for all that ifconfig(8) and route(8) do, as well as traffic-control (such as bandwidth-shaping).

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.

iwconfig, 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.

wicontrol and iwiconfig, similar programs for the BSDs, exist, though OpenBSD has merged this functionality into ifconfig.

  1. ^ Linux Network Administrators Guide Section 5.7. Interface Configuration for IP
Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.