network alias at Centos

I need to configure a network adapter under Centos with a alias, one of them with DHCP and the other with static ip.
How can I do it?

--------------------------------
http://www.verinis.com
Administración de sistemas
verinsisAsked:
Who is Participating?
 
maeltarConnect With a Mentor Commented:
You need to create virtual adaptors

eg, your current nic is

eth0
next virtual would be

eth0:0
eth0:1
etc....

Each virtual adaptor can be assign IP via DHCP or assigned static addresses..

http://www.centos.org/docs/5/html/Virtualization-en-US/ch17s14.html

http://www.godlikemouse.com/2011/08/02/creating-virtual-network-adapters-in-centos/

0
 
farzanjConnect With a Mentor Commented:
If you are using graphical interface you can simply use
system-config-network

If you are using command line, you can use

system-config-network-tui

Both the above are dependent upon the package installed on your machine.

Otherwise, you can manually type up the information in files

cd /etc/sysconfig/network-scripts

vi ifcfg-eth0

vi ifcfg-eth0:0

Remember:  Use eth0 for DHCP and eth0:0 for static and not the other way round
0
 
verinsisAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.