You are not logged in.

#1 2011-10-10 07:28:56

ricecake
Member
Registered: 2011-10-10
Posts: 4

DHCP doesn't run automatically

Hello,

Sorry for such a simple question.  I'm trying to install Arch on my laptop, and for starters I'm just trying to get ethernet to work.

When I ping a site I get the unknown host error.  After I manually run "dhcpcd eth0", I'm able to connect to the internet.  I have configured the network section of my /etc/rc.conf exactly like what is shown for DHCP connections.  Are there any other potential points of failure?  Is blanking the address / netmask / gateway enough to trigger DHCP, or is there something else I need to do?

HOSTNAME=raynor
interface=eth0
address=
netmask=
gateway=

Thanks,
Eric

Offline

#2 2011-10-10 07:40:40

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

Re: DHCP doesn't run automatically

https://wiki.archlinux.org/index.php/Be … NG_section

Set your hostname to your liking. This is the name of your computer. Whatever you put here, also put it in /etc/hosts.

Check your /etc/hosts.

Offline

#3 2011-10-10 07:50:01

ricecake
Member
Registered: 2011-10-10
Posts: 4

Re: DHCP doesn't run automatically

Thanks for your reply!

The 127.0.0.1 entry looks fine.

There's also another entry, which starts with ::1.  I'm not sure what this is about, would anybody be able to explain it?  That did not have my hostname after it, but adding it (or even commenting out the whole line) did not resolve the issue.

Offline

#4 2011-10-10 10:17:54

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,546

Re: DHCP doesn't run automatically

ricecake wrote:

There's also another entry, which starts with ::1.  I'm not sure what this is about, would anybody be able to explain it?

::1 is the IPv6 address of localhost

Offline

#5 2011-10-10 10:27:38

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: DHCP doesn't run automatically

Have you included 'network' in your DAEMONS array?

Offline

#6 2011-10-10 13:32:56

ricecake
Member
Registered: 2011-10-10
Posts: 4

Re: DHCP doesn't run automatically

::1 is the IPv6 address of localhost

Ah thanks.  I don't know too much about IPv6.

Have you included 'network' in your DAEMONS array?

Yes.  On startup I can also see it running ("Starting network..." or something like that).

Hm this is tough... I might get in touch with some people from my university in case it's a problem specific to our networks.

Offline

#7 2011-10-10 15:05:02

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: DHCP doesn't run automatically

Check your logs for dhcp-related messages.

Offline

#8 2011-10-10 15:57:51

ricecake
Member
Registered: 2011-10-10
Posts: 4

Re: DHCP doesn't run automatically

So, I did "cat /var/log/everything.log | grep dhcp".  My knowledge of the command line is fairly limited so let me know if there was a better way to do this!

These look interesting:

