having to run dhcpcd twice to get an IP

having to run dhcpcd twice to get an IP

Post by Alex » Wed, 05 Dec 2001 12:35:47



hello!

when i boot my computer (slackware8) and it tries to fetch an IP
through dhcpcd it just hangs and waits, as if there was no server, and
says:
dhcpcd[74]: timed out waiting for a valid DHCP server response

but when i run it manually once more from the prompt after that, it
works.
what could be the problem?

  / alex k

 
 
 

1. dhcpcd gets dynamic IP and nameserver

Debian's dhcpcd .70-5 deb pkg wasn't working with my Intel eth0
and potato kernel 2.1.125 so I couldn't get a DSL account. Now I'm set,
thanks to Sergei Viznyuk. /etc/dhcpc/ has a file written by dhcpcd
which has my IP and the DNS nameserver assigned by ISP.

To get your IP assigned dynamically as by dial-up or ADSL or
cable modem, and to find out nameserver IP's--it's also necessary
to upgrade dhcpcd for kernels 2.1.125 and up, and for certain
netcards such as Intel--

ftp://phystech.com/pub

get the latest dhcpcd dhcp client by Sergei Viznyuk [applause, cheers]
which today is 1.3.17-pl2

untar ungzip cd

make ;  make install

Now you have /sbin/dhcpcd

Get your old dhcpcd out of the way--it was /usr/sbin/dhcpcd

In Debian it seemed logical to load dhcpcd using /etc/init.d/network
script--
most of this varies according to site-- "dhcpcd -h username" wasn't
working
from /etc/init.d/dhcpc script's line using start-stop-daemon, so--

#! /bin/sh
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
ISP_USER_ID=username
ifconfig lo 127.0.0.1
route add -net 127.0.0.0 netmask 255.0.0.0 lo

if dhcpcd -h $ISP_USER_ID -d eth0 ; then

  echo -n "DHCP succeeded..."
  logger  "DHCP succeeded..."
else
  echo -n "DHCP failed..."
  logger  "DHCP failed... "
  IPADDR=192.168.1.2
  NETMASK=255.255.255.0
  NETWORK=192.168.1.0
  BROADCAST=192.168.1.255
  GATEWAY=192.168.1.1
  ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
  route add ${NETWORK} famlan
  [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
fi

-Bob Dodds

2. IP address to hostname

3. dhcpcd-0.6 - DHCP client daemon, gets client IP address and more

4. Debian killed my floppy drive!

5. Problem getting IP address via dhcpcd from Win2k server

6. fetchmail

7. getting IP address from dhcpcd

8. unaligned trap while executing gs

9. Problem getting DHCPCD running properly

10. run script on IP change (with dhcpcd)

11. Getting around having to be root to run PPP