LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DHCP server problems -- can't get my box to work as a router (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-server-problems-cant-get-my-box-to-work-as-a-router-159009/)

KingofBLASH 03-17-2004 12:55 PM

DHCP server problems -- can't get my box to work as a router
 
I am trying to turn a slackware box into a router and general purpose server. I have gotten stuck setting up the DHCP server.

The box has 3 ethernet cards, Intel EtherExpress Pro 10/100 PCIs. eth0 is connected to my cable modem, and eth1 and eth2 are connected via crossover cables to the other computers on my network.

I set up my Slackware /etc/rc.d/rc.inet1.conf to the following:

# Configuration for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

#configuration for eth1
IPADDR[1]="192.168.0.1"
NETMASK[1]="255.255.255.255"
USE_DHCP[1]="no"
DHCP_HOSTNAME[1]=""

# configuration for eth2
IPADDR[2]="192.168.1.1"
NETMASK[2]="255.255.255.255"
USE_DHCP[2]="no"
DHCP_HOSTNAME[2]=""

I the created the dhcpd.conf file in /etc/ to have the following values:

max-lease-time 172800;
default-lease-time 86400;
ddns-update-style ad-hoc;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers dev eth0;
# where 1.1.1.1 is the ip of my 3 domain name
# servers, which I found in /etc/resolv.conf
option domain-name-servers 1.1.1.1, 1.1.1.1, 1.1.1.1;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.200
}

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.200
}

When I run:

/sbin/dhcpcd -d eth1
or
/sbin/dhcpcd -d eth2

It spits out:

MAC ADDRESS 00:00:00

Where 00:00:00 is the actual MAC address of the interface.

Then, inexplicably, it dies. ps -aux | grep dhcpcd doesn't show any running servers -- so it didn't fork into the background -- and it takes the interface down -- i.e. if I /sbin/ifconfig the interface is no longer up with the IP address it's assigned. I've checked /var/log/messages and there's no debug info.

Anybody know where I'm screwing up?

Many thanks in advance!

Dan

/bin/bash 03-21-2004 06:19 AM

Some programs need you to pass an argument before they load as a daemon. For instance /sbin/dhcpd -daemon eth1 eth2.

<edit> Sorry I had to remove the part of my post that makes me look really stupid. :o


All times are GMT -5. The time now is 07:09 PM.