# *SOLVED* DHCPCD and tail -f /var/log/messages

## rockerboy402

I've had my Gentoo evironment set up for about 4 days now, so there are still a lot of things that needs done. Part of that is getting my cron jobs to work correctly, and I monitor my log files (running:  tail -f /var/log/messages) in a terminal to see what is going on.  However, my log files are now being filled with the following:

```

May 24 14:19:26 tux dhcpcd[2117]: eth0: broadcasting for a lease

May 24 14:19:26 tux dhcpcd[2117]: eth0: offered 192.168.1.2 from 192.168.1.1

May 24 14:19:26 tux dhcpcd[2117]: eth0:received NAK: (null)

May 24 14:19:27 tux dhcpcd[2117]: eth0: broadcasting for a lease

May 24 14:19:27 tux dhcpcd[2117]: eth0: offered 192.168.1.2 from 192.168.1.1

May 24 14:19:27 tux dhcpcd[2117]: eth0:received NAK: (null)

May 24 14:19:28 tux dhcpcd[2117]: eth0: broadcasting for a lease

May 24 14:19:28 tux dhcpcd[2117]: eth0: offered 192.168.1.2 from 192.168.1.1

May 24 14:19:28 tux dhcpcd[2117]: eth0:received NAK: (null)

May 24 14:19:29 tux dhcpcd[2117]: eth0: broadcasting for a lease

May 24 14:19:29 tux dhcpcd[2117]: eth0: offered 192.168.1.2 from 192.168.1.1

May 24 14:19:29 tux dhcpcd[2117]: eth0:received NAK: (null)

[i]...and so on![/i]

```

It has been doing it since early yesterday, and I can't figure out why.  I run a NetGear router and i have it set up so when the Gentoo box connects to the router it assigns it 192.168.1.2.  Since i have port forwarding on, there are some ports that I only want to forward to my Gentoo box, and this is the only way I can figure out how.  What I dont' get is why did it recently start doing this?  No other system is using, or even trying to use. 192.168.1.2.  It is reserved for the Gentoo box.  Any ideas?Last edited by rockerboy402 on Sat May 24, 2008 10:43 pm; edited 1 time in total

----------

## aceFruchtsaft

Why do you even bother using DHCP when you assign the same address every time? Using a static address would be less error prone.

The NAK response usually indicates that the DHCP client tries to obtain an address which is not compatible with the server's subnet. For example, if the client requests 192.168.2.x but the DHCP server is on 192.168.1.0/24 the server sends a NAK response. This might happen if you move a computer to a different subnet since dhcpcd tries to obtain the last IP address used.

What you might want to try:

1) Start dhcpcd manually with the debug option (-d), maybe the output helps to identify the problem. (You will need to kill dhcpcd with dhcpcd -k eth0 first):

```

dhcpcd -k eth0

dhcpcd -d eth0

```

2) Kill dhcpcd and delete the contents of /var/lib/dhcpcd where dhcpcd keeps state information.

Then restart dhcpcd.

----------

## rockerboy402

I guess that worked! Problem no longer occuring! Thanks!

----------

