Ifconfig
From Wikipedia, the free encyclopedia
- The correct title of this article is ifconfig. The initial letter is shown capitalized due to technical restrictions.
The Unix command ifconfig
can function as a tool to configure a network interface for TCP/IP from the command line interface (CLI). The name ifconfig expresses the purpose of the command: an interface configurator. [1]
ifconfig
originally appeared as part of the BSD TCP/IP suite — so in effect it formed part of the original internet toolkit. The ifconfig
command first appeared in 4.2BSD.
Contents |
[edit] Functionality
Common uses for ifconfig
include setting an interface's IP address and netmask, and bringing an interface up or down. Network administrators can also use ifconfig
to tweak several other settings on the interface.
In this way the ifconfig
command operates in conjunction with other tools to assign and manage IP addresses and interfaces on LANs, wide-area networks (WANs), and the Internet. ifconfig
can also virtually airwall a machine, that is, functionally disconnect it from a network.
[edit] Sample ifconfig
output
The following screen-dialog shows the result of displaying the current state of a single active ("up") interface (eth0
) on a machine:
$ /sbin/ifconfig 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
[edit] Current status
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).
[edit] Related tools
Early builds 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 that Linux's ifconfig
command could not handle. It can set such specialized settings as a wireless network's SSID and WEP keys, and functions in tandem with iwlist.
[edit] External links
[edit] References
- ^ Linux Network Administrators Guide Section 5.7. Interface Configuration for IP