How to find currently used ip’s of a linux-system

The primary tool for this job was called ifconfig. This tool shows the IP addresses of all available network adapters. So regardless of whether it is an ethernet interface or a wireless adapter (of course there are much more types of network connections)

However, ifconfig should no longer be used at the present time will. Above all, in times of IPSec, ifconfig won’t correctly display all available interfaces.

The successor of ifconfig is simply called ip. The ip command shows not only the IP addresses. To give a similar output as ifconfig get used to ip with the following parameters:

ip addr show

The command from above will produce the following (or similar) output:

root@xxx:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
group default qlen 1000
    link/ether 00:50:56:90:78:4d brd ff:ff:ff:ff:ff:ff
    inet 10.2.10.7/16 brd 10.2.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe90:784d/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
group default qlen 1000
    link/ether 00:50:56:90:0a:54 brd ff:ff:ff:ff:ff:ff
    inet 10.1.200.7/24 brd 10.1.200.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe90:a54/64 scope link
       valid_lft forever preferred_lft forever

VPN-IP’s, like the one allocated by StrongSwan (IPSec), will be also listed in here but won’t be shown with ifconfig!