Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to autoconfigure network.
Network Manager is removed because I need lightweight system.

After system starts networks doesn't work.

#service networking status
networking stop/waiting

#service networking start  
networking stop/waiting

/etc/network/interfaces (eth1 isn't mistake)

iface eth1 inet static
address 192.168.2.8
netmask 255.255.255.0
gateway 192.168.2.1
dns-server 8.8.8.8

But if i type

#ifconfig eth1 192.168.2.8/24
#route add default gw 192.168.2.1

networking works

Why it doesn't configure interface eth1 automaticaly after boot?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

(This assumes that you are running Mint, and that Mint didn't change anything from Debian on this matter)

You need an auto line:

auto eth1

Otherwise, the interface will not be handled by the init.d/networking script.

This way, the interface is started when networking is started, reconfigured if networking is reloaded/restarted and stopped when networking is stopped.

Alternatively, for hotplugged devices, you can use :

allow-hotplug eth1

This way, the device will be configured when it is plugged and unconfigured when unplugged. If the device is already plugged at boot, networking will start it, but will not touch it when networking is stopped/restarted/reloaded

Oh, and by the way, ifconfig is deprecated. I hope that your ìfupdown package is recent enough to use ip (from the iproute2 package) instead.

share|improve this answer
    
Thanks, auto eth1 :banghead: –  Lukasik Dec 30 '12 at 20:30

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.