[求助] DHCP无法获得IP。

网卡、显卡、声卡、校园网拨号等各种硬件相关的问题

[求助] DHCP无法获得IP。

#1  hexh2003 » 周三 2月 8日, 2017年 9:19 pm

物件:
网线 A: 墙内的网线
网线 B: 拖在地上,不是很方便。

电脑 A: 家用台式机 (opensuse tumbleweed)
电脑 B: 公司笔记本 (opensue 42.1)
电脑 C: 老婆的笔记本 (win7)

问题:
电脑 A 无法通过网线 A 获得 IP。

测试:
电脑 B,C 都可以通过网线 A 获得 IP。==> 网线 A 没有问题。
电脑 A 可以通过网线 B 获得 IP。==> 电脑 A 没有问题。

日志:

电脑 A 通过网线 A 获取 IP 时, 电脑的日志:

代码: 全选
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.0529] device (enp3s0): Activation: starting connection 'Wired connection 1' (e9a1fbbf-00b7-3506-ba44-7152c8f7e5f2)
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.0530] audit: op="connection-activate" uuid="e9a1fbbf-00b7-3506-ba44-7152c8f7e5f2" name="Wired connection 1" pid=1385 uid=1000 result="success"
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.0530] device (enp3s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.0531] manager: NetworkManager state is now CONNECTING
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.0681] device (enp3s0): set-hw-addr: set-cloned MAC address to B6:39:77:ED:A3:C5 (B6:39:77:ED:A3:C5)
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.1146] device (enp3s0): state change: prepare -> config (reason 'none') [40 50 0]
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.1149] device (enp3s0): state change: config -> ip-config (reason 'none') [50 70 0]
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.1151] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)
2 月 08 21:10:05 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:05 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:05 linux-bg4a kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.1161] dhcp4 (enp3s0): dhclient started with pid 4006
2 月 08 21:10:07 linux-bg4a NetworkManager[959]: <info>  [1486559407.3168] device (enp3s0): link connected
2 月 08 21:10:07 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link up
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <warn>  [1486559450.5580] dhcp4 (enp3s0): request timed out
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5580] dhcp4 (enp3s0): state changed unknown -> timeout
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5739] dhcp4 (enp3s0): canceled DHCP transaction, DHCP client pid 4006
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5739] dhcp4 (enp3s0): state changed timeout -> done
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5741] device (enp3s0): state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5742] manager: NetworkManager state is now DISCONNECTED
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <warn>  [1486559450.5744] device (enp3s0): Activation: failed for connection 'Wired connection 1'
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5747] device (enp3s0): state change: failed -> disconnected (reason 'none') [120 30 0]
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.5922] device (enp3s0): set-hw-addr: reset MAC address to 1C:87:2C:42:B1:0D (deactivate)
2 月 08 21:10:50 linux-bg4a NetworkManager[959]: <info>  [1486559450.6390] device (enp3s0): state change: disconnected -> unavailable (reason 'carrier-changed') [30 20 40]
2 月 08 21:10:50 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:50 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:50 linux-bg4a kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3113] device (enp3s0): link connected
2 月 08 21:10:55 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link up
2 月 08 21:10:55 linux-bg4a kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3116] device (enp3s0): state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3120] policy: auto-activating connection 'Wired connection 1'
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3129] device (enp3s0): Activation: starting connection 'Wired connection 1' (e9a1fbbf-00b7-3506-ba44-7152c8f7e5f2)
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3131] device (enp3s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3132] manager: NetworkManager state is now CONNECTING
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3324] device (enp3s0): set-hw-addr: set-cloned MAC address to B6:39:77:ED:A3:C5 (B6:39:77:ED:A3:C5)
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3785] device (enp3s0): state change: prepare -> config (reason 'none') [40 50 0]
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3787] device (enp3s0): state change: config -> ip-config (reason 'none') [50 70 0]
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3789] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)
2 月 08 21:10:55 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:55 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:55 linux-bg4a kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
2 月 08 21:10:55 linux-bg4a NetworkManager[959]: <info>  [1486559455.3798] dhcp4 (enp3s0): dhclient started with pid 4045
2 月 08 21:10:59 linux-bg4a NetworkManager[959]: <info>  [1486559459.5551] device (enp3s0): state change: ip-config -> unavailable (reason 'carrier-changed') [70 20 40]
2 月 08 21:10:59 linux-bg4a NetworkManager[959]: <info>  [1486559459.5871] dhcp4 (enp3s0): canceled DHCP transaction, DHCP client pid 4045
2 月 08 21:10:59 linux-bg4a NetworkManager[959]: <info>  [1486559459.5871] dhcp4 (enp3s0): state changed unknown -> done
2 月 08 21:10:59 linux-bg4a NetworkManager[959]: <info>  [1486559459.6121] device (enp3s0): set-hw-addr: reset MAC address to 1C:87:2C:42:B1:0D (deactivate)
2 月 08 21:10:59 linux-bg4a NetworkManager[959]: <info>  [1486559459.6585] manager: NetworkManager state is now DISCONNECTED
2 月 08 21:10:59 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8540] device (enp3s0): link connected
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8544] device (enp3s0): state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8549] policy: auto-activating connection 'Wired connection 1'
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8553] device (enp3s0): Activation: starting connection 'Wired connection 1' (e9a1fbbf-00b7-3506-ba44-7152c8f7e5f2)
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8554] device (enp3s0): state change: disconnected -> prepare (reason 'none') [30 40 0]
2 月 08 21:11:01 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link up
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8555] manager: NetworkManager state is now CONNECTING
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.8803] device (enp3s0): set-hw-addr: set-cloned MAC address to B6:39:77:ED:A3:C5 (B6:39:77:ED:A3:C5)
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.9266] device (enp3s0): state change: prepare -> config (reason 'none') [40 50 0]
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.9269] device (enp3s0): state change: config -> ip-config (reason 'none') [50 70 0]
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.9272] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)
2 月 08 21:11:01 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:11:01 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:11:01 linux-bg4a kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
2 月 08 21:11:01 linux-bg4a NetworkManager[959]: <info>  [1486559461.9283] dhcp4 (enp3s0): dhclient started with pid 4054
2 月 08 21:11:06 linux-bg4a NetworkManager[959]: <info>  [1486559466.5556] device (enp3s0): state change: ip-config -> unavailable (reason 'carrier-changed') [70 20 40]
2 月 08 21:11:06 linux-bg4a NetworkManager[959]: <info>  [1486559466.5877] dhcp4 (enp3s0): canceled DHCP transaction, DHCP client pid 4054
2 月 08 21:11:06 linux-bg4a NetworkManager[959]: <info>  [1486559466.5877] dhcp4 (enp3s0): state changed unknown -> done
2 月 08 21:11:06 linux-bg4a NetworkManager[959]: <info>  [1486559466.6081] device (enp3s0): set-hw-addr: reset MAC address to 1C:87:2C:42:B1:0D (deactivate)
2 月 08 21:11:06 linux-bg4a NetworkManager[959]: <info>  [1486559466.6546] manager: NetworkManager state is now DISCONNECTED
2 月 08 21:11:06 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down


Screenshot_20170208_211508.png
路由器日志
hexh2003
 
帖子: 9
注册: 周四 10月 2日, 2014年 3:34 pm
Cash on hand: 61.00
送出感谢: 1
收到感谢: 0 次

Re: [求助] DHCP无法获得IP。

#2  AstroProfundis » 周四 2月 9日, 2017年 3:06 am

看日志你的端口在频繁 up-down
考虑检查下网线到这台电脑的接口是不是不稳定(其中一者老化严重,或者两个都老化正好对上了),或者有松动造成接触不良
也可以考虑检查下对端,或者把两根网线在对端的接口交换一下,可以排除路由器的问题

当然也可能是驱动... 不过表示对网卡驱动完全不了解...
How many stars in your bowl, How many sorrows in your soul?
--
发帖前请注意各版块要求与限制,问题求助请尽量给出详细日志信息或重现问题的步骤
问题解决后请在标题前加[已解决]标签,若放弃或采用替代方案也请尽量注明,方便其他用户查阅参考
论坛兼职SA, 发现访问出错等问题可私信告知 | 邮箱:allen (at) atr (dot) me | GPG Key: 0xF7964FB5
头像
AstroProfundis
使徒
 
帖子: 373
注册: 周六 3月 30日, 2013年 8:59 pm
Cash on hand: 188.40
Bank: 141.00
地址: 杭州
送出感谢: 9
收到感谢: 10
勋章: 5
I knew SuSE from Day One! (1) Site Admin (1) Moderator (1)
Donator (1) 1310Pro (1)

