Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 12-11-2012, 03:45 AM   #1
LQ Newbie
Registered: Sep 2012
Posts: 26

Rep: Reputation: Disabled
How to have Virtual IP Address


I have IP Address assigned via DHCP.

In all the guides i find that they have static IP Address but in my virtual machine, my ip address is via DHCP.

So any guide on how can i have a virtual ip address over single NIC so that i can use it for heartbeat.

Current Configuration of ETH0 :-


I tried and copy pasted it with ETH0:01 and upped that interface with command ifup eth0:01. Than did ifconfig but could not find anything, it just shows eth0 and lo.
Old 12-11-2012, 09:33 AM   #2
Registered: Jul 2011
Distribution: CentOS, Ubuntu, Fedora, Solaris, RHEL, Debian
Posts: 94

Rep: Reputation: 3
Originally Posted by sunzeal View Post
I tried and copy pasted it with ETH0:01 and upped that interface with command ifup eth0:01.
You cannot use DHCP on an alias interface. You'll want to assign a static IP.
Old 12-11-2012, 01:07 PM   #3
Senior Member
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,226

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
He said ti right, but ..

To make it clear, your physical interface CAN have a dynamic address and your alias a static. The other way does not work.
You need to assign an address and settings to the alias.

You might look at for details.
Old 12-11-2012, 03:33 PM   #4
LQ Newbie
Registered: Sep 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
thanks blueh20 & wpeckham.

That method from cyberciti worked, but was wondering, the address which i create with ifconfig eth0:0 up can be considered as a virtual IP address ?

I am able to ping the address i create, but i cannot see it in : ifconfig -a


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
When IOMMU is enabled, how to get the Kernel Virtual Address from a Physical address leechaotang Linux - Kernel 1 11-10-2011 12:21 AM
Converting virtual address to physical address in the kernel DBQ Programming 0 02-07-2010 06:30 PM
how to translate virtual address to physical address in linux application saurin Programming 1 11-18-2009 09:05 PM
Does user stack have a fixed address location in its virtual address? lqu Linux - Kernel 1 09-11-2009 01:28 PM
Outgoing local trafic over virtual interface has not virtual ip address :-( tkmbe Linux - Networking 3 08-25-2009 08:03 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration