# dhcpcd problems

## tommoyer324

I have just finished installing gentoo on my iBook G4 and for some reason dhcpcd doesn't want to work.  I re-emerged dhcpcd with debugging on to see what is happening and this is what I get in an endless loop

```

parseDhcpMsgRecv: 7 options received:

i=1   len=4   option = 255.255.255.0

i=3   len=4   option = 192.168.0.1

i=6   len=4   option = 192.168.0.1

i=15  len=16  option = "local-genius.net"

i=51  len=4   option = -1

i=53  len=1   option = 2

i=54  len=4   option = 192.168.0.1

DhcpMsgRecv->yiaddr  = 192.168.0.101

DhcpMsgRecv->siaddr  = 0.0.0.0

DhcpMsgRecv->giaddr  = 0.0.0.0

DhcpMsgRecv->sname   = ""

ServerHardwareAddr   = 00.13.46.15.9E.F0

parseDhcpMsgRecv: 10 options received:

i=1   len=4   option = 255.255.255.0

i=3   len=4   option = 192.168.0.1

i=6   len=4   option = 192.168.0.1

i=15  len=16  option = "local-genius.net"

i=28  len=4   option = 192.168.0.255

i=51  len=4   option = -1

i=53  len=1   option = 5

i=54  len=4   option = 192.168.0.1

i=58  len=4   option = 0

i=59  len=4   option = 0

DhcpMsgRecv->yiaddr  = 192.168.0.101

DhcpMsgRecv->siaddr  = 0.0.0.0

DhcpMsgRecv->giaddr  = 0.0.0.0

DhcpMsgRecv->sname   = ""

ServerHardwareAddr   = 00.13.46.15.9E.F0

ClassID  = "Linux 2.6.16-gentoo-r9 ppc"

ClientID = "61.7.1.00.11.24.84.73.86"

```

looking at the dmesg output from this shows

```

eth0: Link is up at 100Mbps, full-duplex.

eth0: Pause is disabled

```

which repeats for quite a while

I can manully setup the interface, but would prefer to use dhpc as I also need dhcp for work.  The correct driver is compiled in.

----------

## cyblord

check this out:

https://forums.gentoo.org/viewtopic-t-466163-highlight-dhcp.html

----------

## tommoyer324

dhcpcd is installed and runs.  that is not my problem.  my problem is that dhcpcd appears to recieve dhpc information from my router, but never holds it.

----------

## cyblord

what does your /etc/conf.d/net file look like?

----------

## tommoyer324

```

config_eth0=( "dhcp" )

dhcp_eth0="nontp"

```

and i ran dhpcd -d eth0 for some more output and it showed this

```

Info, MAC address = 00:11:24:84:73:86

Debug, broadcasting DHCP_REQUEST for 192.168.0.101

Debug, broadcastAddr option is missing in DHCP server response. Assuming 192.168

.0.255

Debug, dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Debug, dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Debug, dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Debug, DHCP_ACK received from  (192.168.0.1)

Debug, broadcasting ARPOP_REQUEST for 192.168.0.101

Info, verified 192.168.0.101 address is not in use

Info, your IP address = 192.168.0.101

Debug, orig hostname = nash

Info, MAC address = 00:11:24:84:73:86

Debug, broadcasting DHCP_REQUEST for 192.168.0.101

Debug, broadcastAddr option is missing in DHCP server response. Assuming 192.168

.0.255

Debug, dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Debug, dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Debug, dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Debug, DHCP_ACK received from  (192.168.0.1)

Debug, broadcasting ARPOP_REQUEST for 192.168.0.101

Info, verified 192.168.0.101 address is not in use

Info, your IP address = 192.168.0.101

Debug, orig hostname = nash

```

is there any thing else that would be useful for debugging purposes

----------

## UberLord

dhcpcd doesn't work as a dhcp client when you emerge it with the debug use flag which is what you have done.

----------

## tommoyer324

 *Quote:*   

> I re-emerged dhcpcd with debugging on to see what is happening

 

