You are not logged in.

#1 2013-07-21 22:28:28

tadetter
Member
Registered: 2013-07-21
Posts: 3

netctl fails with "link is not ready"

Hi all

I was hoping that you can help me out! I'm new to archlinux so please accept my apologies if I've missed something obvious.

I've just setup a new archlinux system on my HP N40L according to the archwiki beginner's guide and this btrfs guide.

I want to automatically connect to the internet with a static ip via ethernet cable.

netctl setup

cp /etc/netctl/examples/ethernet-static /etc/netctl/ethernet
nano /etc/netctl/ethernet
netctl start ethernet

netctl profile

Description='A basic static ethernet connection'
Interface=enp2s0
Connection=ethernet
IP=static
Address=('192.168.1.212/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.1'
DNS=('62.24.128.17')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

journalctl output

Jul 21 21:52:50 arch network[340]: Starting network profile 'ethernet'...
Jul 21 21:52:50 arch kernel: tg3 0000:02:00.0: irq 43 for MSI/MSI-X
Jul 21 21:52:51 arch kernel: IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
Jul 21 21:52:56 arch network[340]: No connection on interface 'enp2s0'
Jul 21 21:52:57 arch network[340]: Failed to bring the network up for profile 'ethernet'
Jul 21 21:52:57 arch systemd[1]: netctl@ethernet.service: main process exited, code=exited, status=1/FAILURE
Jul 21 21:52:57 arch systemd[1]: Failed to start A basic static ethernet connection.
Jul 21 21:52:57 arch systemd[1]: Unit netctl@ethernet.service entered failed state.

dmesg output for ethernet card module

[    4.576037] tg3.c:v3.130 (February 14, 2013)
[    4.621520] tg3 0000:02:00.0 eth0: Tigon3 [partno(BCM95723) rev 5784100] (PCI Express) MAC address a0:b3:cc:df:1e:7f
[    4.621526] tg3 0000:02:00.0 eth0: attached PHY is 5784 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
[    4.621530] tg3 0000:02:00.0 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
[    4.621533] tg3 0000:02:00.0 eth0: dma_rwctrl[76180000] dma_mask[64-bit]
[   31.196779] tg3 0000:02:00.0: irq 43 for MSI/MSI-X

I can connect if I use these commands so there's no physical problem with hardware.

ip link set enp2s0 up
ip addr add 192.168.1.200/24 dev enp2s0
ip route add default via 192.168.1.1

or

systemctl start dhcpcd@enp2s0

I also tried to bring the interface up first.

ip link set enp2s0 up
netctl start ethernet

journalctl output

Jul 21 22:00:47 arch network[438]: Starting network profile 'ethernet'...
Jul 21 22:00:47 arch network[438]: The interface of network profile 'ethernet' is already up
Jul 21 22:00:47 arch systemd[1]: netctl@ethernet.service: main process exited, code=exited, status=1/FAILURE
Jul 21 22:00:47 arch systemd[1]: Failed to start A basic static ethernet connection.

systemctl output

UNIT                        LOAD   ACTIVE SUB       DESCRIPTION
proc-sys...t_misc.automount loaded active waiting   Arbitrary Executable File Formats File System Automount Point
sys-devi...und-card0.device loaded active plugged   GF119 HDMI Audio Controller
sys-devi...et-enp2s0.device loaded active plugged   NC107i Integrated PCI Express Gigabit Server Adapter
sys-devi...-sda-sda1.device loaded active plugged   SAMSUNG_SSD_830_Series
sys-devi...-sda-sda2.device loaded active plugged   SAMSUNG_SSD_830_Series
sys-devi...block-sda.device loaded active plugged   SAMSUNG_SSD_830_Series
sys-devi...tty-ttyS0.device loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS0
sys-devi...tty-ttyS1.device loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS1
sys-devi...tty-ttyS2.device loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS2
sys-devi...tty-ttyS3.device loaded active plugged   /sys/devices/platform/serial8250/tty/ttyS3
sys-module-configfs.device  loaded active plugged   /sys/module/configfs
sys-subs...es-enp2s0.device loaded active plugged   NC107i Integrated PCI Express Gigabit Server Adapter
-.mount                     loaded active mounted   /
dev-hugepages.mount         loaded active mounted   Huge Pages File System
dev-mqueue.mount            loaded active mounted   POSIX Message Queue File System
sys-kernel-config.mount     loaded active mounted   Configuration File System
sys-kernel-debug.mount      loaded active mounted   Debug File System
tmp.mount                   loaded active mounted   Temporary Directory
systemd-...ord-console.path loaded active waiting   Dispatch Password Requests to Console Directory Watch
systemd-...ssword-wall.path loaded active waiting   Forward Password Requests to Wall Directory Watch
dbus.service                loaded active running   D-Bus System Message Bus
getty@tty1.service          loaded active running   Getty on tty1
netctl@ethernet.service     loaded failed failed    A basic static ethernet connection
sshd.service                loaded active running   OpenSSH Daemon
systemd-journald.service    loaded active running   Journal Service
systemd-logind.service      loaded active running   Login Service
systemd-remount-fs.service  loaded active exited    Remount Root and Kernel File Systems
systemd-sysctl.service      loaded active exited    Apply Kernel Variables
systemd-...es-setup.service loaded active exited    Recreate Volatile Files and Directories
systemd-...-trigger.service loaded active exited    udev Coldplug all Devices
systemd-udevd.service       loaded active running   udev Kernel Device Manager
systemd-update-utmp.service loaded active exited    Update UTMP about System Reboot/Shutdown
systemd-...sessions.service loaded active exited    Permit User Sessions
systemd-...le-setup.service loaded active exited    Setup Virtual Console
dbus.socket                 loaded active running   D-Bus System Message Bus Socket
dmeventd.socket             loaded active listening Device-mapper event daemon FIFOs
lvmetad.socket              loaded active listening LVM2 metadata daemon socket
systemd-initctl.socket      loaded active listening /dev/initctl Compatibility Named Pipe
systemd-journald.socket     loaded active running   Journal Socket
systemd-shutdownd.socket    loaded active listening Delayed Shutdown Socket
systemd-...d-control.socket loaded active listening udev Control Socket
systemd-udevd-kernel.socket loaded active running   udev Kernel Socket
basic.target                loaded active active    Basic System
cryptsetup.target           loaded active active    Encrypted Volumes
getty.target                loaded active active    Login Prompts
graphical.target            loaded active active    Graphical Interface
local-fs-pre.target         loaded active active    Local File Systems (Pre)
local-fs.target             loaded active active    Local File Systems
multi-user.target           loaded active active    Multi-User System
network.target              loaded active active    Network
paths.target                loaded active active    Paths
remote-fs.target            loaded active active    Remote File Systems
sockets.target              loaded active active    Sockets
sound.target                loaded active active    Sound Card
swap.target                 loaded active active    Swap
sysinit.target              loaded active active    System Initialization
timers.target               loaded active active    Timers
systemd-...iles-clean.timer loaded active waiting   Daily Cleanup of Temporary Directories

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

58 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

My modem router (192.168.1.1) handles DNS and DHCP (192.168.1.2 - 192.168.1.254).
I tried change the address pool to 192.168.1.2 - 192.168.1.253 and setting my computer's ip to 192.168.1.254 to avoid possible conflicts but this made no difference.
I have only installed packages from the base group and the packages openssh, amd-ucode and btrfs-progs.

thanks for the help - hopefully it's something simple I've missed

EDIT

I've found out that the following works

pacman -S ifplugd
systemctl start netctl-ifplugd@enp2s0.service

does anyone know why the beginner's guide wasn't working for me? is there a bug with netctl?

Last edited by tadetter (2013-07-22 22:11:17)

Offline

#2 2013-07-22 12:29:14

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: netctl fails with "link is not ready"

I've had a similar problem not long ago, solved it by usng a custom service file as described here :
https://wiki.archlinux.org/index.php/Ne … IP_address


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2013-07-22 19:30:02

tadetter
Member
Registered: 2013-07-21
Posts: 3

Re: netctl fails with "link is not ready"

Thanks for the pointer Lone_Wolf.

I've opted for the method you linked to as it means I can remove netctl and ifplugd.

[Unit]
Description=Wired Static IP Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-enp2s0.device
After=sys-subsystem-net-devices-enp2s0.device

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/ip link set dev enp2s0 up
ExecStart=/usr/bin/ip addr add 192.168.1.254/24 dev enp2s0
ExecStart=/usr/bin/ip route add default via 192.168.1.1

ExecStop=/usr/bin/ip addr flush dev enp2s0
ExecStop=/usr/bin/ip link set dev enp2s0 down

[Install]
WantedBy=multi-user.target

I guess this is a solution sorts, although the original issue remains unsolved.

Is it worth cross posting to netctl on git?

Last edited by tadetter (2013-07-22 22:11:38)

Offline

#4 2013-07-22 19:36:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: netctl fails with "link is not ready"

tadetter, when pasting code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Offline

#5 2013-07-22 22:12:25

tadetter
Member
Registered: 2013-07-21
Posts: 3

Re: netctl fails with "link is not ready"

ah ok oops - Thanks I've updated my post

Last edited by tadetter (2013-07-22 22:12:36)

Offline

#6 2015-02-28 18:53:09

xanb
Member
Registered: 2012-07-24
Posts: 418

Re: netctl fails with "link is not ready"

It happens to me too. I think to switch to OpenRC (again). For me  The  Beginner's Guide works but netctl and wifi-menu don't.

Last edited by xanb (2015-02-28 18:54:08)


Owning one OpenRC (artoo way) and other three systemd machines

Offline

Board footer

Powered by FluxBB