How can I list all virtual networks for a given network interface in linux?
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?
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.
I'm not a Linux expert but I thought that was deprecated and replaced with iproute2
commands? See iproute2
documentation.
But I think you can still get what you have setup with either ifconfig -a
or netstat -ian
.
You should wait till the real Linux admins chime in though or you can try what I posted.