LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   need help with dhcpd.conf file running two nics (https://www.linuxquestions.org/questions/linux-networking-3/need-help-with-dhcpd-conf-file-running-two-nics-28992/)

hwb0014 08-28-2002 09:54 AM

need help with dhcpd.conf file running two nics
 
problem is this:

I am running a linksys router in a RH72 firewall running two nics. One for the router and the other for the internal lan. At the same time, my firewall is also a dhcp and a DNS server. Is it wise to have the DHCP server and DNS on the firewall? Another thing is my dhcpd.conf file needs to be configured correctly. When i restart the dhcpd daemon, it fails because it asks me to declare a subnet for eth0 (from router). How would my syntax be for declaring a subnet for this particular interface. I have checked various websites and howto's but none were helpful.

My dhcpd.conf looks something like this:

subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.254;
option subnet-mask 255.255.255.0;

option domain-name "example.com";
option domain-name-servers 192.168.1.1;

option time-offset -18000; # Eastern Standard Time

range 192.168.1.10 192.168.1.100;
}

What device is this script variable for? Does it automatically assume it is for eth1? If so, then how do I declare a script for the likes of eth0?

Any help would be appreciated! Thanks

acid_kewpie 08-28-2002 10:49 AM

it doesn't use eth0 / eth1 directly, it simply takes the declared subnet ranges and masks them up to the ip addresses and interfaces you are already using on the machine. to get around this either...

a) delcare an empty subnet for the external interface:

subnet a.b.c.d netmask 255.255.255.0 { }

or b) start the dhcpd server on a specific interface only:

#dhcpd eth0

or which ever subnet you wish to assign addresses on. I normally go to option b) and just start it from a command line (i.e. not on boot) i'm sure it's possible to do it on bott with that option, but i'm not fussed enough to find out how. so either way there's your answer hopefully.

hwb0014 08-28-2002 11:31 AM

Is the second comment added to a specific conf file or just executed at the command line? Thanks for the feedback.

acid_kewpie 08-28-2002 11:34 AM

just from console

hwb0014 08-28-2002 11:47 AM

I think you hit it right on the button....I will try to declare the empty subnet to see if this works once I get home..Thanks for the feed


All times are GMT -5. The time now is 06:17 PM.