On 29.5.2015 г. 01:41 ч., Edgar Pettijohn III wrote:
On May 28, 2015, at 2:06 AM, Ivo Chutkin 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.
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;
vlan25 192.168.25.1 is not in this subnet
nor is vlan15 192.168.15.1
if you want them to work add a subnet section for them. Same probably goes for vr0.
Otherwise just start with dhcpd_flags="vr1" which appears to work. Otherwise
it will not start because of these previous errors. I have read only system and no
problems with dhcpd starting.
Thanks for reply.
The actual problem is that I was mounting /etc in mfs form backup partition.
In this case, during boot time, the systems reads /etc from CF card,
which does not contain correct config files, so dhcpd does not start
because it is not in /etc/rc.conf.local.
If I mount /etc from CF card and change the files, everything is working
properly.
I just wanted to have /etc rw :-)
Thanks for the help,
Ivo
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: ""
ifconfig output:
~ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
priority: 0
groups: lo
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0d:b9:39:46:80
priority: 0
groups: egress
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet XX.XXX.XXX.42 netmask 0xfffffff8 broadcast XX.XXX.XXX.47
vr1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0d:b9:39:46:81
description: MTEL
priority: 0
media: Ethernet autoselect (none)
status: no carrier
vr2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0d:b9:39:46:82
description: MNG
priority: 0
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 192.168.55.1 netmask 0xffffff00 broadcast 192.168.55.255
enc0: flags=0<>
priority: 0
groups: enc
status: active
vlan15: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0d:b9:39:46:82
description: VITA-OFFICE
priority: 0
vlan: 15 parent interface: vr2
groups: vlan
status: active
inet 192.168.15.1 netmask 0xffffff00 broadcast 192.168.15.255
vlan25: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:0d:b9:39:46:82
description: VITA-GUEST
priority: 0
vlan: 25 parent interface: vr2
groups: vlan
status: active
inet 192.168.25.1 netmask 0xffffff00 broadcast 192.168.25.255
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33192
priority: 0
groups: pflog