#vi /etc/init.d/dhcpd . /etc/rc.d/init.d/functions . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -f /usr/sbin/dhcpd ] || exit 0 [ -f /etc/dhcpd.conf ] || exit 0 RETVAL=0 # See how we were called. case "$1" in start) # Start daemons. echo -n "Starting dhcpd: " daemon /usr/sbin/dhcpd eth1 RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd ;; stop) # Stop daemons. echo -n "Shutting down dhcpd: " killproc dhcpd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd ;; restart|reload) $0 stop $0 start RETVAL=$? ;; status) status dhcpd RETVAL=$? ;; *) echo "Usage: dhcpd {start|stop|restart|status}" exit 1 esac exit $RETVAL
其中 daemon /usr/sbin/dhcpd eth0 这句为指定需要对于那一个网卡的IP段内的机器进行解析。
如果为第二块网卡设 为:eth1
使用服务命令进行启动和停止
#service dhcpd start|stop|restart
无错误输出则该配置文件无误.
加入到启动服务中:
#chkconfig --add dhcpd
#chkconfig --level 2345 dhcpd on
#chkconfig --list dhcpd
#dhcpd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
则配置完成!
转载地址:http://tech.ccidnet.com/art/302/20071227/1324041_1.html
欢迎访问最专业的网吧论坛,无盘论坛,网吧经营,网咖管理,网吧专业论坛https://bbs.txwb.com |
关注天下网吧微信,了解网吧网咖经营管理,安装维护:
本文来源:赛迪网 作者:佚名