Re: [求助] DHCP无法获得IP。

#3  hexh2003 » 周五 2月 10日, 2017年 11:33 am

谢谢回复!
准备买一个 USB 无线网卡了.

AstroProfundis 写道: 看日志你的端口在频繁 up-down
考虑检查下网线到这台电脑的接口是不是不稳定(其中一者老化严重,或者两个都老化正好对上了),或者有松动造成接触不良
也可以考虑检查下对端,或者把两根网线在对端的接口交换一下,可以排除路由器的问题

当然也可能是驱动... 不过表示对网卡驱动完全不了解...
hexh2003
 
帖子: 9
注册: 周四 10月 2日, 2014年 3:34 pm
Cash on hand: 61.00
送出感谢: 1
收到感谢: 0 次

Re: [求助] DHCP无法获得IP。

#4  marguerite » 周二 2月 21日, 2017年 8:31 am

@hexh2003 把网线 B,电脑 A 的日志也发一下


从我的 iPhone 发送,使用 Tapatalk
头像
marguerite
寨主
 
帖子: 3267
注册: 周六 3月 30日, 2013年 12:50 am
Cash on hand: 766.10
Bank: 6,044.70
送出感谢: 24
收到感谢: 340
勋章: 4
I knew SuSE from Day One! (1) Site Admin (1) developer (1)
1310Pro (1)

Re: [求助] DHCP无法获得IP。

#5  hexh2003 » 周二 2月 21日, 2017年 9:02 pm

marguerite 写道:@hexh2003 把网线 B,电脑 A 的日志也发一下


从我的 iPhone 发送,使用 Tapatalk

