Need Help DHCP Server

Christian Kratzer ck-lists at cksoft.de
Mon Mar 18 08:08:45 UTC 2013


Hi,

On Fri, 15 Mar 2013, Prabhpal S. Mavi wrote:

>
> Greetings List,
>
>
> someone please help, i have multi tenant DHCP server running on one Ubuntu
> 12.4LTS host. Setup, one physical interface (eth1) there is no ip address
> on physical interface (eth1 using as trunk mode).
>
> 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.

Feeding the information between the lines into my glowing crystal ball
it seems you are starting multiple dhcpd.

There is no need to start multiple dhcpd. One that listens on all of
your five interfaces will work just fine.

>
> 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
>
> # 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;
> }
>
> # Vlan 20
> subnet 192.168.21.0 netmask 255.255.255.0 {
<snipp/>
> }
>
> # Vlan 30
> subnet 192.168.31.0 netmask 255.255.255.0 {
<snipp/>
> }
>
>
> # Vlan 40
> subnet 192.168.41.0 netmask 255.255.255.0 {
<snipp/>
> }
>
>
> # Vlan 50
> subnet 192.168.51.0 netmask 255.255.255.0 {
<snipp/>
> }
>

above looks ok to me.

> 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.
>
> 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;
> }

you always need subnet declarations for the interfaces the host is serving.

It fully ok to have additional subnet declarations for remote interfaces
that you receive requests for from some relay.

You just need to add an empty subnet declaration for the interface or
interfaces your dhcp is listening on.

> 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 {
> }
>
> subnet 192.168.0.0 netmask 255.255.0.0 {
> }
>
>
> subnet 192.168.0.0 netmask 255.255.0.0 {
> }
>
>
> subnet 192.168.0.0 netmask 255.255.0.0 {
> }

you have five subnet declarations all for the same network. That cannot work.

You are propably best of running a single dhcp for all your networks.  Make sure
you have subnet declarations for all networks your dhcp is listening on including
the interface you receive the requests from the relay.

Greetings
Christian

-- 
Christian Kratzer                      CK Software GmbH
Email:   ck at cksoft.de                  Wildberger Weg 24/2
Phone:   +49 7032 893 997 - 0          D-71126 Gaeufelden
Fax:     +49 7032 893 997 - 9          HRB 245288, Amtsgericht Stuttgart
Web:     http://www.cksoft.de/         Geschaeftsfuehrer: Christian Kratzer


More information about the dhcp-users mailing list