免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1069 | 回复: 4
打印 上一主题 下一主题

dhcpd 服务不能正常使用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-23 10:45 |只看该作者 |倒序浏览
我是新手,才开始练习用redhat 8.0 装服务器。
使用完全安装。
先配置 iptables
iptables -L 显示如下:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
RH-Lokkit-0-50-INPUT  all  --  anywhere             anywhere           

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  192.168.1.0/24       anywhere           
ACCEPT     all  --  anywhere             192.168.1.0/24     
DROP       all  -- !192.168.1.0/24       anywhere           

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain RH-Lokkit-0-50-INPUT (1 references)
target     prot opt source               destination         
ACCEPT     udp  --  61.134.2.9           anywhere           udp spt:domain dpts:1025:65535
ACCEPT     udp  --  dns.sn.cninfo.net    anywhere           udp spt:domain dpts:1025:65535
ACCEPT     udp  --  anywhere             anywhere           udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT     udp  --  anywhere             anywhere           udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT     all  --  anywhere             anywhere           
REJECT     tcp  --  anywhere             anywhere           tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT     tcp  --  anywhere             anywhere           tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT     udp  --  anywhere             anywhere           udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT     udp  --  anywhere             anywhere           udp dpt:nfs reject-with icmp-port-unreachable
REJECT     tcp  --  anywhere             anywhere           tcp dpts11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT     tcp  --  anywhere             anywhere           tcp dptfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

用该机器做为路由使用,正常。

后配 dhcp 服务,编辑/etc/dhcpd.conf 文件如下:

ddns-update-style interim;
ignore client-updates;


subnet 192.168.1.0 netmask 255.255.255.0{
range 192.168.1.20 192.168.1.200;
default-lease-time 7200;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.10;
option domain-name-servers 202.134.229.4;
}

用 dhcpd restart  命令重新启动 dhcp  服务。

然后用另一台计算机(windows 2000 )配置静态地址,能通过 linux 的机器上网。
然后将该机器(windows 2000)作为客户端设置为自动获取 ip 地址 对linux 的dhcp服务进行测试。
确无法获得ip地址。
请问,这个问题的出现和哪些因素有关。能排除 iptables 的配置原因吗?

[ 本帖最后由 happylala 于 2005-12-26 10:53 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2005-12-23 15:05 |只看该作者
谁能给看一下啊。

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
3 [报告]
发表于 2005-12-23 15:51 |只看该作者
dhcp与iptables没有关系.

论坛徽章:
0
4 [报告]
发表于 2005-12-23 16:00 |只看该作者
看看你的服务启动了没,要是启动了还不行就关了IPTABLE:

# ps -A | grep dhcpd      //看看有没有服务进程

# netstat -an            //看看DHCP的服务端口启动没

论坛徽章:
0
5 [报告]
发表于 2005-12-26 10:41 |只看该作者
谢谢,各位。问题已经解决了,
是由于 dhcp 没有启动。
应当用:
/etc/init.d/dhcpd start 启动服务。
我错误的使用:
dhcpd start
没有启动 dhcp 服务。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP