DHCP on Aliase eth0

Peter Ruprecht ruprech at jilau1.colorado.edu
Thu Sep 3 17:20:56 UTC 2009


Oluwagbenga Shobowale wrote:
> Hello All,
> I need to know if it is possible to run dhcp server on an aliase
> interface eth0:0 ?
> 
> I have configured a dhcp server for a network that should be on this
> interface but I can't get it to work.
> Anyone worked on something like this?
> 

Maybe this will help.  Here's part of my dhcpd.conf file showing a pool 
that gives out addresses on an overlaid private network:

   # private subnet / trusted devices
   subnet 192.168.107.0 netmask 255.255.255.0 {
     pool {
       range 192.168.107.20 192.168.107.252;
       option routers 192.168.107.1;    # NAT interface
       allow members of "trustednat";
       default-lease-time 900;
       max-lease-time 900;
       authoritative;
     }
   }

Then I configure a virtual network interface for that network, in 
/etc/sysconfig/network-scripts/ifcfg-eth0:192 :

DEVICE=eth0:192
BOOTPROTO=none
BROADCAST=192.168.107.255
IPADDR=192.168.107.254
NETMASK=255.255.255.0
NETWORK=192.168.107.0
TYPE=Ethernet
USERCTL=no
HWADDR=00:15:17:85:7b:ab
ONBOOT=yes

If the alias interface is up when dhcpd starts, everything just seems to 
work.  Can you give more details on how your setup is not working?

Peter Ruprecht




More information about the redhat-sysadmin-list mailing list