DHCP server (version 4) with an alias IP address

Steven Shiau steven at nchc.org.tw
Thu Sep 30 01:23:23 UTC 2010


  Hi,
Is that possible to use an alias IP address to run the DHCP service 4?
We have been used dhcp3 service with this method for a long time, 
however, recently we switched to 4.1 or 4.2, and we hit an issue that 
the dhcpd always complains "No subnet declaration for eth0 (...)"
I have tested with 4.1 (on Debian Sid) and 4.2 (On Fedora 14 beta), both 
have such an issue, and also tried the "server-identifier statement" 
method, not working, either.

Here is how to reproduce the problem:
1. Download Fedora 14 beta from 
http://download.fedoraproject.org/pub/fedora/linux/releases/test/14-Beta/Live/i686/Fedora-14-Beta-i686-Live.iso. 
The reason to use Fedora 14 beta is it uses dhcpd 4.2, the latest stable 
release.
2. Burn it on CD or use virtual machine, boot this Fedora 14 beta. Here 
the machine uses one ethernet card.
3. Configure the static IP address for eth0, then gateway and name 
server. Here my settings:
===============================
IP address: 192.168.120.1
Gateway: 192.168.120.254
DNS: 8.8.8.8
===============================
4. Configure the alias IP address by:
     ifconfig eth0:1 192.168.100.254
5. yum remove dhclient
6. yum install dhcp
7. Edit /etc/dhcp/dhcpd.conf, make it as:
===============================
default-lease-time                      300;
max-lease-time                          300;
option subnet-mask                      255.255.255.0;
option domain-name-servers              8.8.8.8, 8.8.4.4;
ddns-update-style                       none;
server-identifier                       192.168.100.254;

subnet 192.168.100.0 netmask 255.255.255.0 {
     option subnet-mask  255.255.255.0;
     option routers 192.168.100.254;
     next-server 192.168.100.254;

     pool {
       range 192.168.100.1 192.168.100.3;
     }
}
===============================
8. Run:
dhcpd -s eth0:1

Then I have the error messages:
===============================
Internet Systems Consortium DHCP Server 4.2.0
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were 
not specified in the config file
Wrote 0 leases to leases file.

No subnet declaration for eth0 (192.168.120.1).
** Ignoring requests on eth0.  If this is not what
    you want, please write a subnet declaration
    in your dhcpd.conf file for the network segment
    to which interface eth0 is attached. **


Not configured to listen on any interfaces!

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
     http://bugzilla.redhat.com

exiting.
===============================

Same error messages if I run "dhcpd -s eth0".

I am sure eth0:1 is well configured:
===============================
[root at localhost ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:01:01:01
           inet addr:192.168.120.1  Bcast:192.168.120.255  
Mask:255.255.255.0
           inet6 addr: fe80::250:56ff:fe01:101/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:31331 errors:5 dropped:0 overruns:0 frame:0
           TX packets:5497 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:40723374 (38.8 MiB)  TX bytes:730443 (713.3 KiB)
           Interrupt:18 Base address:0x1400

eth0:1    Link encap:Ethernet  HWaddr 00:50:56:01:01:01
           inet addr:192.168.100.254  Bcast:192.168.100.255  
Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           Interrupt:18 Base address:0x1400

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:56 errors:0 dropped:0 overruns:0 frame:0
           TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:5708 (5.5 KiB)  TX bytes:5708 (5.5 KiB)
===============================

Any hints?

Thanks in advance.

Steven.

-- 
Steven Shiau<steven _at_ nchc org tw>  <steven _at_ stevenshiau org>
National Center for High-performance Computing, Taiwan.
http://www.nchc.org.tw
Public Key Server PGP Key ID: 1024D/9762755A
Fingerprint: A2A1 08B7 C22C 3D06 34DB  F4BC 08B3 E3D7 9762 755A




More information about the dhcp-users mailing list