Debian networking

Red Squirrel

No Lifer
May 24, 2003
70,662
13,834
126
www.anyf.ca
I just edited /etc/network/interfaces to set a static IP, and I went to do a restart of the network service, and it's now telling me that is deprecated. Whaaaa? So what am I suppose to do, reboot?

Am I forced to use the network manager GUI? I hate that, because the info gets embeded somewhere in some obscure location. This is one of the exact reasons I hate windows, it just hides everything in random places. At least in Linux everything is a text file... but are they suddenly going away from this now? That kinda sucks.

Also side note, but I noticed vi is still broken. I thought it was specific to Ubuntu, but I see in Debian itself it's broken as well. I installed vim and that one works fine. I'm trying to force myself to use Debian just to try something new, but so far it seems to have odd quirks, but maybe I'm just missing something.
 

Red Squirrel

No Lifer
May 24, 2003
70,662
13,834
126
www.anyf.ca
Yay now I totally broke the network. Reinstall time. Guess I'll just eat it and use that network manager app. Sucks to be forced to have a GUI installed though. I like to run my servers without any GUI. Guess it does not really make that big of a performance difference, but I'm sure it still has a small impact especially on an Atom like in this particular case.
 

lxskllr

No Lifer
Nov 30, 2004
60,198
10,660
126
I never ran it headless, but there's certainly a way to configure networking without a gui. Did you Google it?
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Are you sure the deprecation message wasn't for using init over upstart? IIRC Debian switched to using upstart and some services/startup init.d scripts will spit out a warning if you try to use them instead of the equivalent upstart command.

All you probably had to do was type 'restart networking'

What was the error message?
 

Red Squirrel

No Lifer
May 24, 2003
70,662
13,834
126
www.anyf.ca
Everything says to use the GUI. I uninstalled network-manager, now my network is not working. I'm playing around, I think I may have got it.

After editing the config file I had to add an alias to /etc/init.d/networking in /etc/rc3.d and /etc/rc5.d... don't know if I should be putting it anywhere else. I put it in 5 in case I do use the GUI. I already miss chkconfig, but guess once everything is setup it's not like I'll be doing this much.

Oh and this is the error. It seems to be working now though. I rebooted and it got the right IP and actually auto connected now.

Code:
root@hal9000:~# service networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...

And guess in debian it drops the connection if I'm sshed in. Guess it makes sense, though it does not do it in RH OSes. Had to kill the ssh from another console since it was just locked there.

edit: ok so restarting it just crapped the whole network service this time.

edit2: ok got it working after a few tries. This seems really flaky. Rebooting again to ensure it comes back up automatically. Glad this server has a rac... It's cold in the basement. :p
 
Last edited:

jhu

Lifer
Oct 10, 1999
11,918
9
81
Which version of Debian are you using? I'm using 7 and I don't get that message.
 

lxskllr

No Lifer
Nov 30, 2004
60,198
10,660
126
6 is the latest stable. If you're building a working server, I'd stick with that.
 

MrColin

Platinum Member
May 21, 2003
2,403
3
81
I've been ignoring that particular error on a headless ubuntu box of mine, and I use /etc/network/interfaces to config its 3 interfaces. Sometimes I use "ifdown <interface> && ifup <interface>" instead of /etc/init.d/... This lets me do 'em one at a time which is good since one is a wireless card connected to my neighbor's router for internet access (it's legit i pay him).
 

Red Squirrel

No Lifer
May 24, 2003
70,662
13,834
126
www.anyf.ca
I did a bone head move and used rm instead of vim when I wanted to edit my apache config. Ended up having to reinstall as I did not have another debian machine to grab the config off of.

So after reinstalling I decided to immediately uninstall network manager, and that alone seems to have worked. I added the IP in the debian standard config file and it worked right away. Figured I'd update just for future reference, as it's the easiest route.

Really, I don't get the point of network-manager, it just makes things more complicated for nothing.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Red Squirrel said:
Really, I don't get the point of network-manager, it just makes things more complicated for nothing.

It's for simpler management of multiple networking configurations. For a server it's overly complicated, but for a desktop it's a huge time saver.
 

Colt45

Lifer
Apr 18, 2001
19,720
1
0
Do you really reinstall a whole distro because you screw up a config file?
:hmm:


Anyway,

#networking restart
Running /etc/init.d/networking ***restart*** is deprecated because it may not enable again some interfaces ... (warning).

ie. in the future 'restart' will do nothing, it's just a warning.

this is because: 'because it may not enable again some interfaces.'
The script just runs ifdown -a && ifup -a, which brings down all the interfaces, but only brings up interfaces marked as auto. hence the warning.
 

Red Squirrel

No Lifer
May 24, 2003
70,662
13,834
126
www.anyf.ca
http://wiki.debian.org/NetworkConfiguration

There is always

ifconfig eth0 192.168.1.1 up
dhclient, etc

That only works for that session though. I needed it to work when it gets rebooted.

Got it working since then anyway. Turns out just uninstalling network manager first thing first, makes things easier, and I just deal with the warning, it does seem to work. Once they do completely remove it, then I'll just reboot or do it manually using ifdown/ifup.