Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm putting my hands on a legacy system (a Xen cluster) and I'm trying to understand its architecture. It seems that there are services listening on an IP (say, that doesn't show up in ifconfig output:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:3e:98:46:4b  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::216:3eff:fe98:464b/64 Scope:Link
          RX packets:2701271309 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2580523122 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2013971483375 (1.8 TiB)  TX bytes:1994970579127 (1.8 TiB)

eth0:0    Link encap:Ethernet  HWaddr 00:16:3e:98:46:4b  
          inet addr:  Bcast:  Mask:

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12776938 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12776938 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2103144670 (1.9 GiB)  TX bytes:2103144670 (1.9 GiB)

If I have nc listen on the IP, it is reachable by the outside:

nc -s -p 8081 -l

(i.e. I can telnet or nc to and send data).

This leads me to the conclusion that there's no NAT. However, why doesn't ifconfig list the IP?

share|improve this question
From where can you telnet to From on the system itself, or from another system? – MadHatter Apr 8 '11 at 8:55
if you want to identify what is listening you can use the -p option of netstat, e.g. netstat -lp – Jason Tan Apr 8 '11 at 9:15
@MadHatter, I tried connecting from both the same system and another one. – @Jason Tan, that's where I discovered that I had a daemon listening on that address. I was actually asking why ifconfig doesn't list it. – Alessandro Apr 8 '11 at 19:24
up vote 2 down vote accepted

I've seen cases where ifconfig doesn't show all of the addresses assigned to an interface, but they can be seen with ip addr (where ip is from the iproute2 package).

share|improve this answer
You're right. ip addr lists that address under eth0, as well as other ones. This confirmed that the system is actually bound to that address. With further investigation I discovered that there is a keepalived daemon managing the assignment of the address. You didn't answer to my question (why ifconfig doesn't list all IPs), however your answer helped me a little by confirming that my assumption was right. – Alessandro Apr 8 '11 at 19:26
     -s hostname/ip-address
             Specifies the IP of the interface which is used to send the pack-
             ets.  On some platforms, this can be used for UDP spoofing by
             using ifconfig(8) to bring up a dummy interface with the desired
             source IP address.
$ nc -s -p 8081 -l &
Can't grab with bind : Cannot assign requested address

Perhaps if you run ifconfig from another terminal session whilst nc is still running, you might see what is happening.

share|improve this answer
Thank you! I tried what you suggested but ifconfig still doesn't show that IP. – Alessandro Apr 8 '11 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.