[CentOS] CentOS-6 dhcpd

Fri Jul 15 20:53:53 UTC 2011
Ljubomir Ljubojevic <office at plnet.rs>

Les Mikesell wrote:
> On 7/15/2011 2:56 PM, Ljubomir Ljubojevic wrote:
>> Timothy Murphy wrote:
>>> Ljubomir Ljubojevic wrote:
>>>
>>>> and there is no mention of interfaces, just their IP's, and you can only
>>>>    set DHCP service on the first IP on the interface.
>>> What exactly do you mean when you say that "you can only set DHCP service
>>> on the first IP on the interface"?
>>>
>>>
>> I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not
>> hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on
>> the interface, just for the subnet original, true IP is set.
>>
>> Since ISC DHCP should be the same, this should be also true for CentOS
>> version of ISC DHCP server.
> 
> Did you use a 'shared-network' declaration?  It still isn't going to be 
> able to distinguish which address range to give out to any particular 
> client unless you've specified the hardware ethernet for it, though.
> 
On the router I am using I guess that info is taken from the router it 
self. I just have to declare subnet and that is it. Routers always 
respond on any interface with first IP declared on that interface, and 
it is always with the first IP. Giving out IP is on the same principle,
request comes on the interface and server queries first IP address of 
the interface and searches for the subnet.

But ones again, this is *not* on the CentOS, ISC DHCP version is newer 
(4.1.0) then in CentOS 5.6 (3.0.5),

Here is config file and output of the server with only one active subnet 
declaration (and coincidence is it is with shared lan) on 5 interface 
router:


option domain-name "plnet.rs"; 
                                     option domain-name-servers x.x.x.x, 
x.x.x.y, z.z.z.z; 
ddns-update-style none; 
                                     default-lease-time 43200; 
 
   max-lease-time 86400; 
                                        authoritative; 
 
      shared-network drlan { 

    subnet 172.26.21.0 netmask 255.255.255.0 { } 

 

    subnet 192.168.219.0 netmask 255.255.255.0 { 

       range 192.168.219.170 192.168.219.199; 

       option routers 192.168.219.100; 

    } 

 

    host ljubomir_lap-top { hardware ethernet 00:19:DB:F1:0B:36;
         fixed-address 192.168.219.102; }
    host ljubomir_laptop_wifi { hardware ethernet 00:15:af:4e:b2:11;
         fixed-address 192.168.219.102; }
    host ljubomir_wildfire_wifi { hardware ethernet 90:21:55:e7:16:35;
         fixed-address 192.168.219.101; }
}


<start>
Internet Systems Consortium DHCP Server 4.1.0p1 

Copyright 2004-2009 Internet Systems Consortium. 

All rights reserved. 

WARNING: Host declarations are global.  They are not limited to the 
scope you declared them in.             │
Wrote 0 deleted host decls to leases file. 

Wrote 0 new dynamic host decls to leases file. 

Wrote 3 leases to leases file. 

 

No subnet declaration for tap0 (172.29.0.200). 

** Ignoring requests on tap0.  If this is not what 

    you want, please write a subnet declaration 

    in your dhcpd.conf file for the network segment 

    to which interface tap0 is attached. ** 

 

No subnet declaration for wpci2 (172.26.16.100). 

** Ignoring requests on wpci2.  If this is not what 

    you want, please write a subnet declaration 

    in your dhcpd.conf file for the network segment 

    to which interface wpci2 is attached. ** 

 
 

No subnet declaration for wpci1 (172.26.19.200). 

** Ignoring requests on wpci1.  If this is not what 

    you want, please write a subnet declaration 

    in your dhcpd.conf file for the network segment 

    to which interface wpci1 is attached. ** 


No subnet declaration for wpci3 (172.26.10.100). 

** Ignoring requests on wpci3.  If this is not what 

    you want, please write a subnet declaration 

    in your dhcpd.conf file for the network segment 

    to which interface wpci3 is attached. ** 

 

No subnet declaration for wpci0 (172.26.14.100). 

** Ignoring requests on wpci0.  If this is not what 

    you want, please write a subnet declaration 

    in your dhcpd.conf file for the network segment 

    to which interface wpci0 is attached. ** 


No subnet declaration for eth1 (172.26.221.100). 

** Ignoring requests on eth1.  If this is not what 

    you want, please write a subnet declaration 

    in your dhcpd.conf file for the network segment 

    to which interface eth1 is attached. ** 

 

Listening on LPF/eth0/00:19:5f:00:91:96/drlan 

Sending on   LPF/eth0/00:19:5f:00:91:96/drlan 

Sending on   Socket/fallback/fallback-net 


<emd>

Ljubomir