I originally just emerged it without the debug flag on. I know that with the debug flag on it doesn't actually work, I was trying to provide the most information possible so I can get this fixed.  It might be worth noting that the LiveCD's dhcpcd worked fine.

----------

## tommoyer324

On a whim I emerged dhcpcd 2.0.3 and things worked fine.  I tried both 2.0.5 and 2.0.6 and neither one worked.  Should I file this as a bug here or upstream?

----------

## UberLord

I am upstream  :Smile:  Well, half of it anyway.

Do you have resolvconf-gentoo installed? Or /sbin/resolvconf ?

EDIT: Also, post the output of it running under strace

----------

## tommoyer324

I do not have resolvconf-gentoo or /sbin/resolvconf

I am currently emerging strace to produce that output for you.  For now I have masked dhcpcd-2.0.5 and 2.0.6 so that I can at least get the functionality that I need.

----------

## tommoyer324

Here is the strace output from running dhcpcd-2.0.5

```

execve("/sbin/dhcpcd", ["dhcpcd", "eth0"], [/* 33 vars */]) = 0

uname({sys="Linux", node="nash", ...})  = 0

brk(0)                                  = 0x1001d000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30017000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat64(3, {st_mode=S_IFREG|0644, st_size=22141, ...}) = 0

mmap(NULL, 22141, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30018000

close(3)                                = 0

open("/lib/libc.so.6", O_RDONLY)        = 3

read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\313"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=1307244, ...}) = 0

mmap(0xfeb0000, 1309604, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfeb0000

madvise(0xfeb0000, 1309604, MADV_SEQUENTIAL|0x1) = 0

mprotect(0xffd9000, 93092, PROT_NONE)   = 0

mmap(0xffe8000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x128000) = 0xffe8000

mmap(0xffee000, 7076, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffee000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3001e000

mprotect(0xffe8000, 8192, PROT_READ)    = 0

mprotect(0x30026000, 4096, PROT_READ)   = 0

munmap(0x30018000, 22141)               = 0

open("/dev/urandom", O_RDONLY)          = 3

read(3, "~\365\311\247", 4)             = 4

close(3)                                = 0

open("/dev/null", O_RDWR)               = 3

close(3)                                = 0

geteuid()                               = 0

umask(022)                              = 022

open("/var/run/dhcpcd-eth0.pid", O_RDONLY) = -1 ENOENT (No such file or directory)

rt_sigaction(SIGHUP, NULL, {SIG_DFL}, 8) = 0

rt_sigaction(SIGHUP, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGINT, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGQUIT, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGILL, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGTRAP, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGABRT, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGBUS, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGFPE, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGKILL, {0x10003160, [], 0}, NULL, 8) = -1 EINVAL (Invalid argument)

rt_sigaction(SIGUSR1, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGSEGV, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGUSR2, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGPIPE, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGALRM, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGTERM, {0x10003160, [], 0}, NULL, 8) = 0

rt_sigaction(SIGCHLD, {0x10003160, [], 0}, NULL, 8) = 0

mkdir("/var/lib/dhcpc", 0755)           = -1 EEXIST (File exists)

mkdir("/etc", 0755)                     = -1 EEXIST (File exists)

alarm(60)                               = 0

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0

socket(PF_PACKET, SOCK_PACKET, 3)       = 3

fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)

fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

fcntl64(3, F_GETFD)                     = 0

fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0

ioctl(3, SIOCGIFHWADDR, {ifr_name="eth0", ifr_hwaddr=00:11:24:84:73:86}) = 0

setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0

ioctl(3, SIOCGIFFLAGS, {ifr_name="eth0", ifr_flags=IFF_BROADCAST|IFF_NOTRAILERS|IFF_MULTICAST}) = 0

ioctl(3, SIOCSIFFLAGS, 0x7fd9a6d0)      = 0

ioctl(3, SIOCGIFHWADDR, {ifr_name="eth0", ifr_hwaddr=00:11:24:84:73:86}) = 0

setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0

ioctl(3, SIOCSIFFLAGS, 0x7fd9a6d0)      = 0

bind(3, {sa_family=AF_PACKET, proto=0x6574, if1747976192, pkttype=PACKET_HOST, addr(0)={0, }, 16) = 0

brk(0)                                  = 0x1001d000

brk(0x1003e000)                         = 0x1003e000

time([1150825175])                      = 1150825175

open("/etc/localtime", O_RDONLY)        = 4

fstat64(4, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

fstat64(4, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0"..., 131072) = 3519

close(4)                                = 0

munmap(0x30028000, 131072)              = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

getpid()                                = 22600

socket(PF_FILE, SOCK_DGRAM, 0)          = 4

fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0

connect(4, {sa_family=AF_FILE, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol wrong type for socket)

close(4)                                = 0

socket(PF_FILE, SOCK_STREAM, 0)         = 4

fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0

connect(4, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0

send(4, "<134>Jun 20 13:39:35 dhcpcd[2260"..., 68, MSG_NOSIGNAL) = 68

time(NULL)                              = 1150825175

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5

fcntl64(5, F_GETFD)                     = 0

fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0

setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0

bind(5, {sa_family=AF_INET, sin_port=htons(68), sin_addr=inet_addr("0.0.0.0")}, 16) = 0

fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0

open("/var/lib/dhcpc/dhcpcd-eth0.cache", O_RDONLY) = 6

read(6, "2.0.5\0\0\0\0\0\0\0\300\250\0e\300\250\0\1\0\0\0\32\0\0"..., 136) = 136

close(6)                                = 0

uname({sys="Linux", node="nash", ...})  = 0

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\0E\0\2@=\251"..., 590, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 590

gettimeofday({1150825175, 481227}, NULL) = 0

select(4, [3], NULL, NULL, {4, 76032})  = 1 (in [3], left {4, 76032})

recvfrom(3, "\377\377\377\377\377\377\0\23F\25\236\360\10\0E\0\2@\""..., 1554, 0, {sa_family=AF_FILE, path="eth0"}, [18]) = 594

gettimeofday({1150825175, 482160}, NULL) = 0

recvfrom(5, 0x7fd9a490, 512, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)

time(NULL)                              = 1150825175

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\6\0\1\10\0\6"..., 60, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 60

select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\6\0\1\10\0\6"..., 60, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 60

select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\6\0\1\10\0\6"..., 60, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 60

select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\6\0\1\10\0\6"..., 60, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 60

select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\6\0\1\10\0\6"..., 60, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 60

select(4, [3], NULL, NULL, {0, 50000})  = 0 (Timeout)

time([1150825175])                      = 1150825175

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

send(4, "<134>Jun 20 13:39:35 dhcpcd[2260"..., 81, MSG_NOSIGNAL) = 81

ioctl(3, SIOCSIFADDR, 0x7fd9a5f0)       = 0

ioctl(3, SIOCSIFNETMASK, 0x7fd9a5f0)    = 0

ioctl(3, SIOCSIFBRDADDR, 0x7fd9a5f0)    = 0

ioctl(3, SIOCDELRT, 0x7fd9a610)         = 0

ioctl(3, SIOCADDRT, 0x7fd9a610)         = 0

ioctl(3, SIOCADDRT, 0x7fd9a470)         = 0

sendto(3, "\377\377\377\377\377\377\0\21$\204s\206\10\6\0\1\10\0\6"..., 60, 0, {sa_family=AF_UNSPEC, sa_data="eth0\0\0\0\0\0\0\0\0\0\0"}, 16) = 60

time([1150825175])                      = 1150825175

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0

send(4, "<134>Jun 20 13:39:35 dhcpcd[2260"..., 68, MSG_NOSIGNAL) = 68

readlink("/etc/resolv.conf", 0x7fd9a4f8, 1) = -1 EINVAL (Invalid argument)

rename("/etc/resolv.conf", "/etc/resolv.conf-eth0.sv") = 0

stat64("/sbin/resolvconf", 0x7fd9a480)  = -1 ENOENT (No such file or directory)

open("/etc/resolv.conf", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

write(6, "# Generated by dhcpcd for interf"..., 88) = 88

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

gettimeofday({1150825175, 736256}, NULL) = 0

open("/etc/resolv.conf", O_RDONLY)      = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=88, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

read(6, "# Generated by dhcpcd for interf"..., 131072) = 88

read(6, "", 131072)                     = 0

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

socket(PF_FILE, SOCK_STREAM, 0)         = 6

fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)

fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)

close(6)                                = 0

socket(PF_FILE, SOCK_STREAM, 0)         = 6

fcntl64(6, F_GETFL)                     = 0x2 (flags O_RDWR)

fcntl64(6, F_SETFL, O_RDWR|O_NONBLOCK)  = 0

connect(6, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)

close(6)                                = 0

open("/etc/nsswitch.conf", O_RDONLY)    = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=503, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

read(6, "# /etc/nsswitch.conf:\n# $Header:"..., 131072) = 503

read(6, "", 131072)                     = 0

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

open("/etc/ld.so.cache", O_RDONLY)      = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=22141, ...}) = 0

mmap(NULL, 22141, PROT_READ, MAP_PRIVATE, 6, 0) = 0x30018000

close(6)                                = 0

open("/lib/libnss_files.so.2", O_RDONLY) = 6

read(6, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\36"..., 512) = 512

fstat64(6, {st_mode=S_IFREG|0755, st_size=43824, ...}) = 0

mmap(0xfe85000, 107920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0xfe85000

madvise(0xfe85000, 107920, MADV_SEQUENTIAL|0x1) = 0

mprotect(0xfe8f000, 66960, PROT_NONE)   = 0

mmap(0xfe9e000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x9000) = 0xfe9e000

close(6)                                = 0

mprotect(0xfe9e000, 4096, PROT_READ)    = 0

munmap(0x30018000, 22141)               = 0

open("/etc/host.conf", O_RDONLY)        = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=937, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

read(6, "# /etc/host.conf:\n# $Header: /va"..., 131072) = 937

read(6, "", 131072)                     = 0

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

open("/etc/hosts", O_RDONLY)            = 6

fcntl64(6, F_GETFD)                     = 0

fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0

fstat64(6, {st_mode=S_IFREG|0644, st_size=789, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

read(6, "# /etc/hosts:  This file describ"..., 131072) = 789

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

uname({sys="Linux", node="nash", ...})  = 0

open("/var/lib/dhcpc/dhcpcd-eth0.cache", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 6

write(6, "2.0.5\0\0\0\0\0\0\0\300\250\0e\300\250\0\1\0\0\0\32\0\0"..., 136) = 136

close(6)                                = 0

rename("/var/lib/dhcpc/dhcpcd-eth0.info", "/var/lib/dhcpc/dhcpcd-eth0.info.old") = 0

open("/var/lib/dhcpc/dhcpcd-eth0.info", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

write(6, "IPADDR=192.168.0.101\nNETMASK=255"..., 441) = 441

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x3001e048) = 22601

--- SIGCHLD (Child exited) @ 0 (0) ---

waitpid(-1, NULL, WNOHANG)              = 22601

sigreturn()                             = ? (mask now [])

alarm(0)                                = 60

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x3001e048) = 22602

open("/var/run/dhcpcd-eth0.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6

fstat64(6, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0

mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30028000

write(6, "22602\n", 6)                  = 6

close(6)                                = 0

munmap(0x30028000, 131072)              = 0

exit_group(0)                           = ?

```

