Need Help DHCP Server

Simon Hobson dhcp1 at thehobsons.co.uk
Sun Mar 17 11:36:47 UTC 2013


"Prabhpal S. Mavi" wrote:
>following static ip address are configured on logical interfaces, and all
>five starts DHCP daemons starts up alright and issues ip address as
>expected only when the "dhcpd.conf" is as following.
>
>vlan10 ineterafce=192.168.10.10/24
>vlan20 ineterafce=192.168.20.20/24
>vlan30 ineterafce=192.168.30.30/24
>vlan40 ineterafce=192.168.40.40/24
>vlan50 ineterafce=192.168.50.50/24

Just to be clear, a VLAN interface is not the same thing as a logical interface.

># Vlan 10
>subnet 192.168.11.0 netmask 255.255.255.0 {
> option routers 192.168.11.1;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.11.255;
> option domain-name-servers 41.211.0.41;
> option domain-name "teledataict.net";
> default-lease-time 3600;
> max-lease-time 7200;
> range 192.168.11.100 192.168.11.200;
>}

So where does 192.168.11.0/24 fit into the above ? It does not overlap in any way with any of the subnets in which the server has an address. For this to work, 192.168.11.0/24 must be a remote network with a relay agent. However that does not fit with what you write further down :
>But we have the requirement where i need to issue ip address from the
>range that is not configured on the server (request coming through dhcp
>relay agent (bootp helper) from remote network) for example. Please mind
>that ip address "192.168.61.x" is not configured on any interface of my
>DHCP server ("/etc/network/interface"). If i was adding following code in
>to the "dhcpd.conf" daemon fails to start. since this ip range (subnet) in
>not my server, i have to issue these ip to remote client request came
>through dhcp relay agent.

The server should start - what messages does it give ? It is **NOT** required that the server have an IP address in every subnet ir serves.

>subnet 192.168.61.0 netmask 255.255.255.0 {
> option routers 192.168.61.1;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.61.255;
> option domain-name-servers 41.211.0.41;
> option domain-name "teledataict.net";
> default-lease-time 3600;
> max-lease-time 7200;
> range 192.168.61.100 192.168.61.200;
>}
>
>
>But following configuration solved the problem. i as able to issue ip
>address for subnet "192.168.61.0" if configuration is like this.
>
>
>subnet 192.168.0.0 netmask 255.255.0.0 {
> option routers 192.168.10.10;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.10.255;
> option domain-name-servers 41.211.0.41;
> option domain-name "teledataict.com";
> default-lease-time 3600;
> max-lease-time 7200;
> range 192.168.10.100 192.168.10.200;
>}
>
>subnet 192.168.0.0 netmask 255.255.0.0 {
> option routers 192.168.20.20;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.20.255;
> option domain-name-servers 41.211.0.41;
> option domain-name "teledataict.net";
> default-lease-time 3600;
> max-lease-time 7200;
> range 192.168.20.100 192.168.20.200;
>}
..
>But now the client from vlan10 get the ip from vlan20 scope & from vlan40
>scope etc...

Yes, because you've created a completely invalid configuration.

>Mar 15 10:38:25 captive dhcpd: Warning: subnet 192.168.0.0/16 overlaps
>subnet 192.168.0.0/16

>Mar 15 10:38:25 captive dhcpd: Multiple interfaces match the same subnet:
>vlan40 vlan20

Those error messages are correct. You have created an invalid configuration.

Except in very rare situations (which do not apply here) the DHCP config must accurately reflect the network. If your subnet is a /24 then the DHCP config must reflect that. Also, you cannot have any overlapping subnets within the scope served by the DHCP server - it breaks one of the two fundamental rules of IP addressing in that IP addresses would not be unique and unambiguous.

Since what you describe doesn't tally with the config elements you've posted, it's hard to know what's wrong. Lets start by posting the output of "ip addr" and "ip route" on the server (you can delete any sensitive information that doesn't relate to these 192.168.n.n subnets). That way we'll have a better idea of your actual setup.


More information about the dhcp-users mailing list