Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

ifconfig Debian 9

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
bookie
Posts: 370
Joined: 2007-12-07 11:49

ifconfig Debian 9

#1 Post by bookie »

Hi guys :D
I started this threada while back and everything works fine....but I have decided to take the bull by the horns and try and get clonezilla server edition working on Debian 9...

Everything has changed with Debian 9...

The first thing is a ifconfig doesn't work on xfce debian 9....
The naming convention for your network cards isn't eth0...eth1 etc....

I need to add static ip addresses for my network interfaces and wonder what the procedure is for this in debian 9?

My computers already have a reserved list for all my computers so setting up the static ip to the reserved ip address shouldn't be a problem...

I am not up to date with the procedures for setting up a static network in Debian 9 and would like some help... :D

bookie32

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: ifconfig Debian 9

#2 Post by debiman »

bookie wrote:The first thing is a ifconfig doesn't work on xfce debian 9....
show us in detail.
use code tags for code.
The naming convention for your network cards isn't eth0...eth1 etc....
it's less convenient to type out, but you can use the new names all the same.

the reference to your previous thread is a bit lazy; i think you should explain your problem here.
also that thread is very noisy.

bookie
Posts: 370
Joined: 2007-12-07 11:49

Re: ifconfig Debian 9

#3 Post by bookie »

Hi debiman :D
Not sure I like your comment lazy...one thing I am not is lazy....
The only reason I referenced the thread at all because it was recent and relevant....
But not splitting hairs here :D

Code: Select all

martyn@DN-Server:~$ ifconfig
bash: ifconfig: kommandot finns inte
martyn@DN-Server:~$ martyn@DN-Server:~$ ifconfig
bash: ifconfig: kommandot finns inte
martyn@DN-Server:~$ 
The command isn't found and I don't see how that tells you anything more than I already stated...
I want to know if it is proper practice now to add your own static ip's to /etc/network/interfaces of should one use the network manager....?
There are so many ways your Internet can stop working and I just thought it prudent to ask if there are any changes I should be aware of...

Other wise I usually set up my network as follows:

Code: Select all

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

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback


#Network Interface My Internet Network
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
#dns-servers 8.8.8.8 192.168.1.1


#Clonezilla
auto eth1
iface eth1 inet static
address 192.168.10.254
netmask 255.255.255.0

But obviously I would use:

Code: Select all

martyn@DN-Server:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 68:05:ca:46:56:36 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global enp4s0
       valid_lft forever preferred_lft forever
    inet6 fe80::6a05:caff:fe46:5636/64 scope link 
       valid_lft forever preferred_lft forever
3: enp5s6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 90:e2:ba:d8:a7:4e brd ff:ff:ff:ff:ff:ff
so unless I change the network back to eth0 and eth1 I would use enp4s0 and enp5s6

So basically I want to know if it is frowned on to use /etc/network/interfaces for static ip's or should I use the network manager and set them there?

Is there anything more you need to know :D ?

bookie32

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: ifconfig Debian 9

#4 Post by Head_on_a_Stick »

bookie wrote:I want to know if it is frowned on to use /etc/network/interfaces for static ip's or should I use the network manager and set them there?
You can use either, it is entirely up to you.

I prefer /etc/network/interfaces because NetworkManager is pure bloat.

To make it work, you can either replace eth0 with the new interface name (enp4s0) or instruct the system to use the old nomenclature by booting with the net.ifnames=0 kernel parameter.

More here: https://www.freedesktop.org/wiki/Softwa ... faceNames/
deadbang

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: ifconfig Debian 9

#5 Post by Thorny »

bookie wrote: Everything has changed with Debian 9...
Well, not really "everything". ;-)
bookie wrote:The first thing is a ifconfig doesn't work on xfce debian 9....
The naming convention for your network cards isn't eth0...eth1 etc....
Yeah, you should have read the release notes before upgrading so you would have known what to expect. At least the part about what's new in Debian9. Probably still a good idea to read them and learn about "predictable names" and "iproute2"

https://wiki.debian.org/NewInStretch
https://www.debian.org/releases/stable/ ... ase-notes/

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: ifconfig Debian 9

#6 Post by Head_on_a_Stick »

bookie wrote:The command isn't found
https://packages.debian.org/stretch/net-tools

Although as Thorny notes the newer iproute2 package is preferred.
deadbang

bookie
Posts: 370
Joined: 2007-12-07 11:49

Re: ifconfig Debian 9

#7 Post by bookie »

Hi guys!
Now I didn't read the release notes for Debian 9 oops.... :shock:
OK!
It was the usual practice to remove the network manager when setting static ip's....or should I say most threads stated that when working with setting up Clonezilla Server Edition...

If I am using /etc/network/interfaces - then I don't need the network manager and can remove it?

I like the old way of doing it by /etc/network/interfaces.... :D

Thanks for all the links guys....one lives and learns....just love the Debian community :D

bookie32

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: ifconfig Debian 9

#8 Post by Head_on_a_Stick »

bookie wrote:If I am using /etc/network/interfaces - then I don't need the network manager and can remove it?
Yes, kill it with fire :twisted:

You could also leave it in place and enabled, it will ignore any devices managed through /etc/network/interfaces, which is nice.
deadbang

bookie
Posts: 370
Joined: 2007-12-07 11:49

Re: ifconfig Debian 9

#9 Post by bookie »

Hi Head_on_a_stick :D
I will leave it in place for the time being to see how things go....lol

bookie32

Post Reply