# dhcpd questions

## mattmatteh

i am using dhcp on an old computer for a small home network.  i set it up and now i am testing.   

there is nothing in the lease file.  how do i get a list of all leases ?

here is a copy of the log file

Jun  9 15:32:50 tux dhcpd: DHCPRELEASE of 192.168.1.5 from xx:xx:xx:xx:xx:4e via eth1 (not found)

Jun  9 15:33:01 tux eth1: Autonegotiation advertising 0x5e1  partner 0x00.

Jun  9 15:33:01 tux eth1: link down.

Jun  9 15:37:33 tux dhcpd: Wrote 0 deleted host decls to leases file.

Jun  9 15:37:33 tux dhcpd: Wrote 0 new dynamic host decls to leases file.

Jun  9 15:37:33 tux dhcpd: Wrote 0 leases to leases file.

Jun  9 15:54:41 tux eth1: Autonegotiation advertising 0x5e1  partner 0x41e1.

Jun  9 15:54:41 tux eth1: link up.

Jun  9 15:54:42 tux dhcpd: DHCPREQUEST for 192.168.1.5 from xx:xx:xx:xx:xx:4e via eth1

Jun  9 15:54:42 tux dhcpd: DHCPACK on 192.168.1.5 to xx:xx:xx:xx:xx:4e via eth1

Jun  9 15:59:14 tux dhcpd: DHCPRELEASE of 192.168.1.5 from xx:xx:xx:xx:xx:4e

i assume the not found in line 1 is because its not in the lease file ?

btw, link down is because i only have 1 computer connected for testing, not a switch

why didnt it write to the lease file ? "Wrote 0 leases to leases file"?

matt

----------

## MrUlterior

```
# cat /var/lib/dhcp/dhcpd.leases
```

----------

## mattmatteh

tux log # tail -n 300  messages

Jun  9 16:40:05 tux eth1: Autonegotiation advertising 0x5e1  partner 0x41e1.

Jun  9 16:40:05 tux eth1: link up.

Jun  9 16:40:05 tux dhcpd: DHCPREQUEST for 192.168.1.5 from xx:xx:xx:xx:xx:4e via eth1

Jun  9 16:40:05 tux dhcpd: DHCPACK on 192.168.1.5 to xx:xx:xx:xx:xx:4e via eth1

tux log # cat /var/lib/dhcp/dhcpd.leases

# All times in this file are in UTC (GMT), not your local timezone.   This is

# not a bug, so please don't ask about it.   There is no portable way to

# store leases in the local timezone, so please don't request this as a

# feature.   If this is inconvenient or confusing to you, we sincerely

# apologize.   Seriously, though - don't ask.

# The format of this file is documented in the dhcpd.leases(5) manual page.

# This lease file was written by isc-dhcp-V3.0.1

tux log #

i have looked at this file many times and nothing is ever in it

thanks

matt

----------

## MrUlterior

Sorry, I confess I was distracted and didn't read your initial post properly.

How about posting your /etc/dhcp/dhcpd.conf file then? The liklihood is that there's an error within it leading to the problem you're experiencing.

----------

## mattmatteh

tux log # cat /etc/dhcp/dhcpd.conf

authoritative;

ddns-update-style ad-hoc;

subnet 192.168.1.0 netmask 255.255.255.0

{

        range 192.168.1.100 192.168.1.250;

        default-lease-time 259200;

        max-lease-time 518400;

        option subnet-mask 255.255.255.0;

        option broadcast-address 192.168.1.255;

        option routers 192.168.1.1;

        option domain-name-servers 192.168.168.1;

        host ibook

        {

                hardware ethernet       xx:xx:xx:xx:xx:4e;

                fixed-address           192.168.1.5;

        }

}

tux log # 

btw, the internet on the ibook client works fine in gentoo or osx

most of this is from searching google, i am new to dhco servers

thanks matt

----------

## mattmatteh

i still cant get get dhcp to write the log file,  is there an option that i need to set for that ?

----------

## xkev79

you can try to add 

```

# Use this to send dhcp log messages to a different log file (you also

# have to hack syslog.conf to complete the redirection).

log-facility local7;

```

to your dhcpd.conf.

Kev.

----------

