You are not logged in.

#1 2013-04-22 11:51:51

acgtyrant
Member
From: Hangzhou, China
Registered: 2013-04-09
Posts: 65
Website

[Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

I have a Ethernet connection with DHCP to my router, but everytime I boot into Arch, it wouldn't connect to network via dhcp automatically.

So I have to run two command firstly after boot into arch so that it can connect to network:

systemctel enable dhcpcd@eth0.service
dhcpcd

How to solve it? Forgive my poor English, thank you!

Last edited by acgtyrant (2013-04-22 12:40:46)


I use Arch Linux.

Offline

#2 2013-04-22 12:14:04

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

I use dhcp <network interface>.
Its easier.

Offline

#3 2013-04-22 12:18:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,484
Website

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

Several issues:

1) the "enable" command is not needed before running dhcpcd manually.  Enable enables it to run automatically for the next boot, which is clearly not working, possibly for reasons under #2.

2) that should be systemctl, not systemctel.  It could be a typo on the forums, but you have it in both the title and the text - that's not the actual command you are using is it?

3) is your interface named eth0? Or might it be enpS...?  Check with `ip link`.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2013-04-22 12:39:35

acgtyrant
Member
From: Hangzhou, China
Registered: 2013-04-09
Posts: 65
Website

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

@hadrons123 It is useful, but it can't run dhcpcd automatically for the netxt boot.

@Trilby OMG! I had check my network interface by `lspci | grep eth` before, it showed it is eth0. However, I found my interface is named enp3s0 actually when I execute `ip link`.

So `systemctl enable dhcpcd@enp3s0.service` solved my issue.

Sorry for my typo on the forums, thank you!


I use Arch Linux.

Offline

#5 2013-04-22 14:53:10

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

Well dhcp doesn't need to be invoked manually on every boot. Its works automatically for me.

Offline

#6 2013-04-22 15:12:50

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

acgtyrant wrote:

@Trilby OMG! I had check my network interface by `lspci | grep eth` before, it showed it is eth0. However, I found my interface is named enp3s0 actually when I execute `ip link`.

So `systemctl enable dhcpcd@enp3s0.service` solved my issue.

That's predictive naming for you. Look it up on the wiki.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2013-04-22 15:19:10

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

hadrons123 wrote:

I use dhcp <network interface>.
Its easier.

Just for clarity's sake, this probably should be "dhcpcd <interface>". 

Dhcp is the protocol for automagic network configuration, but there are two parts to it.  The router/modem/whatever you're connecting to is running dhcpd (that is dhcp daemon), while your machine associates with the network device in question, and runs dhcpcd on that interface (dhcp client daemon)

Offline

#8 2013-04-23 04:51:18

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [Solved]systemctel enable dhcpcd@eth0.service doesn't work auto...

thanks for the clarification!

Offline

Board footer

Powered by FluxBB