09-20-2011 06:23 AM - edited 03-16-2019 07:05 AM
Hi Friends,
I have a problem in dhcpd.conf file. If i enable the option for TFTP server as 150. The dhcp server is not starting and showing [FAILED].
But if i remove or comment that line then it will work goog, showing [OK].
Actually my work is to configure Cisco IP Phone 7960. When the phone powered on it will ask DHCP server to assign an IP address. As a result the DHCP server assigns an ip address let it be 192.168.1.4. The DHCP servers ip address is 192.168.1.162.
Now i am trying to run tftp server in the same machine 192.168.1.162. But i am unable to enable this tftpserver address in dhcpd.conf file.
Can any on help me to solve this problem.
Regards,
PVR.
09-20-2011 06:40 AM
Hi
Two things:
- You only need to post your question once
- If you have a problem with the config file, maybe post up the config file that stops your server from working
Aaron
09-20-2011 07:02 AM
Hi Aaron,
I have updated my discussion. Please find the attachment, it contains the config file that i am using.
Regards,
PVR
09-20-2011 08:27 AM
Hi
I'm no expert on linux/dhcpd but a quick google suggests it is failing because you have your custom option defined {inside} a subnet declaration, like so:
DHCPARGS=eth0;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.10;
default-lease-time 86400;
max-lease-time 86400;
option ip-forwarding off;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option voip-tftp-server code 150 = ip-address;
option voip-tftp-server 192.168.1.162;
}
I suspect you should have the line shown in bold outside the subnet definition:
option voip-tftp-server code 150 = ip-address;
DHCPARGS=eth0;
subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.2 192.168.1.10;
default-lease-time 86400;
max-lease-time 86400;
option ip-forwarding off;option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option voip-tftp-server 192.168.1.162;
}
If that doesn't work, maybe try defining the option as a String:
option voip-tftp-server code 150 = string;
DHCPARGS=eth0;
subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.2 192.168.1.10;
default-lease-time 86400;
max-lease-time 86400;
option ip-forwarding off;option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;option voip-tftp-server "192.168.1.162";
}
Regards
Aaron
Please rate helpful posts..
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide