On 28.5.2015 г. 10:25 ч., Jan Stary wrote:
On May 28 10:06:03, open...@bgone.net wrote:
Hello guys,
I am lost with this simple task.
DHCP server does not start at boot.
If I started by #/etc/rc.d/dhcpd start, it starts and works properly.
If I check it with #/etc/rc.d/dhcpd check, i get dhcpd(failed)
I cannot see any errors in logs.

Really? What does /var/log/daemon say after you restart dhcpd?

Yes, it is really strange...

Here is output of daemon log after restart by /etc/rc.d/dhcpd start:

May 28 11:15:42 vita dhcpd[14929]: Can't listen on vlan25 - dhcpd.conf has no subnet declaration for 192.168.25.1. May 28 11:15:42 vita dhcpd[14929]: Can't listen on vlan15 - dhcpd.conf has no subnet declaration for 192.168.15.1.
May 28 11:15:42 vita dhcpd[14929]: Listening on vr2 (192.168.55.1).
May 28 11:15:42 vita dhcpd[14929]: Can't listen on vr1 - it has no IP address. May 28 11:15:42 vita dhcpd[14929]: Can't listen on vr0 - dhcpd.conf has no subnet declaration for xx.xxx.xxx.42.

It listens on vr2 as it must be.

If I start it with /usr/sbin/dhcpd vr2 i get in daemon log:

May 28 11:18:50 vita dhcpd[25296]: Listening on vr2 (192.168.55.1).

which is perfectly fine.


May be I miss something obvious. I have done it many times without issues.
Please, take a look and help me if you can.

Thanks,
Ivo

It is alix2d3 board with read only file system.

My dhcpd.conf file is mostly default:

~ # cat /etc/dhcpd.conf
option  domain-name "my.domain";
option  domain-name-servers 192.168.55.1;

subnet 192.168.55.0 netmask 255.255.255.0 {
         option routers 192.168.55.1;

         range 192.168.55.32 192.168.55.127;

         host static-client {
                 hardware ethernet 22:33:44:55:66:77;
                 fixed-address 192.168.55.200;
         }

         host pxe-client {
                 hardware ethernet 02:03:04:05:06:07;
                 filename "pxeboot";
                 next-server 192.168.55.1;
         }
}

My hostname.vr2 file:
~ # cat /etc/hostname.vr2
up
inet 192.168.55.1 255.255.255.0 192.168.55.255
description MNG

My rc.conf.local file:
~ # cat /etc/rc.conf.local
ntpd_flags="-s"
dhcpd_flags=""          # for normal use: ""

Shouldn't that be dhcpd_flags="em0" ?
This way, you are trying to serve on all interfaces,
even those without a declaration in dhcpd.conf


It does not make any difference if I put dhcpd_flags="vr2" in rc.conf.local

Thanks,
Ivo

Reply via email to