PDA

View Full Version : [SOLVED] Network Interfaces disabled, eth0 does not exist ( Ubuntu 16.04 LTS )



mathematicalchromosomes
July 30th, 2016, 10:17 PM
I'm trying to set up a dedicated server for the house, but I keep running into the trouble of having no connection!

I first found out I had no connection when I started to install the server. It reported that it could not connect to the DHCP server, so I set it to configure later, foolishly believing that I could fix it.

(All of these commands were done while in su mode.)
The first thing I did was to apt update to see if it detected the Ethernet after installation. It failed to fetch the files.
Then, I looked at lshw -C network to find that my Ethernet interface was disabled.
Finally, I took a check at ifconfig and saw that the device eth0 does not exist at all!

So, I tried creating it by adding auto eth0 / iface eth0 inet dhcp and restarting the networking service for the computer to complain that eth0 does not exist (even after restarting!).


This problem traveled with me over two motherboards, yet the ethernet cable works for my laptop (which has the same version - 16.04 LTS).

Please, please help me. I don't know what to do.


RIG:
​hostname: samserver
Ubuntu Server 16.04 LTS
Motherboard - ASUS H97-Plus
Ethernet - Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)

ifconfig

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2256 errors:0 dropped:0 overruns:0 frame:0
TX packets:2256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:167920 (167.9 KB) TX bytes:167920 (167.9 KB)


virbr0 Link encap:Ethernet HWaddr 52:54:00:49:f3:01
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)




/etc/network/interfaces

# 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

# Makes `service networking restart` crash
auto eth0
iface eth0 inet dhcp


lshw -C network

*-network DISABLED description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: enp3s0
version: 11
serial: 9c:5c:8e:85:e1:bd
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:27 ioport:e000(size=256) memory:f7c00000-f7c00fff memory:f0000000-f0003fff
*-network DISABLED
description: Ethernet interface
physical id: 1
logical name: virbr0-nic
serial: 52:54:00:49:f3:01
size: 10Mbit/s
capabilities: ethernet physical
configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s

lspci | grep Ethernet

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11)

/etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN


systemctl status networking.service (after service networking restart)

* networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service: enabled; vendor preset:enabled)
Drop-In: /run/systemd/generator/networking.service.d
L 50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Sat 2016-07-30 21:23:25 PDT: 12s ago
Docs: man:interfaces(5)
Process: 1450 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 1444 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo): ] && udevadm settle (code=exited, status=1/FAILURE)
Main PID: 1450 (code=exited, status=1/FAILURE)


Jul 30 21:23:25 samserver systemd[1]: Starting Raise network interfaces...
Jul 30 21:23:25 samserver sh[1444]: Unknown interface eth0
Jul 30 21:23:25 samserver ifup[1450]: Unknown interface eth0
Jul 30 21:23:25 samserver systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 30 21:23:25 samserver systemd[1]: Failed to start Raise Network interfaces.
Jul 30 21:23:25 samserver systemd[1]: networking.service: Unit entered failed state.
Jul 30 21:23:25 samserver systemd[1]: networking.service: Failed with result 'exit-code'.

journalctl -cx (after service networking restart)

---- Unit networking.service has begun starting up.
Jul 30 21:23:25 samserver sh[1444]: Unknown interface eth0
Jul 30 21:23:25 samserver ifup[1450]: Unknown interface eth0
Jul 30 21:23:25 samserver systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 30 21:23:25 samserver systemd[1]: Failed to start Raise Network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit networking-service has failed.
Jul 30 21:23:25 samserver systemd[1]: networking.service: Unit entered failed state.
Jul 30 21:23:25 samserver systemd[1]: networking.service: Failed with result 'exit-code'.


Thank you so much for your time.

jeremy31
July 30th, 2016, 10:27 PM
Does substituting enp3s0 for eth0 in the interfaces file do anything?

darkod
July 30th, 2016, 10:43 PM
What did the lshw show for interface name:

sudo lshw -short | grep network

The thing is that since 16.04 the interfaces are usually not called eth0 any more, they have different names.

Also I see virbr0 in your output above. Is this machine virtual host or guest? Why does it have virbr0 interface?

mathematicalchromosomes
July 30th, 2016, 11:46 PM
What did the lshw show for interface name:

sudo lshw -short | grep network

The thing is that since 16.04 the interfaces are usually not called eth0 any more, they have different names.

Also I see virbr0 in your output above. Is this machine virtual host or guest? Why does it have virbr0 interface?



First, I believe virbr0-nic is from the Host Virtualization program I installed on setup.

Next.


So I did that command, as per your suggestion, and it came up with this:


/0/100/1c.2/0 enp3s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/1 virbr0-nic network Ethernet interface


Looking at jeremy31's reply, I replaced eth0 with enp3s0 in /etc/network/interfaces, and restarted the service - at least, until I gave up waiting. I rebooted instead, which gave me this:


[ OK ] Started XYZ Service
[ OK ] Started XYS Tasks.
[--.---] A start job is running for Raise network interfaces ( 3min 5s / 5min 6s)


After I waited the whole 5 minutes, I immediately commented out the device. So close!

Sidenote: every time I think I'm almost there...

darkod
July 31st, 2016, 12:07 AM
So, in /etc/network/interfaces now you have something like:

auto enp3s0
iface enp3s0 inet dhcp

I assume your home router issues dhcp so this machine can receive a lease?

Have you tried setting it up with static IP from your home network range? A server would usually have a static IP anyway.

mathematicalchromosomes
July 31st, 2016, 12:34 AM
My router does have DHCP, which was proven when I installed Ubuntu Server on a virtual machine - I was even able to ssh to it (the VM) from a completely separate computer.

Anyways, I followed what you said, and I still wasn't able to connect to the internet. Heck, I can't even ping the gateway IP before or after.

mathematicalchromosomes
July 31st, 2016, 02:54 AM
My computer didn't have the driver installed.

My Ethernet controller was Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 11) , and did not come with an out-of-the-box driver.

I had to download the source (http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168
RTL8111C/RTL8111CP/RTL8111D(L)
RTL8168C/RTL8111DP/RTL8111E
RTL8168E/RTL8111F/RTL8411
RTL8111G/RTL8111GUS/RTL8411B(N)
RTL8118AS), and even then I had some difficulty with my father.
However, we managed to make it, install it and get it up and running.

Thanks for all the help.