LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-10-2008, 02:21 PM   #1
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Rep: Reputation: 32
DHCPD: how to get deamon to respond to relay agents, but not locally


CentOS 5

Code:
 -----     -----
|DHCPD|   |DHCPD|
|  1  |   |  2  |
 -----     -----
   |         |      NETWORK A
--------------------------
         |
     ----------
    |RelayAgent|
    | \ Router |    
     ----------
         |         NETWORK B
------------------------
    |
  ------
 | DHCP |
 |client|
  ------
So here is my problem. I have a dhcp server (DHCPD 2) on one network (NETWORK A) that I need to respond to requests coming from the relay agent (RelayAgent \ Router), but I do not want it to respond to requests on its own network (NETWORK A). There is a separate dhcp server for this network (DHCPD 1). That dhcp server (DHCPD 1) needs to only serve its directly connected network (NETWORK A).

I only want the DHCPD 2 machine to hand out leases via the interface on NETWORK A, it has other interfaces on which it must not be handing out dhcp leases. I configured DHCPD 2 with the leases for subnet of NETWORK B and set /etc/sysconfig/dhcpd's 'DHCPDARGS' to the interface on NETWORK A.

When i start the dhcpd service on DHCPD 2, it fails. /var/log/messages says:
Code:
Jan 10 11:21:50 localhost Installed: dhcp.i386 12:3.0.5-7.el5
Jan 10 12:00:12 localhost dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Jan 10 12:00:12 localhost dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Jan 10 12:00:12 localhost dhcpd: All rights reserved.
Jan 10 12:00:12 localhost dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Jan 10 12:00:12 localhost dhcpd: Wrote 0 leases to leases file.
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd: No subnet declaration for eth0 (192.168.14.1).
Jan 10 12:00:12 localhost dhcpd: ** Ignoring requests on eth0.  If this is not what
Jan 10 12:00:12 localhost dhcpd:    you want, please write a subnet declaration
Jan 10 12:00:12 localhost dhcpd:    in your dhcpd.conf file for the network segment
Jan 10 12:00:12 localhost dhcpd:    to which interface eth0 is attached. **
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd: Not configured to listen on any interfaces!
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd: If you did not get this software from ftp.isc.org, please
Jan 10 12:00:12 localhost dhcpd: get the latest from ftp.isc.org and install that before
Jan 10 12:00:12 localhost dhcpd: requesting help.
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd: If you did get this software from ftp.isc.org and have not
Jan 10 12:00:12 localhost dhcpd: yet read the README, please read it before requesting help.
Jan 10 12:00:12 localhost dhcpd: If you intend to request help from the dhcp-server@isc.org
Jan 10 12:00:12 localhost dhcpd: mailing list, please read the section on the README about
Jan 10 12:00:12 localhost dhcpd: submitting bug reports and requests for help.
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd: Please do not under any circumstances send requests for
Jan 10 12:00:12 localhost dhcpd: help directly to the authors of this software - please
Jan 10 12:00:12 localhost dhcpd: send them to the appropriate mailing list as described in
Jan 10 12:00:12 localhost dhcpd: the README file.
Jan 10 12:00:12 localhost dhcpd:
Jan 10 12:00:12 localhost dhcpd: exiting.
Jan 10 12:00:12 localhost dhcpd: dhcpd startup failed
How can I get this to work?

I can get it to start up if i add an empty lease for the local network a.k.a.
subnet 192.168.8.0 netmask 255.255.248.0 {
}

But will DHCPD start serving leases for 192.168.8.0/21 with some sort of default settings?

Last edited by Hewson; 01-10-2008 at 02:30 PM. Reason: attempting to make my problem more clear...
 
Old 01-10-2008, 03:20 PM   #2
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
Works!

putting the subnet in w/o any lease parameter results in no network response for DHCP DISCOVERs the server recieves. /var/log/messages says:

"Jan 10 13:08:27 localhost dhcpd: DHCPDISCOVER from 00:15:93:fe:00:f2 via eth0: network 192.168.8/21: no free leases"

yay.
 
Old 11-18-2008, 11:04 AM   #3
rumbero
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Rep: Reputation: 0
Question

Hi Hewson

I have the same problem...

Server in network A (10.128.0.0/18) but should only response to network B (10.128.128.0/18) requests...

Quote:
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#

#option domain-name-servers 145.253.2.75, 193.174.32.18;

default-lease-time 86400;
max-lease-time 604800;

#ddns-update-style interim;
ddns-update-style none;
ignore client-updates;


authoritative;

subnet 10.128.128.0 netmask 255.255.192.0 {
range 10.128.161.101 10.128.161.101;
filename "/pxelinux.0";
option subnet-mask 255.255.192.0;
option broadcast-address 10.128.191.255;
option routers 10.128.128.1;
next-server 10.128.8.13;
#allow booting;
#allow bootp;
#option option-128 code 128 = string;
#option option-129 code 129 = text;
}

I cannot start "service dhcpd start"


/var/log/messages:

Quote:
Nov 18 16:47:32 pxe dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Nov 18 16:47:32 pxe dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Nov 18 16:47:32 pxe dhcpd: All rights reserved.
Nov 18 16:47:32 pxe dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Nov 18 16:47:32 pxe dhcpd: Wrote 0 leases to leases file.
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: No subnet declaration for eth1 (10.128.8.13).
Nov 18 16:47:32 pxe dhcpd: ** Ignoring requests on eth1. If this is not what
Nov 18 16:47:32 pxe dhcpd: you want, please write a subnet declaration
Nov 18 16:47:32 pxe dhcpd: in your dhcpd.conf file for the network segment
Nov 18 16:47:32 pxe dhcpd: to which interface eth1 is attached. **
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: No subnet declaration for eth0 (10.130.10.12).
Nov 18 16:47:32 pxe dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 18 16:47:32 pxe dhcpd: you want, please write a subnet declaration
Nov 18 16:47:32 pxe dhcpd: in your dhcpd.conf file for the network segment
Nov 18 16:47:32 pxe dhcpd: to which interface eth0 is attached. **
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: Not configured to listen on any interfaces!
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: If you did not get this software from ftp.isc.org, please
Nov 18 16:47:32 pxe dhcpd: get the latest from ftp.isc.org and install that before
Nov 18 16:47:32 pxe dhcpd: requesting help.
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: If you did get this software from ftp.isc.org and have not
Nov 18 16:47:32 pxe dhcpd: yet read the README, please read it before requesting help.
Nov 18 16:47:32 pxe dhcpd: If you intend to request help from the dhcp-server@isc.org
Nov 18 16:47:32 pxe dhcpd: mailing list, please read the section on the README about
Nov 18 16:47:32 pxe dhcpd: submitting bug reports and requests for help.
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: Please do not under any circumstances send requests for
Nov 18 16:47:32 pxe dhcpd: help directly to the authors of this software - please
Nov 18 16:47:32 pxe dhcpd: send them to the appropriate mailing list as described in
Nov 18 16:47:32 pxe dhcpd: the README file.
Nov 18 16:47:32 pxe dhcpd:
Nov 18 16:47:32 pxe dhcpd: exiting.

I don't know what I can do???

Thanx for helping me...
 
Old 11-19-2008, 11:17 AM   #4
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
add an empty declaration for the local network to your dhcpd.conf:

subnet 10.128.0.0 netmask 255.255.192.0 {}
 
Old 11-21-2008, 04:57 AM   #5
rumbero
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by Hewson View Post
add an empty declaration for the local network to your dhcpd.conf:

subnet 10.128.0.0 netmask 255.255.192.0 {}
It works now...


Thanx
 
  


Reply

Tags
dhcpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cacti agents Lhlalyam Linux - Server 23 07-25-2007 03:05 PM
OpenSSH Agents Jzarecta Linux - Server 1 07-14-2007 01:02 PM
Which mail agents should I use? orakio Linux - Newbie 2 03-13-2004 10:21 AM
agents jamna Linux - Newbie 1 11-29-2001 05:28 AM


All times are GMT -5. The time now is 09:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration