全新安装的 14.04 服务器网络无法正常工作

全新安装的 14.04 服务器网络无法正常工作

我刚刚安装了 14.04 服务器,安装程序能够连接到互联网以完成安装。但是,在安装结束时重新启动后,我无法连接到网络。安装程序无法自动设置网络连接,因此我手动设置了网络连接。现在我无法 ping 路由器或本地网络上的任何其他计算机。有人能建议从哪里开始吗?

我的 /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 eth1
iface eth1 inet static
    address 192.168.0.9
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
gateway 192.168.0.1

这是 sudo ethtool eth1 的输出:

Settings for eth1:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Half 1000baseT/Full 
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes:  Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Speed: Unknown!
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Supports Wake-on: g
Wake-on: g
Current message level: 0x000000ff (255)
               drv probe link timer ifdown ifup rx_err tx_err
Link detected: no

这是 sudo lshw -C network 的输出:

  *-network:0 DISABLED
   description: Ethernet interface
   product: NetXtreme BCM5703X Gigabit Ethernet
   vendor: Broadcom Corporation
   physical id: 4
   bus info: pci@0000:02:01.0
   logical name: eth0
   version: 02
   serial: 00:0e:7f:ef:a5:df
   capacity: 1Gbit/s
   width: 64 bits
   clock: 66MHz
   capabilities: pcix pm vpd msi bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5703-v2.22 latency=64 link=no mingnt=64 multicast=yes port=twisted pair
   resources: irq:18 memory:f2cf0000-f2cfffff memory:f0040000-f004ffff
  *-network:1
   description: Ethernet interface
   product: NetXtreme BCM5703X Gigabit Ethernet
   vendor: Broadcom Corporation
   physical id: 2
   bus info: pci@0000:02:02.0
   logical name: eth1
   version: 02
   serial: 00:0e:7f:ef:a5:de
   capacity: 1Gbit/s
   width: 64 bits
   clock: 66MHz
   capabilities: pcix pm vpd msi bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5703-v2.22 ip=192.168.0.9 latency=64 link=no mingnt=64 multicast=yes port=twisted pair
   resources: irq:20 memory:f2ce0000-f2ceffff memory:f0050000-f005ffff
  *-network:2 DISABLED
   description: Ethernet interface
   product: NetXtreme BCM5701 Gigabit Ethernet
   vendor: Broadcom Corporation
   physical id: 1
   bus info: pci@0000:06:01.0
   logical name: eth2
   version: 15
   serial: 00:08:02:28:b1:60
   capacity: 1Gbit/s
   width: 64 bits
   clock: 66MHz
   capabilities: pcix pm vpd msi bus_master cap_list rom ethernet physical fibre 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=5701s-v2.19 latency=64 link=no mingnt=64 multicast=yes port=fibre
   resources: irq:21 memory:f7ff0000-f7ffffff memory:f0060000-f006ffff

答案1

您确定网线已经插好了吗?

UBUNTU 基础安装使用 分配 IP 地址DHCP。除非在安装过程中$USER分配了静态 IP 地址。

摘自原始帖子。

输出lshw -C network

*-网络:1 逻辑名称:eth1

输出ethtool eth1

设置eth1

Link detected: no

  1. 检查网线。

  2. 在 shell 提示符下输入命令ifconfig

“发布该输出”。 IPaddress, NETWORK, SUBNETMASK, GATEWAY, BROADCAST, DNS,

  1. 在 shell 提示符下输入命令hostname -I

“发布该输出”。

  1. 登录到路由器/调制解调器/网桥并获取IPaddress, NETWORK, SUBNETMASK, GATEWAY路由器的,假设您只有一个路由器?

“发布私人信息IPaddress, NETWORK, SUBNETMASK, GATEWAY路由器的。

笔记:“消除”路由器的公共 IP 地址:X.X.X.X可以在我的 IP 地址是什么页面上找到。(从连接到局域网 LAN 的另一台计算机)

例如,如果您的家中有多台计算机,您可能需要知道家中每台计算机的私有 IP 地址。

您的路由器会获得公共 IP 地址,而连接到路由器的每台计算机、平板电脑和智能手机(通过有线或 wifi)都会通过 DHCP 协议或静态分配从路由器或服务器获得私有 IP 地址。这超出了问题的范围

相关内容