在工作电脑上。到目前为止,连接没有问题。我当时正在努力工作,突然我的电脑卡住了。我以为是图形问题,然后重新启动了。当我无法登录(但我的同事可以)时,我意识到我无法向 LDAP 服务器进行身份验证。从那里,我意识到这是因为我的有线 eth0 接口没有与网络通信。
接口配置
eth0 Link encap:Ethernet HWaddr f8:b1:56:a8:14:6b
inet6 addr: fe80::fab1:56ff:fea8:146b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10557 errors:0 dropped:11 overruns:0 frame:0
TX packets:881 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1231403 (1.2 MB) TX bytes:205674 (205.6 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:2543 errors:0 dropped:0 overruns:0 frame:0
TX packets:2543 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:419097 (419.0 KB) TX bytes:419097 (419.0 KB)
我检查了电缆,还用另一根电缆和 IT 人员的笔记本电脑检查了端口。没有问题。他给了我一个 USB -> 以太网适配器,我目前正在使用它,但作为 USB,它的速度对于我进行的数据处理来说不够快。
系统日志
从开始出现故障时起检查系统日志:
cat /var/log/syslog | grep eth0
Jun 28 12:46:05 picasso kernel: [ 0.526128] r8169 0000:03:00.0 eth0: RTL8168g/8111g at 0xffffc90000074000, f8:b1:56:a8:14:6b, XID 0c000800 IRQ 47
Jun 28 12:46:05 picasso kernel: [ 0.526130] r8169 0000:03:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Jun 28 12:46:05 picasso kernel: [ 5.261935] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 28 12:46:10 picasso NetworkManager[1865]: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/net/eth0, iface: eth0)
Jun 28 12:46:10 picasso NetworkManager[1865]: SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/net/eth0, iface: eth0): no ifupdown configuration found.
Jun 28 12:46:10 picasso NetworkManager[1865]: <info> (eth0): carrier is OFF
Jun 28 12:46:10 picasso NetworkManager[1865]: <info> (eth0): new Ethernet device (driver: 'r8169' ifindex: 2)
Jun 28 12:46:10 picasso NetworkManager[1865]: <info> (eth0): exported as /org/freedesktop/NetworkManager/Devices/0
Jun 28 12:46:10 picasso NetworkManager[1865]: <info> (eth0): now managed
Jun 28 12:46:10 picasso NetworkManager[1865]: <info> (eth0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jun 28 12:46:10 picasso NetworkManager[1865]: <info> (eth0): bringing up device.
Jun 28 12:46:11 picasso NetworkManager[1865]: <info> (eth0): preparing device.
Jun 28 12:46:11 picasso NetworkManager[1865]: <info> (eth0): deactivating device (reason 'managed') [2]
Jun 28 12:46:11 picasso NetworkManager[1865]: <info> Added default wired connection 'Wired connection 1' for /sys/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/net/eth0
Jun 28 12:46:11 picasso kernel: [ 21.290817] r8169 0000:03:00.0 eth0: link down
Jun 28 12:46:11 picasso kernel: [ 21.290839] r8169 0000:03:00.0 eth0: link down
Jun 28 12:46:11 picasso kernel: [ 21.290855] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 28 12:46:11 picasso kernel: [ 21.291021] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> (eth0): carrier now ON (device state 20)
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) starting connection 'Wired connection 1'
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Beginning DHCPv4 transaction (timeout in 45 seconds)
Jun 28 12:46:13 picasso kernel: [ 23.791505] r8169 0000:03:00.0 eth0: link up
Jun 28 12:46:13 picasso kernel: [ 23.791512] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Beginning IP6 addrconf.
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Jun 28 12:46:14 picasso NetworkManager[1865]: <info> (eth0): DHCPv4 state changed nbi -> preinit
Jun 28 12:46:14 picasso dhclient: Listening on LPF/eth0/f8:b1:56:a8:14:6b
Jun 28 12:46:14 picasso dhclient: Sending on LPF/eth0/f8:b1:56:a8:14:6b
Jun 28 12:46:14 picasso dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Jun 28 12:46:15 picasso avahi-daemon[1859]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::fab1:56ff:fea8:146b.
Jun 28 12:46:15 picasso avahi-daemon[1859]: New relevant interface eth0.IPv6 for mDNS.
Jun 28 12:46:15 picasso avahi-daemon[1859]: Registering new address record for fe80::fab1:56ff:fea8:146b on eth0.*.
Jun 28 12:46:17 picasso dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Jun 28 12:46:19 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:22 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:28 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:34 picasso NetworkManager[1865]: <info> (eth0): IP6 addrconf timed out or failed.
Jun 28 12:46:34 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
Jun 28 12:46:34 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) started...
Jun 28 12:46:34 picasso NetworkManager[1865]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) complete.
Jun 28 12:46:34 picasso dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Jun 28 12:46:37 picasso dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Jun 28 12:46:38 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:41 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:44 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:52 picasso dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Jun 28 12:46:54 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:57 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:59 picasso NetworkManager[1865]: <warn> (eth0): DHCPv4 request timed out.
IT 似乎认为以太网适配器坏了,但至少它被识别了。我该怎么做才能修复它?
更新
通过IT:
我可以从接入交换机和分发交换机 ping 这台计算机,但不能在其子网之外 ping 通。
他要求我验证默认网关,但根据 GUI 网络管理器,默认路由(我假设是同一个)已设置为 10.30.64.1。
答案1
在我看来,这
Jun 28 12:46:13 picasso NetworkManager[1865]: <info> (eth0): carrier now ON (device state 20)
和
Jun 28 12:46:13 picasso kernel: [ 23.791505] r8169 0000:03:00.0 eth0: link up
Jun 28 12:46:13 picasso kernel: [ 23.791512] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
表明您的以太网适配器正在工作,并且与另一端有电连接,并且检测到“载波”信号。
遗憾的是,您没有收到DHCP
数据包的响应。
Jun 28 12:46:14 picasso dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
这些行表明您的系统正在尝试使用 IP 地址10.30.64.53
Jun 28 12:46:19 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:22 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
Jun 28 12:46:28 picasso dhclient: DHCPREQUEST of 10.30.64.53 on eth0 to 255.255.255.255 port 67
您确定公司 DHCP 服务器能识别您的 MAC 地址和 IP 地址吗?您使用的 MAC 地址是:
Jun 28 12:46:14 picasso dhclient: Listening on LPF/eth0/f8:b1:56:a8:14:6b
# ^^^^^^^^^^^^^^^^^