dhcpd configuration question

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

 



Hello everyone!
Today I began setting up ip masquerading on my Linux box which is running
Red Hat 7.2 Enigma Kernel 2.4.9-31.
I mounted rh cd 2 and first installed the dhcpd daemon package and then I
went to the Linux Documentation Project internet site for pointers.
After reading I created /etc/dhcpd.conf and modified
/etc/rc.d/init.d/dhcpd so it would not try to use eth0.
The nic eth0 is the nic which my cable modem is connected too and it is
configured to use dhcp to correspond with the settings my isp requires its
customers to use.
When I start the dhcp service I am receiving the following error.
no subnet declaration for eth0
(209.128.49.233)
Please write a subnet declaration in your dhcpd.conf file for the network
segment to which interface eth0 is attached.
Obviously I don't want the dhcpd daemon to use eth0 and my dhcpd file
reflects this
I have attached both my /etc/dhcpd.conf and /etc/rc.d/init.d/dhcpd files
to this message if anyone would like to look them over.
I am puzzled as to why I am receiving this error after following
instructions as needed.
My reason for configuring a dhcp server before actually diving into the
masquerading itself is because I have a laptop which I also use at school
and I don't wish to re-set it's ip statically every day.
Any feedback which anyone on the list could provide would be greatfully
appreciated.
Feel free to contact me on list or to e-mail me directly.
Thanks in advance.
Ed Barnes

-------------- next part --------------
#!/bin/sh
#
# dhcpd         This shell script takes care of starting and stopping
#               dhcpd.
#
# chkconfig: - 65 35
# description: dhcpd provide access to Dynamic Host Control Protocol.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network
. /etc/sysconfig/dhcpd

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/sbin/dhcpd ] || exit 0
[ -f /etc/dhcpd.conf ] || exit 0
[ -f /var/lib/dhcp/dhcpd.leases ] || exit 0

RETVAL=0
prog="dhcpd"

start() {
	# Start daemons.
	echo -n $"Starting $prog: "
daemon /usr/sbin/dhcpd DEVICE=eth2
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
	return $RETVAL
}

stop() {
	# Stop daemons.
	echo -n $"Shutting down $prog: "
	killproc dhcpd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
	return $RETVAL
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	stop
	start
	RETVAL=$?
	;;
  condrestart)
	if [ -f /var/lock/subsys/dhcpd ]; then
	    stop
	    start
	    RETVAL=$?
	fi
	;;
  status)
	status dhcpd
	RETVAL=$?
	;;
  *)
	echo $"Usage: $0 {start|stop|restart|condrestart|status}"
	exit 1
esac

exit $RETVAL

/sbin/route add -host 255.255.255.255 device=eth2
-------------- next part --------------
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.50 192.168.0.254;
default-lease-time 86400;
max-lease-time 86400;
option routers 192.168.0.1;
option ip-forwarding off;
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
option domain-name-servers 24.139.0.12, 24.139.0.13;
option netbios-name-servers 192.168.0.1;
option netbios-dd-server 192.168.0.1;
option netbios-node-type 8;
option netbios-scope "";
}


[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux