ubuntu – 只能启动两个接口之一

前端之家收集整理的这篇文章主要介绍了ubuntu – 只能启动两个接口之一前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的HP Proliant DL 360 G4p服务器有一个奇怪的问题.它有两个千兆以太网接口,但我只能调出其中一个.这开始吓坏了我,这就是我转向这里的原因.我正在运行x64 ubuntu 11.10服务器版.

lshw -c network显示第二个接口被禁用.我不知道为什么如何启用它.

$sudo lshw -c network
  *-network:0
       description: Ethernet interface
       product: NetXtreme BCM5704 Gigabit Ethernet
       vendor: Broadcom Corporation
       physical id: 2
       bus info: pci@0000:02:02.0
       logical name: eth0
       version: 10
       serial: 00:18:71:e3:6d:26
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 66MHz
       capabilities: pcix pm vpd msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.119 duplex=full firmware=5704-v3.27b,ASFIPMIc v2.36 ip=10.48.8.x latency=64 link=yes mingnt=64 multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:25 memory:fdf70000-fdf7ffff
  *-network:1 DISABLED
       description: Ethernet interface
       product: NetXtreme BCM5704 Gigabit Ethernet
       vendor: Broadcom Corporation
       physical id: 2.1
       bus info: pci@0000:02:02.1
       logical name: eth1
       version: 10
       serial: 00:18:71:e3:6d:25
       capacity: 1Gbit/s
       width: 64 bits
       clock: 66MHz
       capabilities: pcix pm vpd msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.119 firmware=5704-v3.27b latency=64 link=no mingnt=64 multicast=yes port=twisted pair
       resources: irq:26 memory:fdf60000-fdf6ffff

如果我尝试ifup eth1,那么我得到

$sudo ifup eth1
Ignoring unknown interface eth1=eth1.

我想这就是当/ etc / network / interfaces中没有列出eth1时会发生什么.但是当我为eth1添加配置时,我仍然无法ifup.

$sudo ifup eth1
RTNETLINK answers: File exists
Failed to bring up eth1.
I've also tried ifconfig eth1 up but without any result.

为清楚起见,我添加了一个掩码版的/ etc / network / interfaces.我不认为这是问题的原因.

$cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information,see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 10.48.8.x
        netmask 255.255.255.y
        network 10.48.8.z
        broadcast 10.48.8.t
        gateway 10.48.8.u

auto eth1
iface eth1 inet static
        address   193.190.253.x
        netmask   255.255.255.y
        network   193.190.253.z
        broadcast 193.190.253.t
        gateway   193.190.253.u

我真的需要一些帮助解决这个问题.这让我疯狂.谢谢.

我找到了解决方案. / etc / network / interfaces中定义了两个网关,而简单的网关不能有多个网关.这没有道理.

网关是您发送所有流量的IP.如果您有两个,您的路由表将具有dest 0.0.0.0的双重条目,并且系统无法处理此问题.双路由是导致RTNETLINK回答“文件存在”的原因,这意味着已存在0.0.0.0的路由.

我已经注释掉了其中一个网关,现在我可以同时使用eth0和eth1.

tl; dr删除网关条目,直到你只剩下一个.

原文链接:https://www.f2er.com/ubuntu/348637.html

猜你在找的Ubuntu相关文章