LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1024|回复: 9

新手在配置中出现问题(FTP DHCP)

[复制链接]
发表于 2006-5-15 11:16:56 | 显示全部楼层 |阅读模式
1)
浏览器能够通过ftp://127.0.0.1 登录
但在#ftp 127.0.0.1 就会出现connection refuse ?
还有ftp://172.16.40.* 就不能够登录 我想应该是我把匿名服务没有设置好
可是用户名ftp nobody 都存在

2)
DHCP在启动的时候总是出现一下信息

dhcpd failed. The error was: /etc/sysconfig/dhcpd: line 2: 0: command not found
Starting dhcpd: Internet Systems Consortium DHCP Server V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcpd.conf line 4: subnet 172.16.40.*  netmask 255.255.255.0: bad subnet number/mask combination.
subnet 172.16.40.* netmask 255.255.255.0
                                         ^
Configuration file errors encountered -- exiting

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
[FAILED]


其中"/etc/dhcpd.conf line 4: subnet 172.16.40.*  netmask 255.255.255.0: bad subnet number/mask combination.
subnet 172.16.40.* netmask 255.255.255.0 "这段是在我自己设置中出现的,之前这段提示还是存在的 只是不存在这一段

谢谢
发表于 2006-5-15 13:29:11 | 显示全部楼层
dhcp

你的dhcp文件配置有误,贴出来看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-15 15:03:05 | 显示全部楼层

DHCP

[root@wangq ~]# /etc/rc.d/init.d/dhcpd status
/etc/sysconfig/dhcpd: line 2: 0: command not found
dhcpd 已停

我一般使用的webmin 配置
更加奇怪的是安装了webmin后 每次重新启动 都要重新解压才能进入
http://localhost:10000/

能顺便给我解决一下这个问题么
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-15 15:26:29 | 显示全部楼层
以下就是dhcpd.conf 请指教

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

subnet 172.16.40.253 netmask 255.255.255.0 {
        authoritative;
        # --- default gateway
        option routers 172.16.40.254;
        option subnet-mask 255.255.255.0;
        option nis-domain "domain.org";
        option domain-name "domain.org";
        option domain-name-servers 202.98.96.68;
        option time-offset -18000;
        range dynamic-bootp 172.16.40.0 172.16.40.254;
        default-lease-time 21600;
        max-lease-time 43200;
        # we want the nameserver to appear at a fixed address
        host ns {
                next-server marvin.redhat.com;
                hardware ethernet 12:34:56:78:AB:CD;
                fixed-address 207.175.42.254;
                }
        }
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-15 15:31:56 | 显示全部楼层
以下就是dhcpd.conf 请指教

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

subnet 172.16.40.253 netmask 255.255.255.0 {
        authoritative;
        # --- default gateway
        option routers 172.16.40.254;
        option subnet-mask 255.255.255.0;
        option nis-domain "domain.org";
        option domain-name "domain.org";
        option domain-name-servers 202.98.96.68;
        option time-offset -18000;
        range dynamic-bootp 172.16.40.0 172.16.40.254;
        default-lease-time 21600;
        max-lease-time 43200;
        # we want the nameserver to appear at a fixed address
        host ns {
                next-server marvin.redhat.com;
                hardware ethernet 12:34:56:78:AB:CD;
                fixed-address 207.175.42.254;
                }
        }
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-15 17:31:43 | 显示全部楼层
因为机器的其他原因  我重新安装了系统
我所作的步骤是 先找到dhcpd.conf.sample 复制后放在/etc下 重命名为dhcpd.conf
然后到服务下启动还是成功的
但在终端使用/etc/rc.d/init.d/dhcpd start 没有反应
于是 我重新启动了网络 再输入就出现下面的信息  郁闷.........




[root@localhost ~]# /etc/rc.d/init.d/dhcpd start
启动 dhcpd:Internet Systems Consortium DHCP Server V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.

No subnet declaration for eth0 (172.16.40.253).
** Ignoring requests on eth0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eth0 is attached. **


Not configured to listen on any interfaces!

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.

谢谢指教
回复 支持 反对

使用道具 举报

发表于 2006-5-18 15:18:56 | 显示全部楼层
subnet 172.16.40.253 netmask 255.255.255.0 {

改成 subnet 172.16.40.0 netmask 255.255.255.0 {

试试看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-18 17:09:02 | 显示全部楼层
太感谢了  问题解决了

只是我还是不明白 为何要这样改
非常感谢 !!!
回复 支持 反对

使用道具 举报

发表于 2006-5-19 09:05:33 | 显示全部楼层
subnet 172.16.40.0 netmask 255.255.255.0 是定义一个你要分配地址的网段
而 range dynamic-bootp 172.16.40.0 172.16.40.254  是你要分配地址的范围
所以你的客户机自动获取ip地址的范围是从172.16.40.1~172.16.40.254
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-19 16:51:15 | 显示全部楼层
哦 明白了

谢谢 非常感谢!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表