localhost dhcpcp[829]: eth0: waiting for carrier
localhost dhcpcp[829]: eth0: carrier acquired
localhost dhcpcp[829]: eth0: broadcasting for a lease
localhost dhcpcp[829]: eth0: timed out
[i'm assuming this is where i manually started dhcp]
localhost dhcpcp[902]: eth0: version 5.2.12 starting
localhost dhcpcp[902]: eth0: broadcasting for a lease
localhost dhcpcp[902]: eth0: offered 137.112.137.129 from 137.112.5.28
localhost dhcpcp[902]: eth0: checking for 137.112.137.129
localhost dhcpcp[902]: eth0: leased 137.112.137.129 for 3600 seconds
localhost dhcpcp[902]: eth0: forked to background, child pid 923

So.... it looks like it is initially starting, but that times out?  When I manually type in dhcpcd eth0 I see the second half of the above in console, and the whole process takes anywhere from 15-25 seconds.

Thanks for your help.

Offline

#9 2011-10-19 14:09:54

jmandawg
Member
Registered: 2011-10-19
Posts: 60

Re: DHCP doesn't run automatically

Did you ever get this fixed, i'm having the exact same issue.  I'm trying to get people at work to switch from ubuntu, but i'm having a hard time convincing them when i can't get the networking to automatically start.

Last edited by jmandawg (2011-10-19 14:11:22)

Offline

#10 2011-10-19 14:12:49

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

Re: DHCP doesn't run automatically

For some reason dhcpcd does not work for everyone - have you tried dhclient?

Offline

#11 2011-10-19 14:41:57

jmandawg
Member
Registered: 2011-10-19
Posts: 60

Re: DHCP doesn't run automatically

what's odd, is i put an echo in the /etc/rc.d/network script and it's running the exact same command i'm running from the commandline

dhcpcd eth0

When it gets run from the rc.d script it times out, when i run it manually from the commanline it works fine.


When run from the script, this is the output:

Oct 19 10:30:56 localhost dhcpcd[1174]: version 5.2.12 starting
Oct 19 10:30:56 localhost dhcpcd[1174]: eth0: waiting for carrier
Oct 19 10:30:58 localhost kernel: [  828.176125] bnx2 0000:01:00.0: eth0: NIC Copper Link is Up, 1000 Mbps full duplex
Oct 19 10:30:58 localhost dhcpcd[1174]: eth0: carrier acquired
Oct 19 10:30:58 localhost dhcpcd[1174]: eth0: broadcasting for a lease
Oct 19 10:31:26 localhost dhcpcd[1174]: timed out

When run manually from the commandline, this is the output:

Oct 19 10:31:42 localhost dhcpcd[1187]: version 5.2.12 starting
Oct 19 10:31:42 localhost dhcpcd[1187]: eth0: broadcasting for a lease
Oct 19 10:31:43 localhost dhcpcd[1187]: eth0: offered 177.18.58.191 from 177.18.61.18
Oct 19 10:31:43 localhost dhcpcd[1187]: eth0: acknowledged 177.18.58.191 from 177.18.61.18
Oct 19 10:31:43 localhost dhcpcd[1187]: eth0: checking for 177.18.58.191
Oct 19 10:31:48 localhost dhcpcd[1187]: eth0: leased 177.18.58.191 for 3600 seconds
Oct 19 10:31:48 localhost dhcpcd[1187]: forked to background, child pid 1209

Last edited by jmandawg (2011-10-19 14:52:43)

Offline

#12 2011-10-19 18:00:38

cyberscan
Member
Registered: 2011-10-18
Posts: 10

Re: DHCP doesn't run automatically

the network init script is old fashion. try networkmanager

Offline

#13 2011-10-19 22:19:07

ratzfatz
Member
From: KL, Germany
Registered: 2011-06-03
Posts: 30

Re: DHCP doesn't run automatically

you can add this line to your /etc/sudoers file as root

your_user_name ALL=NOPASSWD:/sbin/dhcpcd

an add the command

sudo dhcpcd eth0

to the list of startup-applications of your WM. Maybe you have to install "sudo".


regars ratzfatz


The common language in modern science is broken english wink

Offline

#14 2011-10-19 22:24:09

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: DHCP doesn't run automatically

ratzfatz wrote:

you can add this line to your /etc/sudoers file as root

Only to make this sure:
You must use visudo as editor tool (running it as root) if you want to change /etc/sudoers.


To know or not to know ...
... the questions remain forever.

Offline

#15 2011-11-28 03:32:18

jughead
Member
Registered: 2011-11-28
Posts: 2

Re: DHCP doesn't run automatically

My first post to Arch ... ever !  I never had to write before, everything has been flawless with Arch, & for many, many years.  But now I have an issue with WiFi & just like this one here. Sure, I can start up WiFi by running a manual script ... but ... sitting around the table this Thanksgiving with several other engineers, the talk turned to Linux, & the fact that in every distro tested ... suddenly WiFi does not work. It became the talk of our holiday event. We admit, we are hardware engineers ... IC Si Designers. But we use Linux daily to make the Si work. We wanted to ask if anyone is investigating what seems to be a wide-spread systemic issue/event.

Offline

#16 2011-11-28 19:37:17

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,020

Re: DHCP doesn't run automatically

No problem here, and i update daily .

06:02.0 Ethernet controller: Atheros Communications Inc. AR2413 802.11bg NIC (rev 01)

for those with the dhcp time outs :
Check what is between your device and the dhcp server (switches and especially routers) .
i've seen similar problems on networks where the dhcp server and it's clients were in separate subnets.
In that case the router taking care of the subnet your in will need to learn the route to the subnet the dhcp server is in.

Many routers have only limited space for routing tables, and discard less used routes.


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

#17 2011-12-03 04:49:42

jughead
Member
Registered: 2011-11-28
Posts: 2

Re: DHCP doesn't run automatically

I am the greatest fan of Arch ... I have been committed to Arch for many ... many years ... but driving people to install WinDoze 7 ... especially newbies to fail ... is not the answer. If you read, that is what happened here. My Evidence ... https://bugs.archlinux.org/task/20078 & that is the same feedback I got in November from other long time Linux installers. I was told that people were FORCED to revert to Windows. That is now the message I would encourage. This is an induced issue outside of Arch, but I hoping we will address it.

Offline

#18 2011-12-04 00:29:18

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,020

Re: DHCP doesn't run automatically

some tips for future reference  :

1. chances are the problem is with a specific brand or model of wireless/network card, always include that info (lspci) in posts / bug reports

2. if dhcpcd doesn't work, try dhclient

3. use netcfg to configure wireless connections (check wiki)
    netcfg is easy to configure and it will give wpa_supplicant the necessary parameters.


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

Board footer

Powered by FluxBB