Останавливается загрузка по IPv6 (Realtek / r8169)

Ethernet card, Wi-Fi, Bluetooth, IrDA, ADSL-модемы, модемы

Модератор: Модераторы разделов

Ответить
astroncia
Сообщения: 133

Останавливается загрузка по IPv6 (Realtek / r8169)

Сообщение astroncia »

Собственно такая проблема - при попытке скачать что-то по IPv6 иногда получается, а иногда загрузка виснет:

Код: Выделить всё

curl -6 --verbose --user-agent '' --output /dev/null -Lv 'https://releases.ubuntu.com/20.04.3/ubuntu-20.04.3-desktop-amd64.iso'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 2001:67c:1562::28:443...
* Connected to releases.ubuntu.com (2001:67c:1562::28) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [25 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [4037 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=releases.ubuntu.com
*  start date: Sep  2 00:50:43 2021 GMT
*  expire date: Dec  1 00:50:42 2021 GMT
*  subjectAltName: host "releases.ubuntu.com" matched cert's "releases.ubuntu.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
} [5 bytes data]
> GET /20.04.3/ubuntu-20.04.3-desktop-amd64.iso HTTP/1.1
> Host: releases.ubuntu.com
> Accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [297 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [297 bytes data]
* old SSL session ID is stale, removing
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Fri, 03 Sep 2021 07:05:06 GMT
< Server: Apache/2.4.29 (Ubuntu)
< Last-Modified: Thu, 19 Aug 2021 11:06:00 GMT
< ETag: "b71a0000-5c9e7893d4c41"
< Accept-Ranges: bytes
< Content-Length: 3071934464
< Content-Type: application/x-iso9660-image
< 
{ [5 bytes data]
 14 2929M   14  415M    0     0  8408k      0  0:05:56  0:00:50  0:05:06     0^C
как видно - скачало 415 мегабайт, а дальше застопорилось, скорость - 0
Причём если качать напрямую с роутера, то всё ок (там стоит сетевая карта Intel)
По IPv4 всегда скачивается нормально. Проблема только на IPv6.
так что скорее всего проблема в Realtek.

Shell

ethtool -k eth0

Код: Выделить всё

Features for eth0:
rx-checksumming: on
tx-checksumming: on
	tx-checksum-ipv4: on
	tx-checksum-ip-generic: off [fixed]
	tx-checksum-ipv6: on
	tx-checksum-fcoe-crc: off [fixed]
	tx-checksum-sctp: off [fixed]
scatter-gather: off
	tx-scatter-gather: off
	tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
	tx-tcp-segmentation: off
	tx-tcp-ecn-segmentation: off [fixed]
	tx-tcp-mangleid-segmentation: off
	tx-tcp6-segmentation: off
generic-segmentation-offload: off [requested on]
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: on [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
tx-gso-list: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off
rx-all: off
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
rx-gro-list: off
macsec-hw-offload: off [fixed]
rx-udp-gro-forwarding: off
hsr-tag-ins-offload: off [fixed]
hsr-tag-rm-offload: off [fixed]
hsr-fwd-offload: off [fixed]
hsr-dup-offload: off [fixed]

Код: Выделить всё

$ lspci | grep Ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
$ lsmod | grep r8169
r8169                  98304  0

Код: Выделить всё

$ ethtool eth0
Settings for eth0:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: master
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        MDI-X: Unknown
netlink error: Operation not permitted
        Link detected: yes

Код: Выделить всё

$ ethtool -i eth0
driver: r8169
version: 5.12.0-19.4-liquorix-amd64
firmware-version: rtl8168h-2_0.0.2 02/26/15
expansion-rom-version: 
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
с проприетарным драйвером r8168 то же самое.
фрагмент tcpdump с роутера в момент зависания загрузки:

Код: Выделить всё

10:05:24.106942 IP6 [IP REDACTED]:a79:c8dd:da74:477a.43362 > https-services.kazooie.canonical.com.443: Flags [.], ack 436065523, win 16382, options [nop,nop,TS val 4021932780 ecr 4223159828], length 0
10:05:24.106942 IP6 [IP REDACTED]:a79:c8dd:da74:477a.43362 > https-services.kazooie.canonical.com.443: Flags [.], ack 436068379, win 16382, options [nop,nop,TS val 4021932780 ecr 4223159828], length 0
10:05:24.106942 IP6 [IP REDACTED]:a79:c8dd:da74:477a.43362 > https-services.kazooie.canonical.com.443: Flags [.], ack 436071235, win 16382, options [nop,nop,TS val 4021932780 ecr 4223159828], length 0
10:05:24.106942 IP6 [IP REDACTED]:a79:c8dd:da74:477a.43362 > https-services.kazooie.canonical.com.443: Flags [.], ack 436074091, win 16382, options [nop,nop,TS val 4021932780 ecr 4223159828], length 0
10:05:24.106942 IP6 [IP REDACTED]:a79:c8dd:da74:477a.43362 > https-services.kazooie.canonical.com.443: Flags [.], ack 436076947, win 16382, options [nop,nop,TS val 4021932780 ecr 4223159828], length 0
10:05:24.106943 IP6 [IP REDACTED]:a79:c8dd:da74:477a.43362 > https-services.kazooie.canonical.com.443: Flags [.], ack 436079803, win 16380, options [nop,nop,TS val 4021932780 ecr 4223159828], length 0
10:05:24.138447 IP6 fe80::21b:21ff:fee4:b9bd > ff02::16: HBH ICMP6, multicast listener report v2, 9 group record(s), length 188
10:05:25.030395 IP6 fe80::21b:21ff:fee4:b9bd > ff02::16: HBH ICMP6, multicast listener report v2, 9 group record(s), length 188
10:05:32.291172 IP6 [IP REDACTED]:eccd:80ff:fe01:a4c7.60572 > 2600:9000:2118:7c00:c:132:48e:f021.443: Flags [.], ack 6762, win 83, options [nop,nop,TS val 648470831 ecr 3808492645], length 0
10:05:32.296834 IP6 2600:9000:2118:7c00:c:132:48e:f021.443 > [IP REDACTED]:eccd:80ff:fe01:a4c7.60572: Flags [.], ack 1224, win 133, options [nop,nop,TS val 3808537702 ecr 648378492], length 0
10:05:33.983150 IP6 https-services.banjo.canonical.com.443 > [IP REDACTED]:a79:c8dd:da74:477a.60078: Flags [FP.], seq 3076064879:3076064903, ack 743, win 501, options [nop,nop,TS val 4045377408 ecr 3508708142], length 24
10:05:37.346384 IP6 fe80::21b:21ff:fee4:b9bd > [IP REDACTED]:eccd:80ff:fe01:a4c7: ICMP6, neighbor solicitation, who has [IP REDACTED]:eccd:80ff:fe01:a4c7, length 32
10:05:37.346575 IP6 [IP REDACTED]:eccd:80ff:fe01:a4c7 > fe80::21b:21ff:fee4:b9bd: ICMP6, neighbor advertisement, tgt is [IP REDACTED]:eccd:80ff:fe01:a4c7, length 24
10:05:42.530277 IP6 fe80::eccd:80ff:fe01:a4c7 > fe80::21b:21ff:fee4:b9bd: ICMP6, neighbor solicitation, who has fe80::21b:21ff:fee4:b9bd, length 32
10:05:42.530310 IP6 fe80::21b:21ff:fee4:b9bd > fe80::eccd:80ff:fe01:a4c7: ICMP6, neighbor advertisement, tgt is fe80::21b:21ff:fee4:b9bd, length 24
10:05:44.578295 IP6 [IP REDACTED]:eccd:80ff:fe01:a4c7.46850 > 2600:9000:2038:7400:19:f28c:cd8e:cd41.443: Flags [.], ack 1, win 83, options [nop,nop,TS val 1552998007 ecr 376790898], length 0
10:05:44.584346 IP6 2600:9000:2038:7400:19:f28c:cd8e:cd41.443 > [IP REDACTED]:eccd:80ff:fe01:a4c7.46850: Flags [.], ack 1, win 133, options [nop,nop,TS val 376835954 ecr 1552816762], length 0
10:05:47.586399 IP6 fe80::21b:21ff:fee4:b9bd > fe80::eccd:80ff:fe01:a4c7: ICMP6, neighbor solicitation, who has fe80::eccd:80ff:fe01:a4c7, length 32
10:05:47.586616 IP6 fe80::eccd:80ff:fe01:a4c7 > fe80::21b:21ff:fee4:b9bd: ICMP6, neighbor advertisement, tgt is fe80::eccd:80ff:fe01:a4c7, length 24
Debian Bullseye
Ядро 5.12.0-19.4-liquorix-amd64, проверить на более новом нет возможности, т.к. не компилится драйвер nvidia
С обычным ядром из репозиториев, без патчей liquorix проблема сохраняется
p.s. Не предлагать отключение IPv6 и замену сетевой карты на нормальную
Спасибо сказали:
astroncia
Сообщения: 133

Re: Останавливается загрузка по IPv6 (Realtek / r8169)

Сообщение astroncia »

Код: Выделить всё

$ dmesg | grep -i r8169
[    1.175472] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.183234] libphy: r8169: probed
[    1.183399] r8169 0000:03:00.0 eth0: RTL8168h/8111h, [MAC REDACTED], XID 541, IRQ 130
[    1.183403] r8169 0000:03:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    5.273438] Generic FE-GE Realtek PHY r8169-300:00: attached PHY driver (mii_bus:phy_addr=r8169-300:00, irq=MAC)
[    5.437458] r8169 0000:03:00.0 eth0: Link is Down
[    8.948516] r8169 0000:03:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[99430.620371] r8169 0000:03:00.0 eth0: Link is Down
[99475.065444] r8169 0000:03:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[99489.681522] r8169 0000:03:00.0 eth0: Link is Down
[99498.945602] r8169 0000:03:00.0 eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Спасибо сказали:
Ответить