以太网不工作

以太网不工作

无线网络运行正常,没有任何问题。

使用以太网电缆连接路由器不起作用。

是否配置

enp2s0    Link encap:Ethernet  HWaddr 22:e6:8b:31:98:31  
          inet6 addr: fe80::20e6:8bff:fe31:9831/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:658 errors:0 dropped:1 overruns:0 frame:0
          TX packets:560 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000 
          RX bytes:56297 (56.2 KB)  TX bytes:96178 (96.1 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4197 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4197 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:287630 (287.6 KB)  TX bytes:287630 (287.6 KB)

wlp3s0    Link encap:Ethernet  HWaddr 9c:b7:0d:19:a3:ab  
          inet addr:192.168.1.40  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::e632:820e:ddd6:f24b/64 Scope:Link
          inet6 addr: fe80::8684:5bf3:f9f4:f878/64 Scope:Link
          inet6 addr: fe80::a2e9:6579:4c22:3881/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3895 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3588 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2488346 (2.4 MB)  TX bytes:629810 (629.8 KB)

lspci-v

02:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
    Subsystem: Toshiba America Info Systems AR8152 v2.0 Fast Ethernet
    Flags: bus master, fast devsel, latency 0, IRQ 28
    Memory at f0100000 (64-bit, non-prefetchable) [size=256K]
    I/O ports at 2000 [size=128]
    Capabilities: [40] Power Management version 3
    Capabilities: [48] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [58] Express Endpoint, MSI 00
    Capabilities: [6c] Vital Product Data
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [180] Device Serial Number ff-00-00-00-00-00-00-ff
    Kernel driver in use: atl1c
    Kernel modules: atl1c

03:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
    Subsystem: Lite-On Communications Inc AR9285 Wireless Network Adapter (PCI-Express)
    Flags: bus master, fast devsel, latency 0, IRQ 17
    Memory at f0000000 (64-bit, non-prefetchable) [size=64K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
    Capabilities: [60] Express Legacy Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Virtual Channel
    Capabilities: [160] Device Serial Number 00-15-17-ff-ff-24-14-12
    Capabilities: [170] Power Budgeting <?>
    Kernel driver in use: ath9k
    Kernel modules: ath9k

消息

[    2.453972] atl1c 0000:02:00.0 enp2s0: renamed from eth0
[   27.218201] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[   27.218981] atl1c 0000:02:00.0: atl1c: enp2s0 NIC Link is Up<100 Mbps Full Duplex>
[   45.731461] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[   45.731866] atl1c 0000:02:00.0: atl1c: enp2s0 NIC Link is Up<100 Mbps Full Duplex>

我不知道为什么它不起作用。我试过关闭 Wi-Fi,但结果还是一样。还试过忽略 IPv6。更改接口文件等。有什么想法吗?

更新 1:

是否配置

enp2s0    Link encap:Ethernet  HWaddr 22:e6:8b:31:98:31  
          inet addr:192.168.1.40  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::9396:5afa:a5d6:d18b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:110 errors:0 dropped:1 overruns:0 frame:0
          TX packets:613 errors:0 dropped:0 overruns:0 carrier:6
          collisions:0 txqueuelen:1000 
          RX bytes:16315 (16.3 KB)  TX bytes:66491 (66.4 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3868 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3868 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:276562 (276.5 KB)  TX bytes:276562 (276.5 KB)

我用这个改变了接口文件:

auto enp2s0
iface enp2s0 inet static
address 192.168.1.40
netmask 255.255.255.0
gateway 192.168.1.1

仍然没有网络!

更新2:

route -n (使用同一路由器的 Wi-Fi)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    600    0        0 wlp3s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp3s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0

路由 -n(以太网又名问题)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 enp2s0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0

相关内容