有線電視網在 Debian 上可以工作幾秒鐘

有線電視網在 Debian 上可以工作幾秒鐘

我最近更換了我的 ISP,之後我在 Debian 10 上連接到互聯網時開始遇到一些問題。和我的手機(wifi)。在 Debian 上,互聯網可以工作幾秒鐘,足以加載一頁,但之後就不再工作了。我已經嘗試增加 MTU 值,因為看起來它可以幫助其他遇到此問題的人,但對我來說不起作用。另外,我使用我的筆記型電腦進行了測試,該筆記型電腦也安裝了 Debian 10,它可以工作。我使用有線和無線網路進行了測試。

dmesg |尾-20給我:

[   13.976571] br-a16997434552: port 1(veth6622e95) entered forwarding state
[   13.976619] eth0: renamed from vethdb50e9c
[   13.996186] eth0: renamed from vethcbb270b
[   14.044342] IPv6: ADDRCONF(NETDEV_CHANGE): br-a16997434552: link becomes ready
[   14.044712] eth0: renamed from veth6bc5a88
[   14.068466] IPv6: ADDRCONF(NETDEV_CHANGE): veth94bcb37: link becomes ready
[   14.068523] br-bcf7ce342cb9: port 1(veth94bcb37) entered blocking state
[   14.068527] br-bcf7ce342cb9: port 1(veth94bcb37) entered forwarding state
[   14.068614] IPv6: ADDRCONF(NETDEV_CHANGE): vetha3f8b80: link becomes ready
[   14.068658] br-f68c9df397fa: port 1(vetha3f8b80) entered blocking state
[   14.068661] br-f68c9df397fa: port 1(vetha3f8b80) entered forwarding state
[   14.068758] IPv6: ADDRCONF(NETDEV_CHANGE): br-bcf7ce342cb9: link becomes ready
[   14.068836] IPv6: ADDRCONF(NETDEV_CHANGE): br-f68c9df397fa: link becomes ready
[   14.069028] IPv6: ADDRCONF(NETDEV_CHANGE): vetha784882: link becomes ready
[   14.069063] br-37692a4e723c: port 1(vetha784882) entered blocking state
[   14.069065] br-37692a4e723c: port 1(vetha784882) entered forwarding state
[   14.069117] IPv6: ADDRCONF(NETDEV_CHANGE): br-37692a4e723c: link becomes ready
[   14.121290] r8169 0000:03:00.0 enp3s0: Link is Up - 1Gbps/Full - flow control off
[   19.920051] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 20
[   20.224017] snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD data byte 20

獲取http://www.duckduckgo.com給我:

--2021-05-30 00:12:43--  http://www.duckduckgo.com/
Resolvendo www.duckduckgo.com (www.duckduckgo.com)... 191.235.123.80
Conectando-se a www.duckduckgo.com (www.duckduckgo.com)|191.235.123.80|:80... falhou: Tempo esgotado para conexão.
Tentando novamente.

--2021-05-30 00:13:23--  (tentativa: 2)  http://www.duckduckgo.com/
Conectando-se a www.duckduckgo.com (www.duckduckgo.com)|191.235.123.80|:80... falhou: Tempo esgotado para conexão.
Tentando novamente.

--2021-05-30 00:13:57--  (tentativa: 3)  http://www.duckduckgo.com/
Conectando-se a www.duckduckgo.com (www.duckduckgo.com)|191.235.123.80|:80... falhou: Tempo esgotado para conexão.
Tentando novamente.

--2021-05-30 00:14:31--  (tentativa: 4)  http://www.duckduckgo.com/
Conectando-se a www.duckduckgo.com (www.duckduckgo.com)|191.235.123.80|:80... ^C

ip 路由取得 1.1.1.1給我:

1.1.1.1 via 192.168.0.1 dev enp3s0 src 192.168.0.102 uid 1000 
    cache

ip -br 連結; ip -br 位址; ip路由給我:

lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
enp3s0           UP             18:31:bf:b3:38:7d <BROADCAST,MULTICAST,UP,LOWER_UP> 
br-9ca719aa01c7  DOWN           02:42:97:ea:72:b0 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-b97158ffcc3c  DOWN           02:42:74:c5:64:57 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
docker0          DOWN           02:42:c9:ef:9e:71 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-55cb011b3e0d  DOWN           02:42:04:1a:72:0a <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-777211ddb717  DOWN           02:42:4f:08:86:92 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-a16997434552  UP             02:42:55:72:e0:b8 <BROADCAST,MULTICAST,UP,LOWER_UP> 
br-bcf7ce342cb9  UP             02:42:f1:f0:8e:7b <BROADCAST,MULTICAST,UP,LOWER_UP> 
br-d4e258cd683a  DOWN           02:42:05:9b:2d:27 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-4b3e4deacee9  DOWN           02:42:9d:07:40:5b <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-f68c9df397fa  UP             02:42:92:59:d5:6c <BROADCAST,MULTICAST,UP,LOWER_UP> 
br-131ad989692b  DOWN           02:42:84:4e:6e:12 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-194e7a613502  DOWN           02:42:61:b8:5d:7a <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-2a67d8f8b954  DOWN           02:42:c2:d1:b4:e1 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-37692a4e723c  UP             02:42:a9:7b:1f:3a <BROADCAST,MULTICAST,UP,LOWER_UP> 
br-3f32a31d3339  UP             02:42:06:e1:4b:19 <BROADCAST,MULTICAST,UP,LOWER_UP> 
br-499e90637a6b  DOWN           02:42:3c:d7:50:ca <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-552074ecc891  DOWN           02:42:f8:04:ed:b7 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-0e204ce773a5  DOWN           02:42:a5:2c:56:25 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-68d74d345015  DOWN           02:42:42:d7:7a:37 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-c41dfb61e164  DOWN           02:42:ee:61:a9:ae <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-cf71a6f7b6d3  DOWN           02:42:52:85:a0:b7 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-f0c082f01e56  DOWN           02:42:d3:80:d0:bf <NO-CARRIER,BROADCAST,MULTICAST,UP> 
br-639bfb1bea34  DOWN           02:42:2f:93:cc:d2 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
veth759ec1c@if26 UP             2e:8a:16:fd:f5:de <BROADCAST,MULTICAST,UP,LOWER_UP> 
veth44148ca@if28 UP             62:b4:1f:13:bc:51 <BROADCAST,MULTICAST,UP,LOWER_UP> 
vethc7f2d65@if30 UP             52:9e:00:cb:c7:46 <BROADCAST,MULTICAST,UP,LOWER_UP> 
veth0067bf4@if32 UP             5e:6f:bb:a0:28:1c <BROADCAST,MULTICAST,UP,LOWER_UP> 
veth443e622@if34 UP             d2:97:46:de:79:91 <BROADCAST,MULTICAST,UP,LOWER_UP> 
lo               UNKNOWN        127.0.0.1/8 ::1/128 
enp3s0           UP             192.168.0.102/24 2804:14c:6583:5e7f::1000/128 2804:14c:6583:5e7f:c496:f510:ca8c:79ce/64 fe80::9847:c342:d509:4024/64 
br-9ca719aa01c7  DOWN           192.168.96.1/20 
br-b97158ffcc3c  DOWN           172.20.0.1/16 
docker0          DOWN           172.17.0.1/16 
br-55cb011b3e0d  DOWN           192.168.160.1/20 
br-777211ddb717  DOWN           172.26.0.1/16 
br-a16997434552  UP             172.28.0.1/16 fe80::42:55ff:fe72:e0b8/64 
br-bcf7ce342cb9  UP             172.22.0.1/16 fe80::42:f1ff:fef0:8e7b/64 
br-d4e258cd683a  DOWN           172.24.0.1/16 
br-4b3e4deacee9  DOWN           192.168.48.1/20 
br-f68c9df397fa  UP             172.27.0.1/16 fe80::42:92ff:fe59:d56c/64 
br-131ad989692b  DOWN           172.23.0.1/16 
br-194e7a613502  DOWN           192.168.80.1/20 
br-2a67d8f8b954  DOWN           192.168.240.1/20 
br-37692a4e723c  UP             172.29.0.1/16 fe80::42:a9ff:fe7b:1f3a/64 
br-3f32a31d3339  UP             172.31.0.1/16 fe80::42:6ff:fee1:4b19/64 
br-499e90637a6b  DOWN           172.18.0.1/16 
br-552074ecc891  DOWN           172.19.0.1/16 
br-0e204ce773a5  DOWN           172.30.0.1/16 
br-68d74d345015  DOWN           192.168.16.1/20 
br-c41dfb61e164  DOWN           192.168.0.1/20 
br-cf71a6f7b6d3  DOWN           172.25.0.1/16 
br-f0c082f01e56  DOWN           172.21.0.1/16 
br-639bfb1bea34  DOWN           192.168.112.1/20 
veth759ec1c@if26 UP             fe80::2c8a:16ff:fefd:f5de/64

