Operating System - Linux
1819803 Members
2865 Online
109607 Solutions
New Discussion юеВ

eth0:2 - Why do I see this when I run

 
SOLVED
Go to solution
Ian Derringer
Regular Advisor

eth0:2 - Why do I see this when I run

/sbin/ifconfig -a
Aand I see that I have an ethernet eth0:2 assigned with an IP address. I checked and checked and I can see to find it anywhere. I am currently running RH AS 3.0

Thanks!!
4 REPLIES 4
Ivan Ferreira
Honored Contributor
Solution

Re: eth0:2 - Why do I see this when I run

That interface is used for configuring IP aliases.

Somewhere in your system, you have the ifconfig command configuring the alias interface.

Check in the following places:

/etc/sysconfig/network-scripts/ifcfg-eth0:2:

If that file exits, you need to remove it, or use grep eth0:2 /etc/sysconfig/network-scripts/*

Also, maybe somebody placed the ifconfig command in /etc/rc.local, or other startup script.

A custom service may also add the IP Alias. Clustering services do that. Do you have a cluster?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: eth0:2 - Why do I see this when I run

Lots of reasons for seeing eth0:2

Sometimes its done just because someone needs two IP addresses for one NIC card.

If you are not the one who originally set it up, you might want to look for internal documents on how the system was installed.

Aslo the ifcfg file allows for comments and a kind predecessor might have made some notes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rick Garland
Honored Contributor

Re: eth0:2 - Why do I see this when I run

This is a virtual IP address for a NIC card.

Lots of reasons. Security and web hosting can be a couple of common reasons.

This can be done by the ifconfig command and then the route add command.

If this is surviving a reboot, check the rc.local file and see if these commands (or similar commands) are in the rc.local file.

/etc/rc.d/rc.local

Ian Derringer
Regular Advisor

Re: eth0:2 - Why do I see this when I run

We're are not using Linux clustering at the moment. However, we're using teh Oracle RAC on two server and this is one of them. I did setup a virtual IP and share it with eth0:1, not eth0:2 - Should I be doing with the virtual IP or I should have done it in a diffrent way? I will dig deep tonight and figure out where is this eth0:2 is coming from. Thanks for responding to my virtual IP address issue. You're the best!!