LinuxSir.cn,穿越时空的Linuxsir!

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

搞不定DHCP client ,来求助下!

[复制链接]
发表于 2009-3-2 17:07:19 | 显示全部楼层 |阅读模式
IP地址获取不了

用VMWARE安装的LFS 6.3,现在准备把网卡设置成DHCP方式自动获取IP,参考了BLFS的手册,安装了blfs-bootscripts-20080816,运行:make install-service-dhclient

并且生成了/etc/sysconfig/network-devices/ifconfig.eth0/dhclient和/etc/dhclient.conf,启动机器的时候也没提示错误,但运行ifconfig 看不到IP,系统日志错误如下:

Mar 2 16:47:46 mylinux dhclient: execve (/sbin/dhclient-script, ...): No such file or directory
Mar 2 16:47:46 mylinux dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Mar 2 16:47:46 mylinux dhclient: execve (/sbin/dhclient-script, ...): No such file or directory
Mar 2 16:47:46 mylinux dhclient: bound to 192.168.153.129 -- renewal in 707 seconds.


系统里找不到/sbin/dhclient-script
发表于 2009-3-2 17:11:50 | 显示全部楼层
怎么不搞定法也要说一下吧?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-2 17:29:36 | 显示全部楼层
就是eth0 获取不了IP
回复 支持 反对

使用道具 举报

发表于 2009-3-2 21:13:03 | 显示全部楼层
你安装的是哪一个客户端?dhcpcd-4.0.11 还是DHCP-3.0.6
回复 支持 反对

使用道具 举报

发表于 2009-3-2 21:14:26 | 显示全部楼层
Finally, as the root user create the /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd configuration file using the following commands. Adjust appropriately for additional interfaces:

install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"
ONBOOT="yes"
SERVICE="dhcpcd"
DHCP_START="<insert appropriate start options here>"
DHCP_STOP="-k <insert additional stop options here>"

# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
PRINTIP="no"

# Set PRINTALL="yes" to print the DHCP assigned values for
# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
PRINTALL="no"
EOF
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-3 09:34:53 | 显示全部楼层
Post by cqcya;1955283
你安装的是哪一个客户端?dhcpcd-4.0.11 还是DHCP-3.0.6


我装的是DHCP-4.0,不过文档上不是说,做DHCP-CLIENT不用装DHCP 的啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-3 09:36:41 | 显示全部楼层
Post by cqcya;1955285
Finally, as the root user create the /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd configuration file using the following commands. Adjust appropriately for additional interfaces:

install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd << "EOF"
ONBOOT="yes"
SERVICE="dhcpcd"
DHCP_START="<insert appropriate start options here>"
DHCP_STOP="-k <insert additional stop options here>"

# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
PRINTIP="no"

# Set PRINTALL="yes" to print the DHCP assigned values for
# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
PRINTALL="no"
EOF



我就是参照文档,先下载 blfs-bootscripts-20080816 ,然后make install-service-dhclient,再创建dhclient

install -v -d /etc/sysconfig/network-devices/ifconfig.eth0 &&
cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhclient << "EOF"
ONBOOT="yes"
SERVICE="dhclient"
DHCP_START="-q <add additional start parameters here>"
DHCP_STOP="-q -r <add additional stop parameters here>"

# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
PRINTIP="no"

# Set PRINTALL="yes" to print the DHCP assigned values for
# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
PRINTALL="no"
EOF
回复 支持 反对

使用道具 举报

发表于 2009-3-3 09:43:53 | 显示全部楼层
DHCP_START="-q <add additional start parameters here>"
DHCP_STOP="-q -r <add additional stop parameters here>"
“<add additional start parameters here>"这个值你修改了吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-3-3 10:40:08 | 显示全部楼层
Post by cqcya;1955487
DHCP_START="-q <add additional start parameters here>"
DHCP_STOP="-q -r <add additional stop parameters here>"
“<add additional start parameters here>"这个值你修改了吗?


改了,我两项都没有设置,空值
回复 支持 反对

使用道具 举报

发表于 2009-3-3 11:34:15 | 显示全部楼层
CBLFS 使用的是 dhcp-3.1.0
http://cblfs.cross-lfs.org/index.php/Dhcp

BLFS 使用的是 dhcp-3.0.6
http://www.linuxfromscratch.org/blfs/view/stable/server/dhcp.html

您可以考虑一下,为什么他们都不用 dhcp-4.0?

您要是执意使用 4.0 版,不妨搜搜偶的帖子。
具体处理很简单,但偶是完全自定义的系统,您要自己修改使其适合您的系统。
回复 支持 反对

使用道具 举报

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

本版积分规则

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