You are not logged in.

#1 2017-12-14 16:28:52

Evergreen
Member
Registered: 2016-08-14
Posts: 16

Network is unreachable: link not ready

My internet connection has suddenly stopped working and if I ping my gateway, I get

 connect: Network is unreachable

I have a static ip profile defined in netctl. It used to work fine and I don't know exactly when it stopped working. I recently did a pacman system update, but linux versions do match.

 pacman -Q linux; uname -r 
linux 4.14.4-1
4.14.4-1-ARCH

Sorry if I am not organising the data properly. When I start linux, the ethernet interface enp0s25 is down and the lights don't blink near my ethernet cable connected to the desktop cpu. If I do "sudo ip link set enp0s25 up", the interface shows state UP, the lights start blinking but still I can't ping my gateway.

Here's the output of netctl status <profile>, systelctl --failed, and ip link (just after booting).

> netctl list
      ethernet-static
>netctl status ethernet-static
      netctl@ethernet\x2dstatic.service  -  A basic static ethernet connection
      Loaded:  loaded (/etc/systemd/system/netctl@ethernet\x2dstatic.service; enabled; vendor preset: disabled)
      Active:  failed (Result: exit-code) since ...
      Docs:   man:netctl.profile(5)
      Process:  383  Execstart=/usr/lib/netctl/network start ethernet-static (code=exited, status=1/FAILURE)
      Main PID:   383 (code=exited, status=1/FAILURE)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

>systemctl  --failed

UNIT                                                   LOAD           ACTIVE           SUB                Description
------------------------------------------------------------------------------------------------------------------------------------------------------
netctl@ethernet\x2dstatic.service     loaded             failed             failed            A basic static ethernet connection

> ip link

1:  lo: <LOOPBACK, UP, LOWER_UP> mtu    65536    qdisc       noqueue   state   UNKNOWN    mode   DEFAULT      group   default       qlen      1000
link/loopback 00:00:00:00:00:00      brd    00:00:00:00:00:00

2:  enp0s25: <BROADCAST, MULTICAST>  mtu    1500    qdisc    fq_code1   state   DOWN    mode   DEFAULT      group   default       qlen      1000
link/ether 00:22:4d:b0:a3:7e      brd    ff:ff:ff:ff:ff:ff


> ping 10.130.3.1
connect: Network is unreachable

A few lines from journalctl -xe , that may be related

network[383]: Starting network profile 'ethernet-static'
kernel: IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
network[383]: No connection found on interface 'enp0s25' (timeout)
network[383]: Failed to bring the network up for profile 'ethernet-static'
systemd[1]: netctl@ethernet\x2dstatic.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: netctl@ethernet\x2dstatic.service: Failed with result 'exit-code'
systemd[1]: Failed to start A basic static ethernet connection
-- Subject: Unit netctl@ethernet\x2dstatic.service has failed
--Defined-By: systemd
--Support: https://lists.freedesktop.org/mailman/l … temd-devel
--
--Unit netctl@ethernet\x2dstatic.service has failed
--
--The result is RESULT.
kernel: e1000e: enp0s25 NIC Link is down
systemd[1]: Reached target Network.
--Subject: Unit network.target has finished start-up
--Defined-By: systemd
--Support: https://lists.freedesktop.org/mailman/l … temd-devel
--
--Unit network.target has finished starting up
--
--The start-up result is RESULT

Last edited by jasonwryan (2017-12-16 17:55:09)

Offline

#2 2017-12-14 16:52:04

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Network is unreachable: link not ready

First, post the text; don't post pictures of the text.  I do realize that is a challenge without a working Internet.

Disable netctl for now.  After boot, just try sudo dhcpcd and see what happens.  If that does not work, force it up the way you described and see what happens.  If that does not work, run dhcpcd again.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2017-12-16 05:50:24

Evergreen
Member
Registered: 2016-08-14
Posts: 16

Re: Network is unreachable: link not ready

I disabled netctl using

sudo netctl disable ethernet-static
sudo systemctl stop netctl@ethernet\x2dstatic.service

I did sudo dhcdcd

