我的以太网连接出了问题。
即使接口处于 UP 状态:
enp57s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 80:fa:5b:6a:a5:d4 brd ff:ff:ff:ff:ff:ff
我可以发送数据包,但无法接收它们
enp57s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 80:fa:5b:6a:a5:d4 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
340265 1877 0 0 0 0
网络管理员的日志通常会显示以下内容:
NetworkManager[1033]: <info> [1570450750.2616] manager: NetworkManager state is now CONNECTED_GLOBAL
NetworkManager[1033]: <info> [1570450888.9975] policy: auto-activating connection 'Wired_connection_1'
NetworkManager[1033]: <info> [1570450889.0014] device (enp57s0f1): Activation: starting connection 'Wired_connection_1' (21a7b2ee-5094-3939-9513-c138d8b2edab)
NetworkManager[1033]: <info> [1570450889.0024] device (enp57s0f1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
NetworkManager[1033]: <info> [1570450889.0031] device (enp57s0f1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
NetworkManager[1033]: <info> [1570450889.0040] device (enp57s0f1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
NetworkManager[1033]: <info> [1570450889.0045] dhcp4 (enp57s0f1): activation: beginning transaction (timeout in 45 seconds)
NetworkManager[1033]: <info> [1570450889.0066] dhcp4 (enp57s0f1): dhclient started with pid 10891
dhclient[10891]: DHCPDISCOVER on enp57s0f1 to 255.255.255.255 port 67 interval 3 (xid=0x58746c62)
dhclient[10891]: DHCPDISCOVER on enp57s0f1 to 255.255.255.255 port 67 interval 7 (xid=0x58746c62)
dhclient[10891]: DHCPDISCOVER on enp57s0f1 to 255.255.255.255 port 67 interval 14 (xid=0x58746c62)
dhclient[10891]: DHCPDISCOVER on enp57s0f1 to 255.255.255.255 port 67 interval 15 (xid=0x58746c62)
dhclient[10891]: DHCPDISCOVER on enp57s0f1 to 255.255.255.255 port 67 interval 18 (xid=0x58746c62)
NetworkManager[1033]: <warn> [1570450934.0052] dhcp4 (enp57s0f1): request timed out
NetworkManager[1033]: <info> [1570450934.0054] dhcp4 (enp57s0f1): state changed unknown -> timeout
NetworkManager[1033]: <info> [1570450934.0391] dhcp4 (enp57s0f1): canceled DHCP transaction, DHCP client pid 10891
NetworkManager[1033]: <info> [1570450934.0392] dhcp4 (enp57s0f1): state changed timeout -> done
NetworkManager[1033]: <info> [1570450934.0409] device (enp57s0f1): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
NetworkManager[1033]: <warn> [1570450934.0431] device (enp57s0f1): Activation: failed for connection 'Wired_connection_1'
NetworkManager[1033]: <info> [1570450934.0439] device (enp57s0f1): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
如果我检查铜缆的状态,一切看起来都很好
Interface Speed Local pair Pair length Remote pair Pair status
--------- ----- ---------- ------------------ ----------- --------------------
Gi0/3 1000M Pair A 41 +/- 10 meters Pair B Normal
Pair B 41 +/- 10 meters Pair A Normal
Pair C 41 +/- 10 meters Pair D Normal
Pair D 41 +/- 10 meters Pair C Normal
我搜索交换机接口的状态,电脑好像已经连接上了
Gi0/3 A02 - Workstation connected 20 a-full a-1000 10/100/1000BaseTX
交换机也知道计算机的 MAC 地址:
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
20 80fa.5b6a.a5d4 DYNAMIC Gi0/3
交换机似乎将数据包发送到计算机,但它们从未到达
GigabitEthernet0/3 is up, line protocol is up (connected)
Description: A02 - Workstation
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:07, output hang never
Last clearing of "show interface" counters 2w0d
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 1886
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1000 bits/sec, 1 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
5369157 packets input, 905525711 bytes, 0 no buffer
Received 27215 broadcasts (20150 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 20150 multicast, 0 pause input
0 input packets with dribble condition detected
7547468 packets output, 3260967444 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
最后,出于某种原因,如果我在插入以太网电缆的情况下启动计算机,有线连接将无法工作:即使我重新插入,即使我告诉笔记本电脑忘记网络。但是,如果我在拔下以太网电缆的情况下启动系统,然后在它进入桌面后再插入,它就可以正常工作。无论如何,Wi-Fi 都可以正常工作。