LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: YaoM

网络问题 mask: Host name lookup failure[solved]

[复制链接]
发表于 2008-12-26 20:07:30 | 显示全部楼层
Post by YaoM;1930161
啥叫openrc??
我ping网关是可以ping通的


这里是什么叫openrc:
http://www.gentoo.org/doc/zh_cn/openrc-migration.xml

执行/etc/init.d/net.eth0 start 失败,提示信息如上
几个相关文件:

eth0都没有起来,也能ping通??
那看看你的,执行:ifconfig      看看是什么东东。还有你ping公网不通是吗??如果外网通的话,有没有可能无法解析域名的原因呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-26 20:22:54 | 显示全部楼层
Post by shellworld;1930190
这里是什么叫openrc:
http://www.gentoo.org/doc/zh_cn/openrc-migration.xml

执行/etc/init.d/net.eth0 start 失败,提示信息如上
几个相关文件:

eth0都没有起来,也能ping通??
那看看你的,执行:ifconfig      看看是什么东东。还有你ping公网不通是吗??如果外网通的话,有没有可能无法解析域名的原因呢?


关于openrc    那个链接我看过了,不太懂。。。

ifconfig只有lo选项,但是执行:ifconfig eth0 up是可以的
之后再 ifconfig 就有eth0 和lo的选项,具体内容 我现在不在gentoo下没法看
ping本机ip和网关可以,但是ping局域网(设置好ip可以直接连接的)不通
应该不是dns的问题,否则我直接用ip是可以连接局域网的。
现在就是Host name搞不定,头大死了。
不知大侠可否把配置文件贴出来对照对照~~
回复 支持 反对

使用道具 举报

发表于 2008-12-26 20:36:45 | 显示全部楼层
Post by YaoM;1930195
关于openrc    那个链接我看过了,不太懂。。。

ifconfig只有lo选项,但是执行:ifconfig eth0 up是可以的
之后再 ifconfig 就有eth0 和lo的选项,具体内容 我现在不在gentoo下没法看
ping本机ip和网关可以,但是ping局域网(设置好ip可以直接连接的)不通
应该不是dns的问题,否则我直接用ip是可以连接局域网的。
现在就是Host name搞不定,头大死了。
不知大侠可否把配置文件贴出来对照对照~~

那你就不用管Openrc了,看看openrc 有没有安装就是了。emerge --search openrc

如果安装了,按照我的改了试试。我的net里面也就这点东西。可能是你的格式有问题。。

hostname,我看不出有什么问题。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-26 22:29:28 | 显示全部楼层

  1. # emerge -s openrc
  2. Searching...   
  3. [ Results for search key : openrc ]
  4. [ Applications found : 1 ]

  5. *  sys-apps/openrc
  6.       Latest version available: 0.4.1
  7.       Latest version installed: [ Not Installed ]
  8.       Size of files: 141 kB
  9.       Homepage:      http://roy.marples.name/openrc
  10.       Description:   OpenRC manages the services, startup and shutdown of a host
  11.       License:       BSD-2
复制代码
回复 支持 反对

使用道具 举报

发表于 2008-12-27 10:03:12 | 显示全部楼层
Post by YaoM;1929807
执行/etc/init.d/net.eth0 start 失败,提示信息如上
几个相关文件:

  1. /etc/hosts:
  2. # /etc/hosts: Local Host Database
  3. #

  4. 127.0.0.1  localhost.localdomain  localhost supertux
  5. ::1                localhost
复制代码



  1. /etc/conf.d/hostname:

  2. # /etc/conf.d/hostname

  3. # Set to the hostname of this machine
  4. HOSTNAME="supertux"

复制代码


  1. /etc/conf.d/net:
  2. # This blank configuration will automatically use DHCP for any net.*
  3. # scripts in /etc/init.d.  To create a more complete configuration,
  4. # please review /etc/conf.d/net.example and save your configuration
  5. # in /etc/conf.d/net (this file :]!).
  6. config_eth0=( "xxx.xxx.xxx.xxx mask 255.255.255.0 brd xxx.xxx.xxx255" )
  7. routes_eth0=( "default via xxx.xxx.xxx.1" )
  8. dns_servers_eth0="10.10.0.21"
  9. dns_domain_eth0="localdomain"
复制代码



文档看了好几次,照着改了好几个地方,无奈一直没解决,所以请各位帮帮忙:)
我们学校的网络是静态IP的,同时教室、图书馆提供无线网络(dhcp)。
无线网络我试过,是可以连接的;本地的网络不知哪里配置的不对,
执行/etc/init.d/net.eth0 start ,老是提示: mask: Host name lookup failure
各位大侠走过路过不要绕过呀


晕倒,这里面好几个地方错都没有看到。
config_eth0=( "xxx.xxx.xxx.xxx mask 255.255.255.0 brd xxx.xxx.xxx255" )
改为:
config_eth0=( "xxx.xxx.xxx.xxx netmask 255.255.255.0 brd xxx.xxx.xxx.255" )

再试试吧!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-27 12:36:20 | 显示全部楼层
Post by shellworld;1930379
晕倒,这里面好几个地方错都没有看到。
config_eth0=( "xxx.xxx.xxx.xxx mask 255.255.255.0 brd xxx.xxx.xxx255" )
改为:
config_eth0=( "xxx.xxx.xxx.xxx netmask 255.255.255.0 brd xxx.xxx.xxx.255" )

再试试吧!


OGM.This is a stupid mistake!
Thanks very much.
回复 支持 反对

使用道具 举报

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

本版积分规则

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