Network interface down - how to turn it on again?

Kernels & Hardware, configuring network, installing services

Network interface down - how to turn it on again?

Postby Deb-bot-001 » 2020-03-26 21:59

My stretch system has been working fine until recently. I think it was after an upgrade, that I noticed that I couldn't see the system on my LAN. Then I noticed that even my router didn't show it connecting.

When I use ip link show the network interface (enp0s25) shows, but has it's status shows as "Down". If I use ip link set enp0s25 up I don't get any errors (either cli or in dmesg), but even after restarting networking, it still shows as down.

lspci shows the network interface as Intel 82567LM-3 ethernet controller.

if link show shows it with the following line:
Code: Select all
enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000


Pinging 127.0.0.1 works fine as normal, but pinging other addresses, such as the router just shows "Connect: network is unreachable"

I'm using Debian 9 Stretch, updated until fairly recently

I've tried:
  • Changing the ethernet cable
  • Rebooting both the router and my Debian box.
  • Removing /etc/network/interfaces and rebooting to restore it to default
  • Grepped dmesg for eth and enp0s25 without finding errors

And yes, I've read the ip man page, done a web search and a search on these forums. The results I found were either outdated, using ifconfig, or just suggested using the command I tried above.

Any ideas on how to get the network interface up again?
Deb-bot-001
 
Posts: 2
Joined: 2020-03-26 20:31

Re: Network interface down - how to turn it on again?

Postby Head_on_a_Stick » 2020-03-27 08:49

Deb-bot-001 wrote:if link show shows it with the following line:
Code: Select all
enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000


The interface is up but not connected, confirm this with
Code: Select all
ip link show up

You need to assign an IP address and define a default route, for example:
Code: Select all
# dhclient enp0s25

Or:
Code: Select all
# ip address add 10.0.2.15/24 dev enp0s25
# ip route add default via 10.0.2.2

Modify the above addresses to match your local network (the "default" will usually be your router's IP address).

If you want to bring your network up with Debian's ifupdown scripts then see https://wiki.debian.org/NetworkConfigur ... _Interface & https://wiki.debian.org/NetworkConfigur ... ameservers

Deb-bot-001 wrote:My stretch system has been working fine until recently. I think it was after an upgrade

Debian (old)stable shouldn't change like that, have you polluted your sources?
Code: Select all
apt policy
User avatar
Head_on_a_Stick
 
Posts: 11454
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Network interface down - how to turn it on again?

Postby Deb-bot-001 » 2020-03-27 23:23

OMG, thank you so much @Head_on_a_Stick, I was really lost and your suggestions were *really* useful.

In that last part, I'm assuming the first IP address is the IP address, I want my machine to request and the second is the IP of the router, right?

That's what I went with, and now the state of the interface is showing as "up" and ip link show seems to suggest that the interface has the IP address I wanted. My Debian box is also showing up on the router's ARP/RARP table, but still doesn't show up on the DHCP table and trying to ping any external domain or even the router still says "Destination to host unreachable."

I have a feeling though that these issues may be a configuration issue rather than a Debian issue.
Deb-bot-001
 
Posts: 2
Joined: 2020-03-26 20:31

Re: Network interface down - how to turn it on again?

Postby Head_on_a_Stick » 2020-03-28 17:02

Deb-bot-001 wrote:In that last part, I'm assuming the first IP address is the IP address, I want my machine to request and the second is the IP of the router, right?

That's correct.

Deb-bot-001 wrote:trying to ping any external domain or even the router still says "Destination to host unreachable."

Try dhclient(8) instead, that will assign address for you (and also provide a working nameserver).
User avatar
Head_on_a_Stick
 
Posts: 11454
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable