Discussion:
ethernet failure on local network using debian
Ben Nisenbaum via luv-main
2018-11-24 11:41:47 UTC
Permalink
Hello everyone,
My problem is that I cannot get the ethernet card on the local network to get up. I'm new to debian after many years of red-hat/fedora. The machine: HP Compaq Elite 8300 SFF (Core i5). The system: debian buster (testing)

Some information:

[***@til ~]$ systemctl status networking.service
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2018-11-24 21:43:38 AEDT; 6min ago
Docs: man:interfaces(5)
Process: 460 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
Process: 452 ExecStartPre=/bin/sh -c if [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environ
Main PID: 460 (code=exited, status=0/SUCCESS)

[***@til etc]$ ip addr
<snip>
2: enp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 30:b5:c2:05:28:70 brd ff:ff:ff:ff:ff:ff
3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
<snip>

[***@til etc]$ lspci -nnk
<snip>
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8169 PCI Gigabit Ethernet Controller [10ec:8169] (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8169/8110 Family PCI Gigabit Ethernet NIC [10ec:8169]
Kernel driver in use: r8169
Kernel modules: r8169

The eno1 is onboard, connected to adsl and works fine. If I restart the network with 'systemctl restart networking', or, './etc/init.d/networking restart', the network goes down and fails.

The enp3s0 is connected to a switch on a local network which has two other fedora computers on it. With a previous debian box all I did to have it work on this network was write the following config, reboot, and it worked. I was guided by https://www.debian.org/doc/manuals/debian-reference/ch05. That old box went bung, so I acquired the current one and tried the same config, with the appropriate name changes. That config is in /etc/interfaces (which I created on this machine):

-------start config-----
# 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

# The primary network interface
allow-hotplug eno1
iface eno1 inet dhcp
# This is an autoconfigured IPv6 interface
iface eno1 inet6 auto

# local net
allow-hotplug enp3s0
iface enp3s0 inet static
address 192.168.0.3
netmask 255.255.255.0
-----------end config-----------
There is no /etc/network/interfaces.d/ on this machine. And this particular ethernet card is the same one that worked in previous debian box.

Here are the commands I've used, but none has succeeded in getting the card up, though the ip address was assigned and shown in the 'ip addr' output. There were no error messages other than "FAILED" in the systemctl status output.

ip addr add 192.168.0.3 dev enp3s0
ip addr add 192.168.0.3/24 dev enp3s0
ip link set enp3s0 up
/etc/init.d/networking restart

I was hoping for some help to let me know what I need to do to get this ethernet working?

ben
Mark Trickett via luv-main
2018-11-25 05:39:16 UTC
Permalink
Hello Ben,
Post by Ben Nisenbaum via luv-main
Hello everyone,
My problem is that I cannot get the ethernet card on the local network to
HP Compaq Elite 8300 SFF (Core i5). The system: debian buster (testing)
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
This tells me a lot. You have systemd, and I think NetworkManager. You
need to use those tools, not the command line, it will manage the
configuration files for you, it will overwrite any manual changes.

I do not like NetworkManager, nor Systemd. I can tell NetworkManager
to ignore a particular ethernet interface successfully, then use ifup
and ifdown, but not for wi-fi. For that, there are the command line
tools, but there are several steps and coordinating the use of the
discovery and connection is not so trivial.

Regards,

Mark Trickett
Ben Nisenbaum via luv-main
2018-11-25 07:06:08 UTC
Permalink
Hello all,

Thanks Mark. Your email set me on a new investigation path and I have been able to nut out the problem and resolve it.

Alas, there is no NetworkManager on my box:

[***@til ~]# apt list --installed |grep -i network

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

glib-networking-common/testing,now 2.58.0-1 all [installed,automatic]
glib-networking-services/testing,now 2.58.0-1 amd64 [installed,automatic]
glib-networking/testing,now 2.58.0-1 amd64 [installed,automatic]
libqt5network5/testing,now 5.11.2+dfsg-4 amd64 [installed,automatic]

I'm running networking.service, which means that the commands that I was using should have had some effect as I understand it. Once this became clear to me, I power-recycled the whole system and network (which was a bit painful here for some folks which is why I was reluctant to take that step earlier), and started again. What I think happened is this: I entered the command: ip addr add 192.168.0.3 dev enp3s0 without the netmask. On checking what networking thought I'd done, it returned 192.168.0.3/32 as the ethernet's address, which was different to what I had in the config file, which was equivalent to /24. I tried to amend this with a following /24 version of the command, which looked like it was accepted. But subsequently the command to bring up the ethernet: ip link set enp3s0 up, did not, and would not work. It was only after I power-cycled the switch (along with everything else) that these two ip commands worked. So, it seems to me, that my mistake was to add the ethernet without a netmask, which let networking assign it I suppose, and that different one, the /32 which was lodged in the switch, prevented networking to bring up the network for this computer because of the conflicting netmasks (the assigned one, and the one in the /etc/interfaces config file), and hence different identities. Anyway, that's as I understand it at the moment, but I could be quite astray on details as well of course. Thanks again.

ben
Post by Mark Trickett via luv-main
Hello Ben,
Post by Ben Nisenbaum via luv-main
Hello everyone,
My problem is that I cannot get the ethernet card on the local network to
HP Compaq Elite 8300 SFF (Core i5). The system: debian buster (testing)
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor
preset: enabled)
This tells me a lot. You have systemd, and I think NetworkManager. You
need to use those tools, not the command line, it will manage the
configuration files for you, it will overwrite any manual changes.
I do not like NetworkManager, nor Systemd. I can tell NetworkManager
to ignore a particular ethernet interface successfully, then use ifup
and ifdown, but not for wi-fi. For that, there are the command line
tools, but there are several steps and coordinating the use of the
discovery and connection is not so trivial.
Regards,
Mark Trickett
_______________________________________________
luv-main mailing list
https://lists.luv.asn.au/cgi-bin/mailman/listinfo/luv-main
Loading...