sudo dhcpcd
dev: loaded udev
no interfaces have a carrier
forked to background, child pid 1296

Checked if internet was accessible. It wasn't.
Checked if interface was up. It was. So didn't force it up and reran sudo dhcpcd.

sudo dhcpcd
sending commands to master dhcpcd process

Checked for internet connection, and it is working!!!

Can you explain what happened? Why did it stop working and what made it start working again? Also, it's my lab machine and I am supposed to have a static ip. Why is dhcp working? How do I go back to making netctl work with my static profile?

Last edited by Evergreen (2017-12-16 05:51:05)

Offline

#4 2017-12-16 08:56:38

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: Network is unreachable: link not ready

It's up because you set it up previously (after the failed netctl connect)
It works because there's a dhcp server in your network.
It seems to have failed for "no interfaces have a carrier" what, unless you/netctl screwed up your interface beyond the UP state (and eg. the router rejecting a lease),  means a cable/plug issue.

Post your netctl profile, but you can also have a static IP using dhcpcd
https://wiki.archlinux.org/index.php/Dh … ic_profile

it's my lab machine and I am supposed to have a static ip

This sounds like you don't control the entire network and then it's nonsensical.
If you need an expectable IP distribution, the sane thing is to bind MAC addresses to IPs in the dhcp server (static ip setup in the router), otherwise you easily run into a running gag of the three stooges (hint: "door")

Offline

#5 2017-12-16 15:27:54

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

Re: Network is unreachable: link not ready

Edit: A moderator moved my post to this thread. Thanks moderator! smile

I updated my system today and my ethernet does not connect automatically any more. I have a basic netctl profile for ethernet:

Description='A basic dhcp ethernet connection'
Interface=enp0s25
Connection=ethernet
IP=dhcp

And that used to work without any problems so far. Now, when I reboot, the interface enp0s25 stays DOWN (according to ip link) and I cannot access the network (or the internet for that matter).

Now, when I run

dhcpcd enp0s25

I can use the network normally. So it seems that something is afoul with DHCP.

When I run

sudo netctl restart lan

I get the following journal output:

-- Unit netctl@lan.service has begun starting up.
Dez 16 16:13:56 moonbase network[623]: Starting network profile 'lan'...
Dez 16 16:13:56 moonbase kernel: IPv6: ADDRCONF(NETDEV_UP): enp0s25: link is not ready
Dez 16 16:14:01 moonbase network[623]: No connection found on interface 'enp0s25' (timeout)
Dez 16 16:14:01 moonbase kernel: e1000e: enp0s25 NIC Link is Down
Dez 16 16:14:01 moonbase network[623]: Failed to bring the network up for profile 'lan'
Dez 16 16:14:01 moonbase systemd[1]: netctl@lan.service: Main process exited, code=exited, status=1/FAILURE
Dez 16 16:14:01 moonbase systemd[1]: netctl@lan.service: Failed with result 'exit-code'.
Dez 16 16:14:01 moonbase systemd[1]: Failed to start A basic dhcp ethernet connection.
-- Subject: Unit netctl@lan.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Do you think that "link is not ready" is a problem here?

I noticed that there was a kernel update today on my system. Which could cause problems with networking. But that is just a guess.

Any idea what happened here?

Last edited by essence-of-foo (2017-12-16 19:59:54)

Offline

#6 2017-12-16 17:53:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Network is unreachable: link not ready

Merging with existing thread...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2017-12-17 09:26:44

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

Re: Network is unreachable: link not ready

Thanks for moving! I wasn't aware of the other thread.

I still haven't found out what the problem is. But maybe this helps: I edited the scripts for dhcpcd and dhclient in /usr/lib/netctl/dhcp so that they create additional output in /tmp. But no output is produced which implies that netctl does not even attempt to run DHCP discovery.

Offline

#8 2017-12-17 20:42:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Offline

#9 2017-12-19 20:44:59

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

Re: Network is unreachable: link not ready

Yes! And with the newest kernel the issue is solved for me.

Thanks everyone!

Offline

Board footer

Powered by FluxBB