DHCP on Aliase eth0

Peter Ruprecht ruprech at jilau1.colorado.edu
Thu Sep 3 19:11:19 UTC 2009


Does the output of ifconfig look ok with both interfaces?  Make sure 
iptables is not blocking dhcp traffic.  Are there dhcpd errors in the logs?

  -Peter

Oluwagbenga Shobowale wrote:
> Thanks ...
> In my own case I had one network on the 192.168.1.0/24 subnet however a
> friend needed to use our infrastructure hence I needed to set up another ip
> range 192.168.4.0/24  since I wanted them to share my internet. Hence I
> created an aliase on the eth0 which my network is on but when I configure
> dhcp ... 
> Below is my config
> DHCPDARGS="eth0:0";
> # No service will be given on this subnet, but declaring it helps the
> # DHCP server to understand the network topology.
> 
> subnet 192.168.1.0 netmask 255.255.255.0 {
> }
> 
> # This is a very basic subnet declaration.
> subnet 192.168.4.0 netmask 255.255.255.0 {
>      pool {
>        range 192.168.4.20 192.168.4.252;
>        option routers 192.168.4.2;    # NAT interface
>        default-lease-time 900;
>        max-lease-time 7200;
>             }
>    }
> 
> 
> 
> 
> Virtual Interface 
> 
> DEVICE=eth0:0
> HWADDR=00:1f:29:e0:70:ce
> ONBOOT=yes
> BOOTPROTO=none
> IPADDR=192.168.4.2
> USERCTL=no
> PEERDNS=yes
> IPV6INIT=no
> NM_CONTROLLED=no
> TYPE=Ethernet
> NETMASK=255.255.255.0
> 
> 
> Not sure what I am doing wrong ...
> 
> 
> 
> -----Original Message-----
> From: redhat-sysadmin-list-bounces at redhat.com
> [mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Peter Ruprecht
> Sent: Thursday, September 03, 2009 6:21 PM
> To: redhat-sysadmin-list at redhat.com
> Subject: Re: DHCP on Aliase eth0
> 
> 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
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list
> 
> 
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list




More information about the redhat-sysadmin-list mailing list