[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [SLUG] Enabling DHCP Server




If you have 2 NICs in this machine, with an external one (160.78.24.3), plus
a private one (192.168.x.x) whose details you cut out from the ifconfig
output, try adding this to end of your /etc/dhcpd.conf:

subnet 160.78.24.3 netmask 255.255.255.0 { }

If you have one NIC in this machine, remove all the 192.168.x.x stuff from
the config & try setting up the /etc/dhcpd.conf along these lines (just as
long as you're *really* sure you want service the DHCP requests on this
subnet, because if not it can be a very quick way to ruin some network
administrator's day):

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 160.78.24.255;
option routers 160.78.24.254;
option domain-name-servers 160.78.24.1, 160.78.24.2;
option domain-name "ehelp.com";
subnet 160.78.24.0 netmask 255.255.255.0 {
   range 160.78.24.10 160.78.24.50;
   range 160.78.24.55 160.78.24.100;
}

This is my understanding of the situation as to why the above may help - the
DHCP server expects to find a 'subnet' section for every subnet that the
machine is set up for, irrelevant of whether or not it is supposed to
service DHCP requests on that subnet - and if it does not find a subnet
section, it gives the "No subnet declaration" error msg & bombs out. The
setup I have that works OK for me has a machine where the /etc/dhcpd.conf
is:

subnet 192.168.2.0 netmask 255.255.255.0

        range 192.168.2.100 192.168.2.254;
        option ip-forwarding off;
        default-lease-time 864000;
        max-lease-time 864000;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.2.255;
        option routers 192.168.2.10;
        option domain-name-servers 192.168.2.10;
        option domain-name "examplanner.com";
        option netbios-name-servers 192.168.2.10;
        option netbios-dd-server 192.168.2.10;
        option netbios-node-type 8;
        option netbios-scope "";
}
subnet 10.0.0.0 netmask 255.255.255.0 { }

... and this is what my ifconfig shows:

eth0      Link encap:Ethernet  HWaddr 00:00:93:84:44:9A
          inet addr:192.168.2.10  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:172835 errors:0 dropped:0 overruns:0 frame:0
          TX packets:143665 errors:0 dropped:0 overruns:0 carrier:0
          collisions:71 txqueuelen:100
          Interrupt:9 Base address:0x240

eth1      Link encap:Ethernet  HWaddr 00:00:93:84:44:FF
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:10 Base address:0x280

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:216 errors:0 dropped:0 overruns:0 frame:0
          TX packets:216 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0


You also can get a quick bit of info on DHCP at:
http://www.linuxdoc.org/LDP/LG/issue48/pollman.html

Cheers,
Nick.

-----Original Message-----
From: owner-slug@nospam.newtreno.spectrum.com.au
[mailto:owner-slug@nospam.newtreno.spectrum.com.au]On Behalf Of
Marko_Denev@nospam.lendlease.com.au
Sent: Saturday, 10 June 2000 5:16 PM
To: slug@nospam.slug.org.au
Subject: [SLUG] Enabling DHCP Server




Hi,

I am trying to set up dhcp server and have followed the DHCP Server setup
howto
but I Iam getting the following error message with trying to invoke the DHCP
server.

"No subnet declaration for eth0 (160.78.24.3)."

just to note. eth0 is set to 160.78.24.3

when i run ifconfig the following is displayed:-

Link encap:Ethernet  HWaddr 00:60:08:65:0E:A8
inet addr:160.78.24.3 Bcast:160.78.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped :0 overruns:0 frame:0
collisions:0 txqueuelen:100
Interrupt:10 Base address:0x6000

and file /etc/dhcpd.conf contains the following:-

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "ehelp.com";

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.50;
   range 192.168.1.55 192.168.1.100;
}

Could anyone please explain what is missing/wrong.

Thanks


****************************************************************************
*******************************************************************
Notice:
This email is confidential and may contain copyright material of Lend Lease.
If
you are not the intended recipient, please notify us immediately and delete
all
copies of this message. It is the responsibility of the recipient to virus
scan
this email.


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text