我升级了一台 Ubuntu 16.04 LTS 服务器的主板。板载以太网无法正常工作。有些实用程序可以工作(nslookup dig),而有些则不行(ping、apt),但如果我启动 Live 会话,一切都会按预期工作。
我尝试使用网络管理器和 /etc/network/interfaces,结果类似。我认为这可能与卡的初始化方式有关,因为实时会话使用的方法与普通的 initramfs 不同。
auto lo
iface lo inet loopback
# Onboard Ethernet Chip
auto enp1s0
iface enp1s0 inet static
address 192.168.1.24
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4 75.75.75.75 75.75.76.76
#PCI network card
auto eth1
iface eth1 inet static
address 192.168.1.24
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4 75.75.75.75 75.75.76.76
我无法提供电流,ip a
因为板载芯片目前已被禁用并且机器正在使用中。
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:e0:4c:23:2f:4f brd ff:ff:ff:ff:ff:ff
inet 192.168.1.24/24 brd 192.168.1.255 scope global enp1s10
valid_lft forever preferred_lft forever
inet6 2603:3001:600:4a00:2e0:4cff:fe23:2f4f/64 scope global mngtmpaddr dynamic
valid_lft 282021sec preferred_lft 282021sec
inet6 fe80::2e0:4cff:fe23:2f4f/64 scope link
valid_lft forever preferred_lft forever
# ifconfig -a
enp1s0 Link encap:Ethernet HWaddr 70:85:c2:52:a7:90
inet addr:192.168.1.24 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5e0c:24b8:27f4:2e6c/64 Scope:Link
inet6 addr: 2603:3001:600:4a00::e26d/128 Scope:Global
inet6 addr: 2603:3001:600:4a00:9a35:f87c:b10f:c5a0/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3536 errors:0 dropped:0 overruns:0 frame:0
TX packets:1868 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:489507 (489.5 KB) TX bytes:929238 (929.2 KB)
Interrupt:18
enp2s10 Link encap:Ethernet HWaddr 00:e0:4c:23:2f:4f
inet addr:192.168.1.125 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2603:3001:600:4a00:43af:6646:5ef6:c246/64 Scope:Global
inet6 addr: fe80::7794:bc85:8805:13c7/64 Scope:Link
inet6 addr: 2603:3001:600:4a00::770/128 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:958 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:100336 (100.3 KB) TX bytes:16421 (16.4 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
root@thelma:/etc# lshw -C network
*-network
description: Ethernet interface
product: RTL8169 PCI Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: a
bus info: pci@0000:02:0a.0
logical name: eth1
version: 10
serial: 00:e0:4c:23:2f:4f
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: pm bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.1.24 latency=64 link=yes maxlatency=64 mingnt=32 multicast=yes port=MII speed=1Gbit/s
resources: irq:19 ioport:e800(size=256) memory:effffc00-effffcff memory:effc0000-effdffff
*-network
description: Ethernet interface
product: QCA8171 Gigabit Ethernet
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:01:00.0
logical name: enp1s0
version: 10
serial: 70:85:c2:52:a7:90
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=alx duplex=full ip=192.168.1.26 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:27 memory:efec0000-efefffff ioport:dc00(size=128)
lsmod 禁用板载芯片
# lsmod
Module Size Used by
ipt_REJECT 16384 3
nf_reject_ipv4 16384 1 ipt_REJECT
xt_multiport 16384 1
iptable_filter 16384 1
ip_tables 24576 1 iptable_filter
x_tables 36864 4 ip_tables,xt_multiport,iptable_filter,ipt_REJECT
binfmt_misc 20480 1
nvidia 11407360 40
snd_hda_codec_realtek 90112 1
snd_hda_codec_generic 77824 1 snd_hda_codec_realtek
kvm_amd 65536 0
kvm 548864 1 kvm_amd
irqbypass 16384 1 kvm
crct10dif_pclmul 16384 0
snd_hda_intel 40960 3
crc32_pclmul 16384 0
snd_hda_codec 135168 3 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_intel
snd_hda_core 77824 4 snd_hda_codec_realtek,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
ghash_clmulni_intel 16384 0
aesni_intel 167936 0
snd_hwdep 16384 1 snd_hda_codec
aes_x86_64 20480 1 aesni_intel
lrw 16384 1 aesni_intel
gf128mul 16384 1 lrw
snd_pcm 106496 3 snd_hda_codec,snd_hda_intel,snd_hda_core
glue_helper 16384 1 aesni_intel
snd_seq_midi 16384 0
ablk_helper 16384 1 aesni_intel
snd_seq_midi_event 16384 1 snd_seq_midi
cryptd 20480 3 ghash_clmulni_intel,aesni_intel,ablk_helper
snd_rawmidi 32768 1 snd_seq_midi
snd_seq 69632 2 snd_seq_midi_event,snd_seq_midi
drm 364544 2 nvidia
i2c_nforce2 16384 0
snd_seq_device 16384 3 snd_seq,snd_rawmidi,snd_seq_midi
edac_mce_amd 24576 0
snd_timer 32768 2 snd_pcm,snd_seq
edac_core 53248 0
k10temp 16384 0
fam15h_power 16384 0
shpchp 36864 0
snd 81920 16 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore 16384 1 snd
8250_fintek 16384 0
input_leds 16384 0
serio_raw 16384 0
mac_hid 16384 0
nfsd 319488 1
auth_rpcgss 61440 1 nfsd
nfs_acl 16384 1 nfsd
lockd 94208 1 nfsd
grace 16384 2 nfsd,lockd
parport_pc 32768 1
sunrpc 335872 5 nfsd,auth_rpcgss,lockd,nfs_acl
ppdev 20480 0
lp 20480 0
parport 49152 3 lp,ppdev,parport_pc
autofs4 40960 3
raid10 49152 0
raid456 110592 0
async_raid6_recov 20480 1 raid456
async_memcpy 16384 2 raid456,async_raid6_recov
async_pq 16384 2 raid456,async_raid6_recov
async_xor 16384 3 async_pq,raid456,async_raid6_recov
async_tx 16384 5 async_pq,raid456,async_xor,async_memcpy,async_raid6_recov
xor 24576 1 async_xor
raid6_pq 102400 3 async_pq,raid456,async_raid6_recov
libcrc32c 16384 1 raid456
raid0 20480 0
multipath 16384 0
linear 16384 0
raid1 36864 3
pata_acpi 16384 0
psmouse 131072 0
r8169 86016 0
sata_nv 32768 6
pata_amd 20480 0
mii 16384 1 r8169
floppy 73728 0
fjes 28672 0