LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-08-2011, 11:48 AM   #1
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Rep: Reputation: 1
Adding virtual ip in Ubuntu 11.10


Hi Everybody,

I want add virtual ip for my pc(Ubuntu 11.10).I have edited the file
#vi /etc/network/interface and added the below line

auto eth0
iface eth0 inet static
address 192.168.0.190
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.8
auto eth0:1
iface eth0:1 inet static
address 192.168.0.41
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.8

But while restarting the network service gives the below error

Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... RTNETLINK answers: File exists
Failed to bring up eth0:1.


Any suggestion highly appreciated .

Thanks in advance
 
Old 11-08-2011, 12:11 PM   #2
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
http://www.liberiangeek.net/2010/02/...-the-easy-way/

This should work. Now I can exactly remember but I think they say remove the network manager because it will keep overiding and make things a pain if I don't recall. So trial and error is all I can say at this moment.
 
Old 11-08-2011, 12:51 PM   #3
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Jmc1987,

I have already followed the Url .This did not help me. I was working fine with Ubuntu 10.04 .After installing Ubuntu 11.10,Its giving the problem .
 
Old 11-08-2011, 02:14 PM   #4
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
have you confirmed your card is recognized?

Quote:
# lspci |grep Ethernet
$ ifconfig -a |grep eth
Are you able to connect my adding the ips over the cli such as
Quote:
# ifconfig eth0 192.168.0.190 netmask 255.255.255.0 up
# route add default gw 192.168.0.8
Can you get your card working with the network-manager?

Last edited by jmc1987; 11-08-2011 at 02:19 PM.
 
Old 11-09-2011, 04:51 AM   #5
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Jmc1987,

There is no problem with detecting eth0. With dhcp client , I am able to get ip from DHCP server and access internet .Problem comes when I am editing the file(/etc/network/interface) for virtual ip .Is it a bug with Ubuntu 11.10 .The same way I used to edit in Ubuntu 10.04 and it was working fine all these days.Looking forward for a solution .


Thanks
 
Old 11-12-2011, 03:27 AM   #6
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
No solution for the problem ?
 
Old 11-12-2011, 10:51 AM   #7
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
Have you tried using the network-manager to connect with a static ip?
 
Old 11-12-2011, 09:22 PM   #8
trafficbroker
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
I have the same problem with eth0/:1 on Ubuntu Server 11.10.

eth0 works fine, ifup eth0:1 throws the same error mentioned by the op. I tried all suggestions.

did somebody have the same issue and solved it?
 
Old 12-20-2011, 05:22 AM   #9
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi Everybody,

I am struggling alot to fix the issue .Anybody able to resolve the issue ???
 
Old 12-22-2011, 11:01 AM   #10
call_krushna
Member
 
Registered: Aug 2007
Location: India
Distribution: Ubuntu
Posts: 173

Original Poster
Rep: Reputation: 1
Hi trafficbroker,

Here you go .Delete the entries from /etc/network/interface and add the below line in /etc/rc.local

ifconfig eth0:1 x.x.x.x netmask 255.255.255.x broadcast x.x.x.x .



Note :- Replace x with ip ,netmask and broadcast details

Last edited by call_krushna; 12-22-2011 at 11:02 AM.
 
  


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
LXer: IBM, Virtual Bridges and Canonical Offer Ubuntu-based Virtual Desktop LXer Syndicated Linux News 0 12-05-2008 06:10 AM
Adding virtual interface for IP based virtual host pridefc Linux - General 6 03-16-2008 03:52 PM
Adding virtual host bestofmed Linux - Networking 2 09-28-2005 04:01 PM
Adding virtual ips to fedora 3 linchat Linux - Networking 2 09-17-2005 07:31 PM
adding a virtual ip in linux Unity0110 Linux - Networking 1 06-06-2004 09:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 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