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 decided to get rid of network-manager for some reason, and now in order to get on the network, I have to run sudo ifup eth0. Here's what cat /etc/network/interfaces gives:

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

How do ensure I don't have to perform this laborious process again (How do I get the network started automatically on boot-up)?

share|improve this question

3 Answers 3

up vote 3 down vote accepted
sudo vim /etc/network/interfaces

DHCP

# Loopback
#
auto lo
iface lo inet loopback

# network card
auto eth0
iface eth0 inet dhcp

Static

# Loopback
#
auto lo
iface lo inet loopback

# network card
#
auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Restart networking.

sudo /etc/init.d/networking restart

If you use static, you might want to check /etc/resolv.conf to make sure name servers have been specified. It might look like this:

nameserver 208.67.222.222 # OpenDNS
nameserver 8.8.8.8        # Google
domain example.com
search example.com
share|improve this answer
    
[not solved]: 1) vim /etc/network/interfaces; followed your advise 2) rebooted and nothing happens 3) applied ifup eth0 also says "ignoring unknown interface eth0=eth0 –  YumYumYum Nov 21 '11 at 20:59

Add eth0 to auto lo, like:

auto lo eth0

This will bring up lo (loopback) and eth0 on running ifup -a (done at boot time).

From man interfaces:

Lines beginning with the word "auto" are used to identify the physical interfaces to be brought up when ifup is run with the -a option. (This option is used by the system boot scripts.) Physical interface names should follow the word "auto" on the same line. There can be multiple "auto" stanzas. ifup brings the named interfaces up in the order listed.

share|improve this answer
    
[not solved]: 1) vim /etc/network/interfaces; auto lo eth0 added 2) rebooted and nothing happens 3) applied ifup -a says "ignoring unknown interface eth0=eth0 –  YumYumYum Nov 21 '11 at 20:57

"[not solved]: 1) vim /etc/network/interfaces; followed your advise 2) rebooted and >nothing happens 3) applied ifup eth0 also says "ignoring unknown interface eth0=eth0 – >YumYumYum Nov 21 '11 at 20:59"

Today i had the same "ignoring unknown interface eth0=eth0" issue. For me, the problem was due to the fact that I was configuring eth1 (in static) instead of eth0 (I didn't have eth0 configured).

So I just renamed eth1 to eth0 and it worked.

Hoping it could help anyone who done the same mistake.

P.S.: sorry for my bad english, don't hesitate to tell any mistake ;)

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.