Need Help DHCP Server

Prabhpal S. Mavi prabhpal at digital-infotech.net
Mon Mar 18 09:28:07 UTC 2013


Wonderful ! Thanks

It is good to have guys like "Simon Hobson & Christian Kratzer" in the
community. So much helpful gentle and professional indeed.

KINDLY, clarify me with two doubts, they are under.


> Hi,
>
> On Mon, 18 Mar 2013, Prabhpal S. Mavi wrote:
>
>> Dear Christian Kratzer,
>>
>> Thanks for the time for attending to my problem, i am grateful. i am
>> running one dhcp daemon. Becasue of vlans, i mentioned multi tenant, i
>> am
>> sorry for the word used that may mean something different.
>>
>> Sir, You seems to be experienced than me but i will able to follow your
>> instructions correctly. i am not new to Linux, but it is first time came
>> across this complex DHCP implementation, i may ask some silly questions
>> as
>> well.
>>
>> i understand it is difficult to advice if we don't know how is the
>> network
>> looks like and how is the flow of data. i spent sometime to make network
>> diagram for you to clear understand. Please enclose network diagram
>> attached.
>>
>> Please do not think i want you do everything for me, kindly consider me
>> lower level IT person than you, i need your help.
>>
>> Is it possible to do, what i have shown in diagram?
>
> yes but please keep the mailing list on the replies so others can learn
> from this too.
>
> In your example your dhcp has interfaces in 192.168.10.0/24,
> 192.168.20.0/24, etc...
>
> Your clients are in 192.168.11.0/24, 192.168.21.0/24, etc...
>
> To make above setup work add an empty subnet declaration for each of the
> interfaces your dhcp server has.
>
>  	subnet 192.168.10.0 netmask 255.255.255.0 {
>   	}
>  	subnet 192.168.20.0 netmask 255.255.255.0 {
>   	}
>  	subnet 192.168.30.0 netmask 255.255.255.0 {
>   	}
>  	subnet 192.168.40.0 netmask 255.255.255.0 {
>   	}
>  	subnet 192.168.50.0 netmask 255.255.255.0 {
>   	}
>
> Keep your production subnets as they are:
>
>  	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;
>  	}
>
> Once you have above working you might want to get rid of all the vlan
> interfaces you have on the server.  A single network on the server is
> enough.

Sir, i use VLANs because the DHCP request from the client is going to come
with VLAN tag. if i remove VLANs, i doubt that request would not reach to
the server. But can it create problem ? if so, i need to think again that
how to do it.



> The server sees from which subnet the request is coming from as the relay
> inserts it's ip address in the giaddr field when relaying the request.



I am clear to above "Simon Hobson" also told me the same. Thanks


> You do not need a one to one mapping of interfaces and subnets.
>
> Just configure 192.168.90.1 for the server ip and have all relays relay to
> this same address.  Remember to add the empty subnet for 192.168.90.0/24
> when doing so.



Like this right ?
subnet 192.168.90.1 netmask 255.255.255.0 {
}



> Greetings
> Christian
>
>
>>
>> Thanks / Regards
>> Prabhpal
>>
>>
>>> 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
>>>
>>
>>
>>
>
> --
> 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