Changes in dhcpd.conf do not make a difference in DHCP service behaviour


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Changes in dhcpd.conf do not make a difference in DHCP service behaviour
# 8  
Old 03-08-2019
The error happening here is clear. These are the relevant log lines:
Code:
Mar  7 16:19:30 trber dhcpd: No subnet declaration for eth0 (10.210.148.7).
Mar  7 16:19:30 trber dhcpd: ** Ignoring requests on eth0... 
Mar  7 16:19:30 trber dhcpd: Not configured to listen on any interfaces!
Mar  7 16:19:30 trber dhcpd: exiting.

This message means the local system has the given ip at the given interface. But there is no subnet declaration for that. The subnet declaration in your dhcpd.conf is:

Code:
subnet 172.17.126.192 netmask 255.255.255.224

The both does not match. You probably need to add a correct subnet declaration for the same net as the IP 10.210.148.7 is in. But you should not do that without knowing exactly what you are doing and what ip address range may be allowed and dedicated for that. Otherwise you'll disturb network operation in your network by probably causing ip address conflicts with static assigned ip addresses which are the same as in your subnet declaration.

---

Another Guess:

Maybe this is not the dhcp server which is serving the ip address of serverX and there is another dhcp-server active? As far as I see this dhcp-service is doing completely nothing because of the line: Mar 7 16:19:30 trber dhcpd: exiting..

You can check that by reviewing the system log of serverX and look for the ip/mac address of the dhcp-server serving the address.

You can also check with a packet sniffer(tcpdump) what's going on on the network and which ip-address is replying to dhcp-requests.(udp ports 67 & 68).

Last edited by stomp; 03-08-2019 at 08:15 AM.. Reason: Removed first part because it was a wrong guess.
# 9  
Old 03-08-2019
Quote:
Originally Posted by stomp
This message means the local system has the given ip at the given interface. But there is no subnet declaration for that. The subnet declaration in your dhcpd.conf is:

Code:
subnet 172.17.126.192 netmask 255.255.255.224

The both does not match. You probably need to add a correct subnet declaration for the same net as the IP 10.210.148.7 is in.

Is the subnet declaration supposed to be in same network as the IP 10.210.148.7 ? I dont think so. The DISCOVER is received via 172.17.126.195/194 and those IPs are in the defined network declaration in dhcpd.conf. A request is received from a defined network, so there should be an offer for it.

Code:
Mar  7 09:05:04 trber dhcpd: DHCPDISCOVER from XX:XX:XX:XX:45:06 via 172.17.126.195: unknown network segment
Mar  7 09:05:04 trber dhcpd: DHCPDISCOVER from XX:XX:XX:XX:45:06 via 172.17.126.194: unknown network segment

In the network, many devices will generate dhcp discover messages and all those messages will be relayed to the same server IP 10.210.148.7. According to the MACs in the received DISCOVER messages the 10.210.148.7 Server will give different IP addresses from different networks to each client.
Currently the subnet for the first MAC was entered in dhcpd.conf. At the end subnets for the others will be added too.
172.17.126.200 for MAC1
172.17.124.200 for MAC2
172.17.120.200 for MAC3
....
# 10  
Old 03-08-2019
Quote:
Is the subnet declaration supposed to be in same network as the IP 10.210.148.7 ? I dont think so. The DISCOVER is received via 172.17.126.195/194 and those IPs are in the defined network declaration in dhcpd.conf. A request is received from a defined network, so there should be an offer for it.
I'm not quite sure, but I would assume - according to the log entries - the listening interface should have at least an empty(=no leases) subnet declaration since the server is ignoring the interface and is exiting without one. Better check it yourself in the dhcpd manpage/documentation.

But if the dhcp server is actually getting the relayed dhcp/bootp requests my concern maybe not relevant.

--- Post updated at 02:04 PM ---

Maybe it is an option to run the dhcpd-server in foreground(-d) to check what configuration is active and what is going on. And to be sure the daemon is restarted at configuration changes.

Last edited by stomp; 03-08-2019 at 09:16 AM..
This User Gave Thanks to stomp For This Post:
# 11  
Old 03-11-2019
OS version

Code:
Red Hat Enterprise Linux Server release 6.8 (Santiago)

DHCP

Code:
DHCP Server 4.1.1-P1

# 12  
Old 03-11-2019
I 'll try with adding an empty dhcp entry for the interface network.

Code:
ddns-update-style none;

subnet 10.210.148.0  netmask 255.255.254.0 {}


Last edited by ekorgur; 03-11-2019 at 10:06 AM..
# 13  
Old 03-11-2019
Quote:
Originally Posted by ekorgur
I 'll try with adding an empty dhcp entry for the interface network.

Code:
ddns-update-style none;

subnet 10.210.148.0  netmask 255.255.254.0 {}

After the subnet decleration is added for the interface which is an entry useless for my solution, the DHCPD is UP and running properly.
DHCP gives OFFER for the incoming relayed requests from different subnets.
I hope the dummy entry for my interface IP does not cause an impact.

Thanks everybody.
This User Gave Thanks to ekorgur For This Post:
# 14  
Old 03-11-2019
Thanks for sharing the solution!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Listing IPs from the dhcpd.conf

Hy everybody, Within a dhcpd.conf file, we got some fixed IP adresses from 192.168.0.1 - 192.168.0.254. Sample: #ddns-update-style interim; ddns-update-style none; ignore client-updates; deny client-updates; authoritative; #### By red for PXE Booting allow booting; allow bootp; ###... (17 Replies)
Discussion started by: hermouche
17 Replies

2. Shell Programming and Scripting

Shell Script to check dhcp conf file

Hi, I have to prepare a script to check the dhcp conf file. The script has to check for a specific parameter called circuit ID. If the Circuit ID is unique it should show the output that it is unique and if it is duplicate it should show that the Circuit ID is duplicate. I have prepared the... (4 Replies)
Discussion started by: Crazy_Nix
4 Replies

3. Shell Programming and Scripting

Help with Perl to change dhcpd.conf file

Hi all, I am too new for this stuff and i am lost in perl tutorials. I need help to change dhcp entries in .conf file with a perl script. The file entries are like below : host bertha-clp-0 { hardware ethernet AA:0A:A0:00:6c:40; fixed-address 10.10.10.72; option... (6 Replies)
Discussion started by: ekckabatop
6 Replies

4. UNIX for Dummies Questions & Answers

Difference between configure/make/make install.

Hi, While installation of apache on linux, we perform the below tasks. 1) Untar 2) configure 3) make 4) make install. I wanted to understand the difference and working of configure/make/make install. Can any one help me understanding this? Thanks in advance. (1 Reply)
Discussion started by: praveen_b744
1 Replies

5. Solaris

Solaris Install over WAN(where to keep wanboot.conf file for DHCP client)

I am trying to configure my jumpstart server to install Solaris 10 on a T1000 machine(target) over WAN. I do not know the IP address of the client, i wish the client to get the IP address from DHCP. how do i configure my /etc/netboot hierarchy. One option would be to keep the wanboot.conf in... (1 Reply)
Discussion started by: hemalsid
1 Replies

6. Shell Programming and Scripting

delete dhcp.conf entry using sed

I am trying to use sed to remove entries from my dhcpd.conf file. The form of the file is: host foo { option 1 option 2 } host bar { option 1 option 2 } I was trying to use a label like: sed -e :a -e "s/^host bar {*//g;/{/N;//ba" /etc/dhcpd.conf... (2 Replies)
Discussion started by: tizatron
2 Replies

7. Linux

dhcpd.conf - static route

Hi, I've setup DHCP Server on RH linux AS3 and everything works fine except static routes. They are not getting effected on client systems. My dhcpd.conf: +++++++++++ ddns-update-style interim; ddns-updates off; option domain-name-servers 192.168.116.122; option domain-name... (3 Replies)
Discussion started by: prvnrk
3 Replies

8. Shell Programming and Scripting

Shell/Perl Script to edit dhcpd.conf

Hi, I need to get a script together to edit the dhcp service configuration file dhcpd.conf. Mac addresses are defined in classes ex. class "HOST1" { match if substring (hardware, 1,18)=00:11:11:FF:FF:FF;} class "HOST2" ... class "HOST3" ... ... followed by allow or deny statements:... (4 Replies)
Discussion started by: sahilb
4 Replies

9. Solaris

DHCP Service

Thanks for reply , i realy love using unix ... is there anyone who can give me an instruction to configure DHCP Server in Sun Solaris 10 just a quick guide .. i know how to configure DHCP Server in Windows operating System ..But i want also learn how to configure it from the SUN SOLARIS 10...... (6 Replies)
Discussion started by: giancarlodjabon
6 Replies

10. Linux

dhcpd.conf

I have intall a REdhat 9.0 as a server and Ive configure to act as a DHCP however Im having technical problems b/c the file /etc/dhcpd.conf does not exists. I went to the text edit and I created : subnet 192.192.168.100.0 netmask 255.255.255.0 { range 192.168.100.10 192.168.100.150;... (1 Reply)
Discussion started by: keliy1
1 Replies
Login or Register to Ask a Question