----------

## UberLord

Well, that looks OK too. It thinks it's configured eth0 correctly.

Could you be more specific as to what isn't configured? No IP address on eth0? No route? Does /etc/resolv.conf old the right information?

Does "grep dhcpcd /var/log/messages" return anything?

----------

## tommoyer324

When I type `ifconfig eth0` it shows the interface as up, but doesn't give an IP address.  The route is not shown when I run `route`.

/etc/resolv.conf is setup correctly

here is what `grep dhcpcd /var/log/messages` returned

```

Jun 19 22:49:09 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:09 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:09 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:09 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:09 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:09 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:09 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:09 nash dhcpcd[20783]: verified 192.168.0.101 address is not in use

Jun 19 22:49:09 nash dhcpcd[20783]: your IP address = 192.168.0.101

Jun 19 22:49:09 nash dhcpcd[20783]: orig hostname = nash

Jun 19 22:49:09 nash dhcpcd[20783]: MAC address = 00:11:24:84:73:86

Jun 19 22:49:09 nash dhcpcd[20783]: broadcasting DHCP_DISCOVER

Jun 19 22:49:10 nash dhcpcd[20783]: broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:10 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:10 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:10 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:10 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:10 nash dhcpcd[20783]: verified 192.168.0.101 address is not in use

Jun 19 22:49:10 nash dhcpcd[20783]: your IP address = 192.168.0.101

Jun 19 22:49:10 nash dhcpcd[20783]: orig hostname = nash

Jun 19 22:49:10 nash dhcpcd[20783]: MAC address = 00:11:24:84:73:86

Jun 19 22:49:10 nash dhcpcd[20783]: broadcasting DHCP_DISCOVER

Jun 19 22:49:10 nash dhcpcd[20783]: broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:10 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:10 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:10 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:10 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:10 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:11 nash dhcpcd[20783]: verified 192.168.0.101 address is not in use

Jun 19 22:49:11 nash dhcpcd[20783]: your IP address = 192.168.0.101

Jun 19 22:49:11 nash dhcpcd[20783]: orig hostname = nash

Jun 19 22:49:11 nash dhcpcd[20783]: MAC address = 00:11:24:84:73:86

Jun 19 22:49:11 nash dhcpcd[20783]: broadcasting DHCP_DISCOVER

Jun 19 22:49:11 nash dhcpcd[20783]: broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255

Jun 19 22:49:11 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:11 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:11 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:11 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:11 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:11 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:11 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:11 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:11 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:11 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:11 nash dhcpcd[20783]: verified 192.168.0.101 address is not in use

Jun 19 22:49:11 nash dhcpcd[20783]: your IP address = 192.168.0.101

Jun 19 22:49:11 nash dhcpcd[20783]: orig hostname = nash

Jun 19 22:49:11 nash dhcpcd[20783]: MAC address = 00:11:24:84:73:86

Jun 19 22:49:11 nash dhcpcd[20783]: broadcasting DHCP_DISCOVER

Jun 19 22:49:12 nash dhcpcd[20783]: broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:12 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:12 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:12 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:12 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:12 nash dhcpcd[20783]: verified 192.168.0.101 address is not in use

Jun 19 22:49:12 nash dhcpcd[20783]: your IP address = 192.168.0.101

Jun 19 22:49:12 nash dhcpcd[20783]: orig hostname = nash

Jun 19 22:49:12 nash dhcpcd[20783]: MAC address = 00:11:24:84:73:86

Jun 19 22:49:12 nash dhcpcd[20783]: broadcasting DHCP_DISCOVER

Jun 19 22:49:12 nash dhcpcd[20783]: broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:12 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:12 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:12 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:12 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:13 nash dhcpcd[20783]: verified 192.168.0.101 address is not in use

Jun 19 22:49:13 nash dhcpcd[20783]: your IP address = 192.168.0.101

Jun 19 22:49:13 nash dhcpcd[20783]: orig hostname = nash

Jun 19 22:49:13 nash dhcpcd[20783]: MAC address = 00:11:24:84:73:86

Jun 19 22:49:13 nash dhcpcd[20783]: broadcasting DHCP_DISCOVER

Jun 19 22:49:13 nash dhcpcd[20783]: broadcastAddr option is missing in DHCP server response. Assuming 192.168.0.255

Jun 19 22:49:13 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:13 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:13 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:13 nash dhcpcd[20783]: DHCP_OFFER received from  (192.168.0.1)

Jun 19 22:49:13 nash dhcpcd[20783]: broadcasting DHCP_REQUEST for 192.168.0.101

Jun 19 22:49:13 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:13 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:13 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec

Jun 19 22:49:13 nash dhcpcd[20783]: DHCP_ACK received from  (192.168.0.1)

Jun 19 22:49:13 nash dhcpcd[20783]: broadcasting ARPOP_REQUEST for 192.168.0.101

Jun 19 22:49:13 nash dhcpcd[20783]: terminating on signal 15

Jun 20 10:15:14 nash dhcpcd[10480]: dhcpConfig: ioctl SIOCADDRT: File exists

Jun 20 10:15:14 nash dhcpcd[10480]: infinite IP address lease time. Exiting

Jun 20 13:39:27 nash dhcpcd[22578]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:27 nash dhcpcd[22578]: verified 192.168.0.101 address is not in use

Jun 20 13:39:27 nash dhcpcd[22578]: dhcpConfig: ioctl SIOCADDRT: File exists

Jun 20 13:39:27 nash dhcpcd[22578]: your IP address = 192.168.0.101

Jun 20 13:39:27 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:28 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:28 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:28 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:29 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:29 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:29 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:29 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:29 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:29 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:30 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:30 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:30 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:31 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:31 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:31 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:31 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:31 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:31 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:32 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:32 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:32 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:33 nash dhcpcd[22580]: verified 192.168.0.101 address is not in use

Jun 20 13:39:33 nash dhcpcd[22580]: your IP address = 192.168.0.101

Jun 20 13:39:33 nash dhcpcd[22580]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:33 nash dhcpcd[22580]: terminating on signal 15

Jun 20 13:39:35 nash dhcpcd[22600]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:35 nash dhcpcd[22600]: verified 192.168.0.101 address is not in use

Jun 20 13:39:35 nash dhcpcd[22600]: your IP address = 192.168.0.101

Jun 20 13:39:35 nash dhcpcd[22602]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:36 nash dhcpcd[22602]: verified 192.168.0.101 address is not in use

Jun 20 13:39:36 nash dhcpcd[22602]: your IP address = 192.168.0.101

Jun 20 13:39:36 nash dhcpcd[22602]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:37 nash dhcpcd[22602]: verified 192.168.0.101 address is not in use

Jun 20 13:39:37 nash dhcpcd[22602]: your IP address = 192.168.0.101

Jun 20 13:39:37 nash dhcpcd[22602]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:37 nash dhcpcd[22602]: verified 192.168.0.101 address is not in use

Jun 20 13:39:37 nash dhcpcd[22602]: your IP address = 192.168.0.101

Jun 20 13:39:37 nash dhcpcd[22602]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:38 nash dhcpcd[22602]: verified 192.168.0.101 address is not in use

Jun 20 13:39:38 nash dhcpcd[22602]: your IP address = 192.168.0.101

Jun 20 13:39:38 nash dhcpcd[22602]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:39 nash dhcpcd[22602]: verified 192.168.0.101 address is not in use

Jun 20 13:39:39 nash dhcpcd[22602]: your IP address = 192.168.0.101

Jun 20 13:39:39 nash dhcpcd[22602]: MAC address = 00:11:24:84:73:86

Jun 20 13:39:39 nash dhcpcd[22602]: verified 192.168.0.101 address is not in use

```

There was more to the log, but is what is shown above repeated a large number of times.

----------

## troymc

 *tommoyer324 wrote:*   

> 
> 
> ```
> 
> parseDhcpMsgRecv: 7 options received:
> ...

 

You are either receiving an invalid lease time or DHCPCD is not understanding it. DHCP option #51 is the lease time - it should be some value like 43200 not -1 - so your lease is immediately expired. And so it renews it, ad infinitum.

Since you state that this works with earlier versions of DHCPCD I'd say this is definitely a developer question.

Do you have tcpdump?  I'd be interested in seeing the raw dhcp response packet.

troymc

----------

## tommoyer324

Could you please walk me through obtaining the tcpdump.  I am not familiar with it.

EDIT: I just realized that my other box which is an x86 not a ppc is also using dhcpcd-2.0.5 and works fine.  I don't know if this makes a difference or not.

----------

## troymc

Run a command like this:

```

# tcpdump -s0 -i eth0 -w /tmp/dump.out ip proto 17

```

This will capture full packets, on eth0, writing them to a file /tmp/dump.out and filtering by UDP.

Do that while it's trying to get an address.

After a couple of seconds, <CTRL><C> that tcpdump command.

Then view the output by running this:

```

# tcpdump -v -r /tmp/dump.out

```

Hopefully, you won't have collected too much data, and you should quickly find a packet like this: (sanitized for your protection)

```

