[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1441
  • Last Modified:

'Network not reachable' after every reboot Ubuntu 11.4

'Network not reachable' after every reboot

--------------------------------------------------------------------------------

This began after upgrading to 11.4.

I have to manually do the following after every reboot:

sudo ifconfig eth0 up 192.168.1.137 netmask 255.255.255.0
sudo route add -net 0.0.0.0 gw 192.168.1.1 eth0I have a static network interface, here's what's in /etc/network/interfaces:

Open in new window


Here is /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
iface eth0 inet static
address: 192.168.1.137
netmask: 255.255.255.0
gateway: 192.168.1.1
dns-nameservers: 192.168.1.7 208.68.220.220 208.67.222.222

Open in new window


Any suggestions?
0
wjstarck
Asked:
wjstarck
1 Solution
 
yarwellCommented:
what does ifconfig show after rebooting ie before you manually assign the address etc ?
0
 
upanwarCommented:
After reboot check whether network-manager is stated or not.
0
 
farzanjCommented:
First, you have commented the line

#auto eth0

Why?  So obviously it doesn't start at boot time and you have to manually do it.

Second:

I don't see a route line in your interfaces file.
up route add -net 0.0.0.0 gw 192.168.1.1 dev eth0

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
wjstarckAuthor Commented:
yarwell-

wjs@mail:~$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0c:29:86:85:64  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Open in new window


farzanj: I commented that line out because I get the following error when trying to restart networking:

wjs@mail:~$ sudo /etc/init.d/networking restart
[sudo] password for wjs: 
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...                                          Don't seem to have all the variables for eth0/inet0
Failed to bring up eth

Open in new window


I have also tried adding the up route add line but that doesn't help either. I'm totally stumped :p
                                                                         [ OK ]
0
 
farzanjCommented:
For now just do a work around.

You should have a file:

/etc/rc.d/rc.local

Put these two lines in that file and everything should work.

ifconfig eth0 up 192.168.1.137 netmask 255.255.255.0
route add -net 0.0.0.0 gw 192.168.1.1 eth0
0
 
farzanjCommented:
Ok.  The file in Ubuntu may be
/etc/init.d/local

Make sure it starts with

#!/bin/sh

And it is executable

ls -l /etc/init.d/local
0
 
wjstarckAuthor Commented:
upanwar-

network-manager is running, however when I click on 'Connection Information'  it pops up an error window

Error displaying connection information:
No valid active connections found.

And when I open 'Edit Connections' it always says 'Never' under last used column by Eth0
0
 
wjstarckAuthor Commented:
OK, I gave up on network-manager, it's always given me problems, so I uninstalled it and installed wicd instead. Works perfectully now. I would like to award partial points though. Thanks for your help.
0
 
wjstarckAuthor Commented:
Would like to award 125 points to farznj
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now