我在笔记本电脑上运行 ubuntu 12.04 作为小型网络服务器。几个月来,一切都很顺利,但当我将它移到另一个有其他互联网连接的房子时,它开始启动缓慢,显示“等待网络配置”消息。我知道我编辑了 /etc/network/interfaces,但我记不起我修改了什么。显然,我无法获得任何互联网连接。
这是当前的 /etc/network/interfaces:
# This file...
# and how to...
# The loopback...
auto lo p2p1
iface lo inet loopback
# The primary...
auto p2p1
iface p2p1 inet dhcp
当我打字时ifconfig -a | grep p2p1
我得到
p2p1 Link encap:Ethernet HWaddr e8:40:f2:df:1c:a6
当我打字时lshw -class network
我得到
*-network DISABLED
description: Ethernet interface
(somme other stuff)
serial e8:40:f2:df:1c:a6
编辑:输入ifconfig
仅提供有关本地环回的信息,而不提供有关 eth0 的信息。
编辑 2:结果ping -c 3 google.com
PING google.com (74.125.226.195) 56(84) bytes of data.
64 bytes from lga15s28-in-f3.1e100.net (74.125.226.195): icmp_req=1 ttl=52 time=28.3ms
64 bytes from lga15s28-in-f3.1e100.net (74.125.226.195): icmp_req=2 ttl=52 time=26.7ms
64 bytes from lga15s28-in-f3.1e100.net (74.125.226.195): icmp_req=3 ttl=52 time=28.2ms
--- google.com ping statistics ---
3 packets transmitted, 3 recieved, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 26.713/27.743/28.302/0.754 ms
因此,我可以断定有互联网连接,这是个好消息。启动计算机仍然显示相同的错误消息。
编辑 3:关机时,我收到此错误消息(可能相关):
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
编辑 4:启动时,我也会得到
Starting configure network device [fail]
Starting configure virtual network devices [fail]
打字ifconfig p2p1
p2p1 Link encap:Ethernet HWaddr e8:40:f2:df:1c:a6
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ea40:f2ff:fedf:1ca6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37 errors:0 dropped:0 everruns:0 frame:0
TX packets:17 errors:0 dropped:0 everruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7839 (7.8 KB) TX bytes:1623 (1.6 KB)
...但ifconfig
仅能提供有关本地环回的信息
有什么建议可以解决这个问题吗?
谢谢!