View previous topic :: View next topic |
Author |
Message |
hellowcaco n00b
Joined: 30 Dec 2012 Posts: 4
|
Posted: Wed Jan 02, 2013 4:05 am Post subject: 刚装的GENTOO,虚拟机中用minicd安装的,连不上网络 |
|
|
[/u][/i][/url][/post]虚拟机安装gentoo完成,启动登录成功,但是gentoo却连不上网络了。
#ping www.baidu.com
#Network is unreachable
网络如下
#ifconfig
eth0:flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.70.129 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::20c:29ff:fe87:7d18 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:87:7d:18 txqueue len 1000 (Ethernet)
RX packets 30 butes 3885(3.7 KiB)
RX errors 0 dropped 0 overruns 0 fram 0
TX packets 35 bytes 2601(2.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 base 0x2000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 byers 0(0.0B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0(0.0B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
|
Back to top |
|
|
xiao7john n00b
Joined: 27 Dec 2012 Posts: 7
|
Posted: Wed Jan 02, 2013 10:40 am Post subject: |
|
|
检查一下DNS信息,/etc/resolv.conf,如果没有或者无效,添加有效的DNS地址。 |
|
Back to top |
|
|
hellowcaco n00b
Joined: 30 Dec 2012 Posts: 4
|
Posted: Thu Jan 03, 2013 3:14 am Post subject: |
|
|
xiao7john wrote: | 检查一下DNS信息,/etc/resolv.conf,如果没有或者无效,添加有效的DNS地址。 |
我看了如下
#cd /etc
#cat resolv.conf
#Generated by dhcpcd from eth0
#/etc/resolv.conf.head can replace this line
domain localdomain
nameserver 192.168.70.2
#/etc/resolv.conf.tail can replace this line
这里应该是正确的啊 |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Thu Jan 03, 2013 4:55 am Post subject: |
|
|
Hi hellowcaco,
你的电脑是以 DHCP 方式从路由器获得 IP 的吗?
Code: |
inet 192.168.70.129 netmask 255.255.255.0 broadcast 192.168.1.255
|
这段看起来有点奇怪,不知你的网关是否设置正确?
用这个命令查看网关:
然后试试能否 ping 通网关。
如果局域网内有其他机器,比如 Windows 的,进入其网络设置部分,比对下 IP 是否类似(如,都是 192.168.1.X)以及网关是否相同。
Edit:
另外,我把你重复发的另外同一个帖子删除了 _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
hellowcaco n00b
Joined: 30 Dec 2012 Posts: 4
|
Posted: Sun Jan 06, 2013 5:33 am Post subject: |
|
|
呵呵,发了2次的原因是因为网络不是很好,点了好几下,后面才知道发了2次,抱歉!
Gentoo已经被我给整坏了,我删除了一些系统必要的东西,出错了,所以,我得重新安装了 |
|
Back to top |
|
|
|