我一直在设置一个新的家庭服务器,但到目前为止,我还没能让它正常工作。我想使用以前用过的以太网电缆,但 Ubuntu (18.04) 根本不能正确使用它。
以下是一些信息:
lshw -c network
*-network
description: Ethernet interface
product: 82574L Gigabit Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:07:00.0
logical name: enp7s0
version: 00
serial: 00:19:99:c2:e6:e6
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.0-1 latency=0 link=no multicast=yes port=twisted pair
resources: irq:16 memory:ce520000-ce53ffff ioport:4000(size=32) memory:ce500000-ce503fff
*-network
description: Wireless interface
physical id: 1
bus info: usb@2:1
logical name: wlx000cf660daa1
serial: 00:0c:f6:60:da:a1
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rt2800usb driverversion=4.15.0-54-generic firmware=0.36 ip=192.168.178.100 link=yes multicast=yes wireless=IEEE 802.11
ifconfig
enp7s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:19:99:c2:e6:e6 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xce520000-ce540000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 16 bytes 1616 (1.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16 bytes 1616 (1.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx000cf660daa1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.100 netmask 255.255.255.0 broadcast 192.168.178.255
ether 00:0c:f6:60:da:a1 txqueuelen 1000 (Ethernet)
RX packets 2981 bytes 525689 (525.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 177 bytes 35551 (35.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sudo nano /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
enp7s0:
dhcp4: yes
wifis:
wlx000cf660daa1:
dhcp4: yes
addresses: [192.168.178.100/24]
以下是我在过去两天尝试/做的一些事情:
- 检查以太网线是否良好(是的)
- 尝试多种不同的 netplan 配置(DHCP 开/关、静态 IP 等)
- 更新 Ubuntu,看看是否可以安装新的驱动程序。
我读了很多 askubuntu 上的论坛帖子和这里的一些问题,但仍然无法解决这个问题。目前服务器中有一个无线加密狗,所以我可以从我的另一台电脑等访问它 :)