Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How do I list all virtual networks created for a given network interface card?

E.g. I have added a virtual network like this,

ifconfig eth0:0 inet6 add ::123/64

It's responding fine. And I know I can use that network, because I added it. But if I wasn't the one who added it, how would I find out that it existed?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Take a look at the ip command, specifically:

ip addr show dev eth0

This should give you all ip addresses that are assigned to eth0. Or leave off the dev eth0 arguments to get the same for all interfaces on the system.

share|improve this answer
    
Thank you Sir! That did it. –  nmdias Nov 28 '12 at 3:52

I'm not a linux expert but I thought that was deprecated and replaced with iproute2 commands? See here: http://www.noah.org/wiki/iproute2#labeling_virtual_interfaces_for_compatibility_with_.60ifconfig.60 but I think you can still get what you have setup with either "ipconfig -a" or "netstat -ian".

You should wait til the real linux admins chime in though or you can try what I posted.

share|improve this answer
    
Thank you kind Sir! The page does have what I need. –  nmdias Nov 28 '12 at 3:53

Your Answer

 
discard

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.