首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >替换Ubuntu上的组件后,网络不再工作。

问替换Ubuntu上的组件后,网络不再工作。
EN

Server Fault用户
提问于 2013-01-02 11:47:24
回答 2查看 2.3K关注 0票数 1

我的服务器的主板(Ubuntu8.04)死了,所以我更换了主板、CPU和RAM。现在,我无法让服务器在网络上工作,因为它是配置的。

网络是在没有DHCP的情况下配置的。

路由器IP为10.10.10.1。服务器是10.10.10.10。

含量/etc/network/interfaces:

代码语言:javascript
复制
auto eth0
iface eth0 inet static
    address 10.10.10.10
    netmask 255.255.255.0
    gateway 10.10.10.1

点击路由器(ping 10.10.10.1)导致:

代码语言:javascript
复制
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
From 10.10.10.10 icmp_seq=1 Destination Host Unreachable
From 10.10.10.10 icmp_seq=2 Destination Host Unreachable
...

ifconfig eth0:

的结果

代码语言:javascript
复制
eth0     Link encap:Ethernet  HWaddr  90:2b:34:a5:c9:af
         inet addr:10.10.10.10 Bcast: 10.10.10.255  Mask: 255.255.255.0
         inet6 addr: fe80... ( skipped typing this )
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:0 errors:0 dropped:0 overrruns: 0 frame:0
         TX packets:446 errors:0 dropped:0 overrruns: 0 carrier:0
         collisions: 0 txqueuelen:1000
         RX bytes:o (0.0 B)  TX bytes:32324 (31.5kb)
         Interrupt:220 Base address:0xa00

route:

的结果

代码语言:javascript
复制
Kernel IP routing table
Destination    Gateway         Genmask                Flags   Metric   Ref   Use   iFace
10.10.10.0     *               255.255.255.0          U       0        0       0   eth0
link-local     *               255.255.0.0            U       1000     0       0   eth0
default        10.10.10.1      0.0.0.0                UG      100      0       0   eth0

(注:前两个结果立即出现。最后一行(默认路由)出现在大约20秒之后。如果我做了route -n,所有的结果都会立即显示。)

iptables -L的结果显示没有iptables条目。

/etc/hostname:

的内容

代码语言:javascript
复制
Server

/etc/hosts:

的内容

代码语言:javascript
复制
127.0.0.1        localhost.localdomain localhost
10.10.10.10      Server.localdomain Server

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

mii-tool:

的结果

代码语言:javascript
复制
SIOCGMIIPHY on `eth0` failed: Operation not supported
SIOCGMIIPHY on `eth1` failed: Operation not supported
SIOCGMIIPHY on `eth2` failed: Operation not supported
SIOCGMIIPHY on `eth3` failed: Operation not supported
SIOCGMIIPHY on `eth4` failed: Operation not supported
SIOCGMIIPHY on `eth5` failed: Operation not supported
SIOCGMIIPHY on `eth6` failed: Operation not supported
SIOCGMIIPHY on `eth7` failed: Operation not supported
no MII interfaces found

sudo mii-tool:

的结果

代码语言:javascript
复制
SIOCGMIIPHY on `eth0` failed: Operation not supported
no MII interfaces found

arp -a:

的结果

代码语言:javascript
复制
? (10.10.10.1) at <incomplete> on eth0

dmesg | grep eth0:

的结果

代码语言:javascript
复制
[    22.188268] eth0: RTL8169 at 0xf8888000, 90:2b:34:a5:c9:af, XID 2c900800 IRQ 220
[    41.919804] r8169: eth0: link up

我已经禁用了IPv6,如这里所描述的,因为dmesg在抱怨:

代码语言:javascript
复制
eth0: no IPv6 routers present

我尝试过不同的网络电缆和路由器端口。网络上的其他计算机运行良好(它们的静态in也在10.10.10.x范围内)。

最初,网络设备被命名为eth2。我删除了/etc/udev/rules.d/70-persistent-net.rules,它成功地重新生成,新的NIC保留了所需的eth0名称。谢谢你的建议海斯·斯派特。

任何想法都会有很大帮助。谢谢!

EN

回答 2

Server Fault用户

回答已采纳

发布于 2013-01-03 03:36:52

移除旧的r8169驱动程序和安装最新的r8168完成了这一任务。

干杯。

票数 0
EN

Server Fault用户

发布于 2013-01-02 11:59:54

您正在使用的网卡是否集成在主板中?

那么,它被替换了吗?

如果是,请检查udev:/etc/udev/rules.d/70-persistent-net.rules。您可能需要更新网卡命名。删除旧网卡并将新网卡切换为eth0。网卡是通过MAC地址来识别的。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/462277

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档