21:19:17.758091 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 328) dhcpserver.domain.name.bootps > dhcpclient.domain.name.bootpc: BOOTP/DHCP, Reply, length: 300, xid:0x8f99a728, secs:10, flags: [none]

          Client IP: dhcpclient.domain.name

          Your IP: dhcpclient.domain.name

          Client Ethernet Address: 00:90:f5:4c:9a:2a (oui Unknown)

          Vendor-rfc1048:

            DHCP:ACK

            SID:dhcpserver.domain.name

            LT:600

            SM:255.255.255.192

            DG:defgw.domain.name

            NS:nameserver.domain.name

            DN:"domain.name^@"

            BR:192.168.150.127

```

You're looking for that LT:600 line. That's the lease time in seconds offered by the server.

If it looks OK, then the problem is probably a broken DHCPCD.

troymc

----------

## UberLord

Interesting problem

```
i=51  len=4   option = -1
```

Lease time of -1 is actually valid - it means infinite for dhcpcd. With dhcpcd-2.0.5 we stopped it from exiting immediately when it gets this so that we can use daemon monitoring software if we wish to. Notice this from your logs

```
Jun 19 22:49:12 nash dhcpcd[20783]: dhcpIPaddrLeaseTime=4294967295 in DHCP server response.

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT1value is missing in DHCP server response. Assuming 2147483647 sec