Lucas Andrade, [30.05.21 09:50]
veth44148ca@if28 UP             fe80::60b4:1fff:fe13:bc51/64 
vethc7f2d65@if30 UP             fe80::509e:ff:fecb:c746/64 
veth0067bf4@if32 UP             fe80::5c6f:bbff:fea0:281c/64 
veth443e622@if34 UP             fe80::d097:46ff:fede:7991/64 
default via 192.168.0.1 dev enp3s0 proto dhcp metric 100 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-499e90637a6b proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-552074ecc891 proto kernel scope link src 172.19.0.1 linkdown 
172.20.0.0/16 dev br-b97158ffcc3c proto kernel scope link src 172.20.0.1 linkdown 
172.21.0.0/16 dev br-f0c082f01e56 proto kernel scope link src 172.21.0.1 linkdown 
172.22.0.0/16 dev br-bcf7ce342cb9 proto kernel scope link src 172.22.0.1 
172.23.0.0/16 dev br-131ad989692b proto kernel scope link src 172.23.0.1 linkdown 
172.24.0.0/16 dev br-d4e258cd683a proto kernel scope link src 172.24.0.1 linkdown 
172.25.0.0/16 dev br-cf71a6f7b6d3 proto kernel scope link src 172.25.0.1 linkdown 
172.26.0.0/16 dev br-777211ddb717 proto kernel scope link src 172.26.0.1 linkdown 
172.27.0.0/16 dev br-f68c9df397fa proto kernel scope link src 172.27.0.1 
172.28.0.0/16 dev br-a16997434552 proto kernel scope link src 172.28.0.1 
172.29.0.0/16 dev br-37692a4e723c proto kernel scope link src 172.29.0.1 
172.30.0.0/16 dev br-0e204ce773a5 proto kernel scope link src 172.30.0.1 linkdown 
172.31.0.0/16 dev br-3f32a31d3339 proto kernel scope link src 172.31.0.1 
192.168.0.0/24 dev enp3s0 proto kernel scope link src 192.168.0.102 metric 100 
192.168.0.0/20 dev br-c41dfb61e164 proto kernel scope link src 192.168.0.1 linkdown 
192.168.16.0/20 dev br-68d74d345015 proto kernel scope link src 192.168.16.1 linkdown 
192.168.48.0/20 dev br-4b3e4deacee9 proto kernel scope link src 192.168.48.1 linkdown 
192.168.80.0/20 dev br-194e7a613502 proto kernel scope link src 192.168.80.1 linkdown 
192.168.96.0/20 dev br-9ca719aa01c7 proto kernel scope link src 192.168.96.1 linkdown 
192.168.112.0/20 dev br-639bfb1bea34 proto kernel scope link src 192.168.112.1 linkdown 
192.168.160.0/20 dev br-55cb011b3e0d proto kernel scope link src 192.168.160.1 linkdown 
192.168.240.0/20 dev br-2a67d8f8b954 proto kernel scope link src 192.168.240.1 linkdown

答案1

OP其實有一個很多網路設定:幾個 Docker 網路。

其中之一如下圖所示:

地址:

br-c41dfb61e164  DOWN           192.168.0.1/20 

路線:

192.168.0.0/20 dev br-c41dfb61e164 proto kernel scope link src 192.168.0.1 linkdown 

新增位址至主機:192.168.0.1/20。 Linux 遵循弱者主機型號,該地址始終可用(向上)無論狀態如何br-c41dfb61e164

它與主機路由器(也稱為網關)設定的 DHCP 設定衝突,該路由器使用 192.168.0.1/24。 Linux 上的 DHCP 使用帶外方法(原始套接字)來工作,因此繞過任何網路「異常」:當 DHCP 工作時,它會設定:

default via 192.168.0.1 dev enp3s0 proto dhcp metric 100 

當主機有自己的位址作為網關時,就好像它沒有使用任何網關一樣:對Internet 上任何位址的任何請求都會觸發ARP 請求,該請求將失敗,而不是透過路由器發送封包(這將是唯一的位址)應該使用正確的網路設定進行 ARP)。此外,這也可能隨機中斷使用該網路的其他設備,因為它也會應答對網關位址的 ARP 請求。

快速解決方法是停用並停止 Docker,如果沒有正確清理,則可能需要重新啟動,如下所示OP在評論中證實:

systemctl disable --now docker

(也可以選擇關聯systemctl mask docker.socket以避免任何「虛假」啟動)

長期修復與 Docker 設定有關,超出了本問題的範圍。這裡有兩個建議:

  • 清理未使用的容器和相關網絡

  • 變更 Docker 設置,以便新網路的分配更小(例如 /24),並且位於未使用的位址空間中,可能位於 10.0.0.0/8 中的某個位置,但請注意與某些 VPN 發生衝突。

    可以從這個 SF Q/A 中取得範例:將 Docker 配置為不使用 172.17.0.0 範圍

相關內容