LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-01-2013, 09:44 AM   #1
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Rep: Reputation: 131Reputation: 131
Problem with network if and static ip


I am having a problem getting the network interfaces to come up with an ip address. This is NOT a problem with figuring out how to assign a static ip to the box! We did this a long time ago, and it's been working fine since ... until now.

Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-38-generic x86_64)

This machine is running on a vmware virtual machine. It is an existing installation that has been running fine for a long time.

The network switch that connects the box hosting the virtual drive to the box hosting the vm went down while the machine was running. Not surprisingly, this hosed the filesystem. I fixed that and got the machine to boot, but the nic would not come up with an ip address.

ifconfig shows the interface is up, but the line showing the ip address (inet addr: nnn.nnn.nnn.nnn ...) was missing. It is configured for a static ip address and like I said has worked fine for a long time. "ifconfig eth0 down" takes it down as expected, "ifconfig eth0 up" brings it up ad expected. But no ip address and no network connectivity.

Eventually I found a sequence of events that fixed it, but it makes no sense:

1) Remove /etc/udev/rules.d/70-persistent-net.rules so that it doesn't try to reserve any macids.
2) Remove nic. Add a new one with a different macid. Power up. Still doesn't work.
3) Power down. Add a second nic. Power up. Configure /etc/network/interfaces to give both nics static ip addresses. Reboot. Works!!! Both nics have an ip, both have network connectivity!
4) Remove config for second nic from /etc/network/interfaces. Power down. Remove second nic. Power up. *Now* the first nic comes up with an ip address. In the end, nothing has changed, only it did not work before, and now it does.

Why, oh why, would adding a second nic get them to both come up with an ip address, and why when I removed the second nic does the first one continue to work? This is too weird - it makes no sense. I'm suspecting this is vmware weirdness and not really an Ubuntu problem.

Anyone seen or heard of this before?
 
Old 03-03-2013, 12:17 AM   #2
a31amit
LQ Newbie
 
Registered: Feb 2013
Location: /root
Distribution: RHEL CENTOS UBUNUTU
Posts: 7

Rep: Reputation: 1
it's just problem with udev rules, for saving time you can follow below commands and edit udev rules manually

same happened with RHEL 6.X and CENTOS 6.X after a nic failure or removing a nic card and adding new one.

First you need to find how many interfaces is available and get the mac address of them .

Code:
cat /sys/class/net/eth[0-9]/address
00:0c:29:fc:fe:17
this MAC address you can replace into 70-persistent-net.rules file with mac address. And made IP address and MAC address reference into interface files. reboot your host.

After rebooting system will come up with exact Ethernet interface
 
  


Reply



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
Network address changes despite being static kaplan71 Ubuntu 3 05-31-2011 11:45 AM
static IP and boot activation problem when using network assistant Frakk MEPIS 3 08-29-2010 03:04 PM
Network-Manager static ip possible? gimmee Ubuntu 6 12-16-2006 01:11 AM
Network Changes from Static to DHCP RemusX2 Linux - Networking 5 06-15-2005 01:15 PM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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

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
Open Source Consulting | Domain Registration