| Article Index |
|---|
| 1. IP Addresses |
| 2. The Tool - ifconfig |
| 3. Cannot Find ifconfig? |
Network devices connected to TCP/IP networks have assigned at least one IP address. Optionally it is possible to assign multiple IP addresses to a single network device. But how to find out the assigned addresses?
This article shows you how to find out what IP adresses are assigned to network devices you are able to login.
1. IP Addresses
An IP address is a unique address within your TCP/IP network. IP addresses identify network cards or network services. Remote applications will be able to connect to your local services, if ...
- remote machines know the address of your computer / network service
- your computer is reachable via network
- you are running network services at your computer (for example a web server)
2. The Tool - ifconfig
If you are utilizing a Unix-like operating system (like Linux, FreeBSD or MacOS X), then it is very likely that there is a command line tool available called ifconfig. By default ifconfig is printing a list of available devices and assigned network addresses attached to your computer.
The following example shows the output of ifconfig when there is a single network device configured at your machine:
root@ubuntu:~$ ifconfig
eth1 Link encap:Ethernet HWaddr 00:08:74:16:36:d1
inet addr:172.24.115.1 Bcast:172.24.119.255 Mask:255.255.248.0
inet6 addr: fe80::208:74ff:fe16:36d1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:64944856 errors:0 dropped:0 overruns:1384 frame:0
TX packets:952753 errors:0 dropped:0 overruns:0 carrier:0
collisions:119908 txqueuelen:1000
RX bytes:3047126847 (3.0 GB) TX bytes:586044119 (586.0 MB)
Interrupt:18 Base address:0xc00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:700177 errors:0 dropped:0 overruns:0 frame:0
TX packets:700177 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:114235799 (114.2 MB) TX bytes:114235799 (114.2 MB)
eth1
eth1 is the name of the network device that is connected to a physical network. In this example the device can be reached from remote hosts by utilizing the IP4 address 172.24.115.1 or the IP6 address fe80::208:74ff:fe16:36d1/64.
lo
lo is a loopback device that is available in virually any Unix-like operating system. It provides network connectivity for local applications to locally installed network services. Even if there is not network connected to your computer you can utilize a web browser to connect to locally installed web services, for example.
3. Cannot Find ifconfig?
You might be faced with Unix machines that seem not to have installed the tool ifconfig. In this case you have to try to address this tool by an absolute path. Try the following ones:
- /sbin/ifconfig
- /usr/sbin/ifconfig
- /bin/ifconfig
- /usr/bin/ifconfig
However, if your administrator did hide your tool of desire within another directory you can try to utilize tools like locate or find to get a hint where ifconfig might be placed. And if you really cannot find ifconfig within your local filesystem or if you are not allowed to run this application (yes, some administrators like to bother users) you will find a wealth of information within the /proc filesystem. Unfortunately details on network configurations are somehow difficult to extract for non-technophiliacs. Further tools and details how to extract data from the /proc filesystem by-hand will be part of an dedicated article.
If you have got questions or if you do need additional support, please refer to our commercial IT support services. If you are new to this service please visit the page support. There you will receive further information.
172.24.115.1




