poloshiao 写了: ping -c 3 192.168.8.1
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
From 192.168.8.155 icmp_seq=1 Destination Host Unreachable
From 192.168.8.155 icmp_seq=2 Destination Host Unreachable
From 192.168.8.155 icmp_seq=3 Destination Host Unreachable
--- 192.168.8.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2016ms
pipe 3
從這個開始 不通
意思是 你的 電腦 或者 說 你的 eth0 界面 到 路由 (gateway) 是 不通的
所以當然 無法上網
sudo dhclient -v eth0
記得 加 sudo
把結果 直接複製 貼上來 不必擷圖
5.root@mimixi666-virtual-machine:~# ping -c 3 forum.ubuntu.org.cn
你爲何使用 root 登入 ?
補充
Ubuntu 預設是 把 root 登入 關閉
除非你很了解 root 權限
否則 建議你使用 非 root 使用者 登入
需要 root 權限時 再加 sudo
poloshiao 写了: ping -c 3 192.168.8.1
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
From 192.168.8.155 icmp_seq=1 Destination Host Unreachable
From 192.168.8.155 icmp_seq=2 Destination Host Unreachable
From 192.168.8.155 icmp_seq=3 Destination Host Unreachable
--- 192.168.8.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2016ms
pipe 3
從這個開始 不通
意思是 你的 電腦 或者 說 你的 eth0 界面 到 路由 (gateway) 是 不通的
所以當然 無法上網
sudo dhclient -v eth0
記得 加 sudo
把結果 直接複製 貼上來 不必擷圖
5.root@mimixi666-virtual-machine:~# ping -c 3 forum.ubuntu.org.cn
你爲何使用 root 登入 ?
補充
Ubuntu 預設是 把 root 登入 關閉
除非你很了解 root 權限
否則 建議你使用 非 root 使用者 登入
需要 root 權限時 再加 sudo
大神,你那么迟都没有睡觉的??真厉害!!
对了,因为昨晚有瞎搞了一下网络,可能更改过,所有的参数,现在我重新贴过你叫我打的命令代码效果:
root@mimixi666-virtual-machine:~# lshw -numeric -class network
*-network
description: Ethernet interface
product: 79c970 [PCnet32 LANCE] [1022:2000]
vendor: Advanced Micro Devices, Inc. [AMD] [1022]
physical id: 4
bus info: pci@0000:02:04.0
logical name: eth0
version: 10
serial: 00:0c:29:d0:b2:f4
width: 32 bits
clock: 33MHz
capabilities: bus_master rom ethernet physical logical
configuration: broadcast=yes driver=pcnet32 driverversion=1.35 ip=192.168.8.155 latency=64 link=yes maxlatency=255 mingnt=6 multicast=yes
resources: irq:18 ioport:2000(size=128) memory:e7b00000-e7b0ffff
root@mimixi666-virtual-machine:~# ifconfig -a
eth0 Link encap:以太网 硬件地址 00:0c:29:d0:b2:f4
inet 地址:192.168.8.155 广播:192.168.8.255 掩码:255.255.255.0
inet6 地址: fe80::20c:29ff:fed0:b2f4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:88 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:736 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:15166 (15.1 KB) 发送字节:50549 (50.5 KB)
中断:18 基本地址:0x2000
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:1110 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:1110 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:88314 (88.3 KB) 发送字节:88314 (88.3 KB)
root@mimixi666-virtual-machine:~# route -nv
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 192.168.8.1 0.0.0.0 UG 0 0 0 eth0
192.168.8.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
192.168.30.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
root@mimixi666-virtual-machine:~# dhclient -v
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit
https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:0c:29:d0:b2:f4
Sending on LPF/eth0/00:0c:29:d0:b2:f4
Sending on Socket/fallback
DHCPREQUEST of 192.168.30.128 on eth0 to 255.255.255.255 port 67 (xid=0x30c81b11)
DHCPACK of 192.168.30.128 from 192.168.30.254
RTNETLINK answers: File exists
bound to 192.168.30.128 -- renewal in 689 seconds.
root@mimixi666-virtual-machine:~# ping -c 3 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.039 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.049 ms
--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.039/0.045/0.049/0.007 ms
root@mimixi666-virtual-machine:~# ping -c 3 192.168.8.155
PING 192.168.8.155 (192.168.8.155) 56(84) bytes of data.
64 bytes from 192.168.8.155: icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from 192.168.8.155: icmp_seq=2 ttl=64 time=0.069 ms
64 bytes from 192.168.8.155: icmp_seq=3 ttl=64 time=0.056 ms
--- 192.168.8.155 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2012ms
rtt min/avg/max/mdev = 0.044/0.056/0.069/0.011 ms
root@mimixi666-virtual-machine:~# ping -c 3 192.168.8.1
PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
From 192.168.8.155 icmp_seq=1 Destination Host Unreachable
From 192.168.8.155 icmp_seq=2 Destination Host Unreachable
From 192.168.8.155 icmp_seq=3 Destination Host Unreachable
--- 192.168.8.1 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2000ms
pipe 3
root@mimixi666-virtual-machine:~# ping -c 3 198.71.86.201
PING 198.71.86.201 (198.71.86.201) 56(84) bytes of data.
From 192.168.8.155 icmp_seq=1 Destination Host Unreachable
From 192.168.8.155 icmp_seq=2 Destination Host Unreachable
From 192.168.8.155 icmp_seq=3 Destination Host Unreachable
--- 198.71.86.201 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2010ms
pipe 3
root@mimixi666-virtual-machine:~# sudo dhclient -v eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit
https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:0c:29:d0:b2:f4
Sending on LPF/eth0/00:0c:29:d0:b2:f4
Sending on Socket/fallback
DHCPREQUEST of 192.168.30.128 on eth0 to 255.255.255.255 port 67 (xid=0x1783fca4)
DHCPACK of 192.168.30.128 from 192.168.30.254
RTNETLINK answers: File exists
bound to 192.168.30.128 -- renewal in 857 seconds.
已经全部按照你给的所有命令打出效果了。。。直接复制粘贴过来的。。