You are not logged in.

#1 2014-09-14 22:25:35

gladixy
Member
Registered: 2014-03-12
Posts: 15

[Solved] Can't get netctl working with ethernet/dhcp

I'm trying to use netctl with the example file for dhcp:

Description='A basic dhcp ethernet connection'
Interface=enp0s25
Connection=ethernet
IP=dhcp
## for DHCPv6
#IP6=dhcp
## for IPv6 autoconfiguration
#IP6=stateless

Starting this profile results in:

A dependency job for netctl@ethernet\x2ddhcp.service failed. See 'journalctl -xn' for details.
journalctl -xn

-- Logs begin at Sat 2014-09-13 19:32:03 CEST, end at Mon 2014-09-15 02:17:52 CEST. --
Sep 15 02:16:07 toms_machine sudo[2768]: pam_unix(sudo:session): session closed for user root 
Sep 15 02:16:07 toms_machine dhcpcd[990]: exited
Sep 15 02:16:22 toms_machine sudo[2772]: ben : TTY=pts/2 ; PWD=/etc/netctl ; USER=root ; COMMAND=/usr/bin/netctl start ethernet-dhcp
Sep 15 02:16:22 toms_machine sudo[2772]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 15 02:17:52 toms_machine systemd[1]: Job sys-subsystem-net-devices-eth0.device/start timed out. 
Sep 15 02:17:52 toms_machine systemd[1]: Timed out waiting for device sys-subsystem-net-devices-eth0.device.
-- Subject: Unit sys-subsystem-net-devices-eth0.device has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sys-subsystem-net-devices-eth0.device has failed.
-- 
-- The result is timeout.
Sep 15 02:17:52 toms_machine systemd[1]: Dependency failed for A basic dhcp ethernet connection.
-- Subject: Unit netctl@ethernet\x2ddhcp.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit netctl@ethernet\x2ddhcp.service has failed.
-- 
-- The result is dependency.

Note it is saying something about eth0 while ip link is resulting in

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 28:d2:44:52:2e:ad brd ff:ff:ff:ff:ff:ff
3: wlp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 5c:51:4f:fb:7b:51 brd ff:ff:ff:ff:ff:ff

Obviously there is no eth0. How can I set things up using the interface name "enp0s25"? By the way using dhcpcd works so there is no problem with the phsyical connection.

Last edited by gladixy (2014-09-18 12:00:15)

Offline

#2 2014-09-18 12:00:00

gladixy
Member
Registered: 2014-03-12
Posts: 15

Re: [Solved] Can't get netctl working with ethernet/dhcp

I solved the problem by replacing

/etc/systemd/system/netctl\@ethernet\\x2ddhcp.service

.include /usr/lib/systemd/system/netctl@.service

[Unit]
Description=A basic dhcp ethernet connection
BindsTo=sys-subsystem-net-devices-eth0.device
After=sys-subsystem-net-devices-eth0.device

with

.include /usr/lib/systemd/system/netctl@.service

[Unit]
Description=A basic dhcp ethernet connection
BindsTo=sys-subsystem-net-devices-enp0s25.device
After=sys-subsystem-net-devices-enp0s25.device

I'm not sure whether this is the best way to solve the problem. If somebody knows a better solution it would not hurt to post it here.

Offline

Board footer

Powered by FluxBB