DHCP on Aliase eth0
Oluwagbenga Shobowale
gshobowale at nextworksltd.com
Thu Sep 3 21:25:59 UTC 2009
Yeah it looks ok
[root at axentra ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1F:29:E0:70:CE
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::21f:29ff:fee0:70ce/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44817051 errors:0 dropped:0 overruns:0 frame:0
TX packets:49767930 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2412738116 (2.2 GiB) TX bytes:1912042361 (1.7 GiB)
Interrupt:16 Memory:f8000000-f8012700
eth0:0 Link encap:Ethernet HWaddr 00:1F:29:E0:70:CE
inet addr:192.168.4.2 Bcast:192.168.4.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16 Memory:f8000000-f8012700
eth1 Link encap:Ethernet HWaddr 00:1F:29:E0:70:CC
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21f:29ff:fee0:70cc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43891190 errors:0 dropped:0 overruns:0 frame:0
TX packets:38284064 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1798349665 (1.6 GiB) TX bytes:1175781166 (1.0 GiB)
Interrupt:17 Memory:fa000000-fa012700
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:301738 errors:0 dropped:0 overruns:0 frame:0
TX packets:301738 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:42687199 (40.7 MiB) TX bytes:42687199 (40.7 MiB)
-----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 8:11 PM
To: redhat-sysadmin-list at redhat.com
Subject: Re: DHCP on Aliase eth0
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
--
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