Why Does Linux Mint Not Connect to the Internet Through Ethernet Cable?

Why Does Linux Mint Not Connect to the Internet Through Ethernet Cable?

Aus irgendeinem Grund konnte mein Linux Mint v20.1 über das angeschlossene Ethernet-Kabel keine Verbindung zum Internet herstellen. Ich weiß, dass das Ethernet-Kabel nicht das Problem ist, da es mit anderen Computern funktioniert. Dieser Computer funktionierte vor ein paar Tagen auch mit dem Ethernet-Kabel. Der Ethernet-Port leuchtet orange, was bedeutet, dass es sich nicht um ein externes Problem handelt, da es erkannt wird. Dies ist die Ausgabe von lspci (für Broadcom):

02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)

Dies ist die Ausgabe von lsmod (für tg3):

tg3      172032  0

And when I tell system log with this command to report that the card has been initialized there is no output:

dmesg | grep ether

This is also has no output:

dmesg | grep -i eno1

But this does, meaning (I think) that the cable is called eth0:

dmesg | grep eth0

The output (I have to type this out so I am going to use some imaginary variables) x = [ 1.629770] y = 0000:02:00.0

x tg3 y eth0: Tigon3 [partno(BCM57780) rev 57780001] (PCI Express) MAC address 14:fe:b5:df:5a:0c
x tg3 y eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
x tg3 y eth0: dma_rwctrl[76180000] dma_mask[64-bit]
x tg3 y enp2s0: renamed from eth0

but actually, it has been renamed to enp2s0. So I tried this:

ifconfig enp2s0

Output:

enp2s0: flags=4098<BROADCAST,MULTICAST> mtu 1500
     ether 14:fe:b5:df:5a:0c txqueuelen 1000 (Ethernet)
     RX packets 0 bytes 0 (0.0B)
     RX error - dropped 0 overruns 0   frame 0 
     TX packets 0 bytes 0 (0.0B)
     TX errors 0 dropped 0 overruns 0   carrier 0   collisions 0 
     device interrupt 16

This is a remade version of my original post: Why Won't Linux Mint Connect With Ethernet?

I added a lot more information that will hopefully help with figuring out the issue.

Antwort1

Okay, I think you found it. This means that the card is installed and recognized:

enp2s0: flags=4098<BROADCAST,MULTICAST> mtu 1500
     ether 14:fe:b5:df:5a:0c txqueuelen 1000 (Ethernet)
     RX packets 0 bytes 0 (0.0B)
     RX error - dropped 0 overruns 0   frame 0 
     TX packets 0 bytes 0 (0.0B)
     TX errors 0 dropped 0 overruns 0   carrier 0   collisions 0 
     device interrupt 16

But notice that there is no IP address listed? This means that the ethernet card is not configured. You need to enter a configuration using either NetworkManager, netplan, or whatever system your distro is using.

To quickly check whether it's working you can configure it manually (here I assume you have a router at 192.168.1.1 and you can use the 192.168.1.137 address):

ifconfig enp2s0 192.168.1.137 netmask 255.255.255.0
route add -net default gw 192.168.1.1

Now you should be able to ping 192.168.1.1 and, if Internet is connected, something farther like one of the Google nodes at 8.8.8.8.

You may want to do a

grep -r eth0 /etc

to see whether there is a configuration extant, it's simply not working because it uses the old eth0 moniker instead of the enp2s0.

verwandte Informationen