Check all ip's on my eth
Hi all,
Which command is to be used to check all virtual IP's of interface? ifconfig shows only real ip's. tx. |
Quote:
|
no,
linux:~ # cat /etc/sysconfig/network/ifcfg-eth0 BOOTPROTO='static' BROADCAST='172.16.1.255' IPADDR='172.16.1.3' MTU='' NETMASK='255.255.255.0' NETWORK='172.16.1.0' REMOTE_IPADDR='' STARTMODE='onboot' _nm_name='static-0' linux:~ # cat /etc/sysconfig/network/ifcfg-eth1 BOOTPROTO='static' MTU='' REMOTE_IPADDR='' STARTMODE='onboot' _nm_name='static-0' IPADDR_2='172.16.2.1' NETMASK_2='255.255.255.192' IPADDR_3='172.16.3.1' IPADDR='172.16.3.5' NETMASK='255.255.255.192' NETWORK='172.16.5.0' BUT ifconfig -a doesnt show all ip's of eth1 as given below eth0 Link encap:Ethernet HWaddr 00:30:48:52:CC:06 inet addr:172.16.1.3 Bcast:172.16.1.255 Mask:255.255.255.0 inet6 addr: fe80::230:48ff:fe52:cc06/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1099954927 errors:0 dropped:0 overruns:0 frame:0 TX packets:1230100696 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2767502641 (2639.2 Mb) TX bytes:2177980359 (2077.0 Mb) Base address:0x8f00 Memory:fe5a0000-fe5c0000 eth1 Link encap:Ethernet HWaddr 00:30:48:52:CC:07 inet addr:172.16.3.5 Bcast:172.16.5.63 Mask:255.255.255.192 inet6 addr: fe80::230:48ff:fe52:cc07/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2010622117 errors:0 dropped:0 overruns:0 frame:0 TX packets:1874357540 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3562591781 (3397.5 Mb) TX bytes:3297093834 (3144.3 Mb) Interrupt:31 |
Which Linux are you using, btw?
In RedHat, I've set up separate files. For example: # cat /etc/sysconfig/network-scripts/ifcfg-eth0:1 DEVICE=eth0:1 BOOTPROTO=static IPADDR=192.168.30.127 NETMASK=255.255.255.0 NETWORK=192.168.30.0 BROADCAST=192.168.30.255 ONBOOT=yes And I believe you can set them up in the same file as you were trying, but you have to have multiple "Device" entries. |
All times are GMT -5. The time now is 11:26 PM. |