LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2012, 03:35 AM   #1
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Rep: Reputation: 21
Question Can you have mutiple address for two instances of application?


My requirement is as below.

I want to run two separate instances of an application which require assigning them two separate ip-addresses.All I have is a single IP -address for my machine.Is there a way that I can assign two separate address to the instances.
 
Old 06-12-2012, 04:11 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 362

Rep: Reputation: 68
Hi Ajit,

Yes you can in Linux.

To add to the eth0 interface, you need to have an additionnal file /etc/sysconfig/network-scripts/eth0:0 with content similar to:

Code:
	
	DEVICE=eth0:0
	IPADDR=192.168.2.101
	PREFIX=24
	ONPARENT=”yes”
 
Old 06-12-2012, 05:09 AM   #3
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by tshikose View Post
Hi Ajit,

Yes you can in Linux.

To add to the eth0 interface, you need to have an additionnal file /etc/sysconfig/network-scripts/eth0:0 with content similar to:

Code:
	
	DEVICE=eth0:0
	IPADDR=192.168.2.101
	PREFIX=24
	ONPARENT=”yes”
If I dont have that particular file do I have to create it.I am basically usign Fedora 16 machine.And also can I add any ip-address to that file is it?
 
Old 06-12-2012, 05:58 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 362

Rep: Reputation: 68
Yes, you will need to create the file /etc/sysconfig/network-scripts/eth0:0.
And disable NetworkManager service, but enable network service with

Code:
chkconfig NetworkManager off
service NetworkManager stop
chkconfig network on
service network start
And yes you can put any network configuration (DHCP or static). Of course, you will need to have the remaining network infrastruture available for.
 
Old 06-12-2012, 06:04 AM   #5
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
If I dont have that particular file do I have to create it.I am basically usign Fedora 16 machine.And also can I add any ip-address to that file is it?
Yes, if you don't have that particular file then you have to create it. And you can assign any IP address to that virtual port. You can do this way -
Code:
# cp ifcfg-eth0 ifcfg-eth0:0
and then you can change the ip address of eth0:0 port whatever you like.
 
Old 06-12-2012, 08:14 AM   #6
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Original Poster
Rep: Reputation: 21
Thanks for your responses.Will try this out and let you know if I face any issues.
 
Old 06-18-2012, 09:45 AM   #7
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Original Poster
Rep: Reputation: 21
Although I have not verified if this works but I am marking this as closed.
 
  


Reply


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
Multiple instances of the same application with different PID's pjoshi Linux - Newbie 4 11-25-2009 03:36 AM
Mutiple instances of xine slowing down system, how can I set only one? M$ISBS Linux - Newbie 3 03-12-2008 11:29 PM
Multiple Application Instances Think_UNIX General 0 09-26-2007 07:38 AM
Why does ps -A show several instances of the same application? davidas Debian 2 04-19-2004 10:53 PM
mutiple ip address porous Linux - Networking 1 10-12-2003 12:12 PM


All times are GMT -5. The time now is 10:19 PM.

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