代码: 全选
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): link connected
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  Auto-activating connection 'Wired connection 1'.
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): Activation: starting connection 'Wired connection 1' (d8d4e8de-2a98-4738-ad81-1a69961bb2ad)
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  NetworkManager state is now CONNECTING
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: prepare -> config (reason 'none') [40 50 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  Activation (eth0) Beginning DHCPv4 transaction (timeout in 45 seconds)
2 月 21 21:00:48 linux-qb3w kernel: r8169 0000:03:00.0 eth0: link up
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  dhclient started with pid 2196
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    address 192.168.31.110
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    plen 24 (255.255.255.0)
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    gateway 192.168.31.1
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    server identifier 192.168.31.1
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    lease time 7200
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    nameserver '202.106.46.151'
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>    nameserver '202.106.195.68'
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): DHCPv4 state changed unknown -> bound
2 月 21 21:00:48 linux-qb3w avahi-daemon[611]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.31.110.
2 月 21 21:00:48 linux-qb3w avahi-daemon[611]: New relevant interface eth0.IPv4 for mDNS.
2 月 21 21:00:48 linux-qb3w avahi-daemon[611]: Registering new address record for 192.168.31.110 on eth0.IPv4.
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: secondaries -> activated (reason 'none') [90 100 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  NetworkManager state is now CONNECTED_LOCAL
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  NetworkManager state is now CONNECTED_GLOBAL
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
2 月 21 21:00:49 linux-qb3w NetworkManager[759]: <info>  (eth0): Activation: successful, device activated.
2 月 21 21:00:49 linux-qb3w nm-dispatcher[2184]: Dispatching action 'up' for eth0
2 月 21 21:00:50 linux-qb3w avahi-daemon[611]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::1e87:2cff:fe42:b10d.
2 月 21 21:00:50 linux-qb3w avahi-daemon[611]: New relevant interface eth0.IPv6 for mDNS.
2 月 21 21:00:50 linux-qb3w avahi-daemon[611]: Registering new address record for fe80::1e87:2cff:fe42:b10d on eth0.*.
2 月 21 21:00:50 linux-qb3w kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC= SRC=fe80:0000:0000:0000:1e87:2cff:fe42:b10d DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=258 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=218
2 月 21 21:00:50 linux-qb3w kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC= SRC=fe80:0000:0000:0000:1e87:2cff:fe42:b10d DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390
2 月 21 21:00:50 linux-qb3w kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC= SRC=fe80:0000:0000:0000:1e87:2cff:fe42:b10d DST=ff02:0000:0000:0000:0000:0000:0000:00fb LEN=430 TC=0 HOPLIMIT=255 FLOWLBL=0 PROTO=UDP SPT=5353 DPT=5353 LEN=390
hexh2003
 
帖子: 9
注册: 周四 10月 2日, 2014年 3:34 pm
Cash on hand: 61.00
送出感谢: 1
收到感谢: 0 次

Re: [求助] DHCP无法获得IP。

#6  AstroProfundis » 周三 2月 22日, 2017年 11:02 am

Bad:
代码: 全选
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.1149] device (enp3s0): state change: config -> ip-config (reason 'none') [50 70 0]
2 月 08 21:10:05 linux-bg4a NetworkManager[959]: <info>  [1486559405.1151] dhcp4 (enp3s0): activation: beginning transaction (timeout in 45 seconds)
2 月 08 21:10:05 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:05 linux-bg4a kernel: r8169 0000:03:00.0 enp3s0: link down
2 月 08 21:10:05 linux-bg4a kernel: IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready


Good:
代码: 全选
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  (eth0): device state change: config -> ip-config (reason 'none') [50 70 0]
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  Activation (eth0) Beginning DHCPv4 transaction (timeout in 45 seconds)
2 月 21 21:00:48 linux-qb3w kernel: r8169 0000:03:00.0 eth0: link up
2 月 21 21:00:48 linux-qb3w NetworkManager[759]: <info>  dhclient started with pid 2196


单独这么看我个人倾向于认为软件问题概率更大,因为接口 down 发生在 dhcp 进程启动之后,但如果测试排除能确定之和线有关的话就是其中一根线有质量问题了

另外之前说的在网关侧交换接口的方法楼主试过吗?因为也很有可能是路由器的问题(比如质量问题,或者现在很多光猫之类的东西的各个 LAN 口并不是完全一样,这种设备多数是第一个口千兆,别的百兆)

-- Update

等等,两次的 interface 名字不一样,楼主是调整过内核或者 systemd 配置,还是接线姿势有区别?
How many stars in your bowl, How many sorrows in your soul?
--
发帖前请注意各版块要求与限制,问题求助请尽量给出详细日志信息或重现问题的步骤
问题解决后请在标题前加[已解决]标签,若放弃或采用替代方案也请尽量注明,方便其他用户查阅参考
论坛兼职SA, 发现访问出错等问题可私信告知 | 邮箱:allen (at) atr (dot) me | GPG Key: 0xF7964FB5
头像
AstroProfundis
使徒
 
帖子: 373
注册: 周六 3月 30日, 2013年 8:59 pm
Cash on hand: 188.40
Bank: 141.00
地址: 杭州
送出感谢: 9
收到感谢: 10
勋章: 5
I knew SuSE from Day One! (1) Site Admin (1) Moderator (1)
Donator (1) 1310Pro (1)


回到 硬件驱动

在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客