Jun 19 22:49:12 nash dhcpcd[20783]: dhcpT2value is missing in DHCP server response. Assuming 3758096383 sec 
```

4294967295 is -1, infinite lease.

I cannot replicate the issue here using those values, but probably as you're on ppc it may be platform specific too.

Here's a patch which may fix the issue for you

http://dev.gentoo.org/~uberlord/dhcpcd.patch

----------

## UberLord

If the patch fails, try using gcc-3.x as we have found that gcc-4.1.1 has issues with dhcpcd on ppc. I don't have ppc myself, but have a ppc dev looking into the issue.

----------

## troymc

 *UberLord wrote:*   

> 
> 
> Lease time of -1 is actually valid - it means infinite for dhcpcd. 
> 
> 

 

Wow, I did not know that.  I learn something new every time I read these forums!

That must be dhcpcd specific as I don't see it specified in the RFC.

troymc

----------

## UberLord

No, it's not in the RFC. However, -1 is also the largest number when turned into a uint that the structure for lease time allows. dhcpcd has traditionally treated this as infinite and exited straight away which is something we no longer do  :Smile: 

But as you can see it has probably caused this issue - although I don't see it on amd64 and x86 (he has ppc)

----------

## tommoyer324

I no longer have gcc-3 installed, would you reccommend reinstalling it for this one package?  Besides that dhcpcd-2.0.3 works fine with gcc-4.1.1

----------

## r4d1x

2.0.5 also works with gcc 4.1.1 on my machine.  x86 SMP.

----------

## tommoyer324

I tried 2.0.5 and up and they don't work with gcc-4.1.1 on ppc

----------

## r4d1x

 *Quote:*   

> I no longer have gcc-3 installed, would you reccommend reinstalling it for this one package? Besides that dhcpcd-2.0.3 works fine with gcc-4.1.1

 

Is there any reason why you absolutely have to upgrade?  Remember, the latest isnt always the greatest.

----------

## tommoyer324

Not really, but it would be nice to know that at some later date if I need to upgrade, it will be available.

----------

