Multiple Ip's

Issues related to configuring your network

Multiple Ip's

Postby Thirupathi » 2012/10/17 16:47:08

Hi All,

I have configured multiple ips in my centos box when i run the ifconfig or ifconfig -a command ifcfg-eth0:0 is not showing. Please help me.

Regards
Thiru
Thirupathi
 
Posts: 2
Joined: 2012/10/07 10:57:06

Re: Multiple Ip's

Postby TrevorH » 2012/10/17 17:28:51

Try running `ip addr show` and see if it's listed that way
User avatar
TrevorH
Forum Moderator
 
Posts: 9071
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Multiple Ip's

Postby jlehtone » 2012/10/19 10:42:10

Thirupathi wrote:
I have configured multiple ips ...

By which method?

Note: If I use service 'network' and have a /etc/sysconfig/network-scripts/ifcfg-eth0:
Code: Select all
BOOTPROTO=static
IPADDR=a.b.c.d
NETMASK=255.255.255.0
IPADDR0=e.f.g.h
NETMASK0=255.255.255.0

Then "ip addr show" lists both addresses, but "ifconfig" shows only the a.b.c.d.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Multiple Ip's

Postby Skaperen » 2012/10/24 20:45:47

jlehtone wrote:
Thirupathi wrote:
I have configured multiple ips ...

By which method?

Note: If I use service 'network' and have a /etc/sysconfig/network-scripts/ifcfg-eth0:
Code: Select all
BOOTPROTO=static
IPADDR=a.b.c.d
NETMASK=255.255.255.0
IPADDR0=e.f.g.h
NETMASK0=255.255.255.0

Then "ip addr show" lists both addresses, but "ifconfig" shows only the a.b.c.d.

Commands "ifconfig" and "ip addr show" use different kernel features to add additional IP addresses. The "ifconfig" command expects interface alias with one IP per alias (e.g. "eth1" and "eth1:0" and "eth1:1" ... actually just about anything can be used for the alias). The "ip" command uses newer kernel facilities to just add an IP to an existing interface (shows multiple IPs, including IPv6 where appropriate).
Skaperen
 
Posts: 6
Joined: 2012/10/24 18:36:26


Return to CentOS 6 - Networking Support

Who is online

Users browsing this forum: No registered users and 1 guest