Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been attempting to set up Ubuntu 12.04 with a static IP (with information provided by my university) as well as the local cycling IP on a workstation with two ethernet ports. However, I've had some nagging issues, and in my attempts to fix thing, I appear to have made them worse. At the moment the internet connection keeps droping out and only a command of:

$ sudo /etc/init.d/networking restart

seems to allow for reconnect. Here is some output of my configuration:

$ more /etc/network/interface file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

iface eth1 inet static
 address 169.230.xx.zz
 gateway 169.230.xx.y
 netmask 255.255.255.0
 network 169.230.xx.a
 broadcast 169.230.xx.255
 dns-nameservers 169.230.ab.cd 128.218.def.ghi

Then my ifconfig out:

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:25:90:99:d4:be  
      inet addr:169.230.xx.xxx  Bcast:169.230.xx.255  Mask:255.255.255.0
      inet6 addr: fe80::225:90ff:fe99:d4be/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:4135511 errors:0 dropped:9 overruns:0 frame:0
      TX packets:375971 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:530705260 (530.7 MB)  TX bytes:103589902 (103.5 MB)
      Memory:dfd20000-dfd40000 

eth1      Link encap:Ethernet  HWaddr 00:25:90:99:d4:bf  
      inet addr:169.230.xx.yyy  Bcast:169.230.xx.255  Mask:255.255.255.0
      inet6 addr: fe80::225:90ff:fe99:d4bf/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1351335980 errors:0 dropped:6 overruns:0 frame:0
      TX packets:672022745 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:1830620673517 (1.8 TB)  TX bytes:56632610611 (56.6 GB)
      Memory:dfd00000-dfd20000 

lo        Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:3986514 errors:0 dropped:0 overruns:0 frame:0
      TX packets:3986514 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:1147973416 (1.1 GB)  TX bytes:1147973416 (1.1 GB)

Now, I also see this nice message pop up in terminal from time to time:

lockfile creation failed: exceeded maximum number of lock attempts

Now, I think the problem as something to do with resolv.conf file not populating correctly. Here is what I see:

$ more /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 128.218.zzz.10
nameserver 128.218.zzz.40
search ucsf.edu

Any idea about what is possibly happening would be great.

Thanks in advance.

share|improve this question
    
It is unusual to connect a machine to a LAN using two Ethernet cards with IP addresses in the same subnet range, and especially unusual to do this using DHCP for one and static assignment for the other. What are you trying to do? –  jdthood Mar 26 '13 at 9:35
    
Minor point: The network option in /etc/network/interfaces is obsolete and unnecessary. –  jdthood Mar 26 '13 at 9:36
    
Another thing: You have auto eth0 but no auto eth1. Do you not want eth1 to be configured on boot? –  jdthood Mar 26 '13 at 9:40

2 Answers 2

This answer concerns the part of your question dealing with resolv.conf.

The "lockfile creation failed" problem has nothing to do with the contents of resolv.conf.

Your resolv.conf contents look correct, assuming that the two nameserver addresses are correct and the domain name in the search option is correct. If the nameserver addresses are not correct then that needs to be investigated. Since eth0 is configured via DHCP, presumably those addresses are provided by the DHCP server to the local DHCP client and submitted to resolvconf which puts them into resolv.conf.

share|improve this answer

Is NetworkManager running? If it is running and your intent is to use ifup to configure interfaces then remove the network-manager package.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.