Portál AbcLinuxu, 30. dubna 2025 10:26
Jedna menší záhada: Na routeru jsem si nastavil ipv6 konektivitu pomocí 6to4 tunelu. K routeru jsou připojeny tři počítače. Na jednom se mi nějak podařilo připojení přes IPv6 rozjet, další dva odolávaly. Všechny stroje dostaly ipv6 adresu, všude stejně nastavené routování, firewall vypnutý, přesto se jeden na ipv6.google.com připojil a další dva ne.
Dlouho jsem hledal chybu, pořád to nefungovalo a nikde žádný viditelný rozdíl. Až teď. Zkusil jsem ping6 mezi dvěma stroji - bez problémů. Tak zkouším ssh. Taktéž bez problémů. Zkusím ping6 ipv6.google.com a najednou jede. Divné. Tak jsem stejný postup zopakoval i u třetího stroje a výsledek byl stejný. Ipv6 se najednou rozjelo. Router je Asus WL500gP, firmware je z http://code.google.com/p/wl500g/
[marian@nb ~]$ ssh marian@nest Password: Last login: Thu Feb 17 13:54:41 CET 2011 on :0 marian@nest ~ $ ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8007::6a) 56 data bytes ^C --- ipv6.google.com ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 2999ms marian@nest ~ $ /sbin/ip -6 addr list eth0 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 2002:bcaf:2821:0:21f:d0ff:fed6:905e/64 scope global dynamic valid_lft 28sec preferred_lft 18sec inet6 fe80::21f:d0ff:fed6:905e/64 scope link valid_lft forever preferred_lft forever marian@nest ~ $ odhlášení Connection to nest closed. [marian@nb ~]$ ssh marian@2002:bcaf:2821:0:21f:d0ff:fed6:905e The authenticity of host '2002:bcaf:2821:0:21f:d0ff:fed6:905e (2002:bcaf:2821:0:21f:d0ff:fed6:905e)' can't be established. ECDSA key fingerprint is cc:59:d6:93:cd:7c:9d:6e:96:21:10:aa:c7:28:8f:8c. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '2002:bcaf:2821:0:21f:d0ff:fed6:905e' (ECDSA) to the list of known hosts. Password: Last login: Thu Feb 17 19:34:37 CET 2011 from nbmkyral-e6500 on pts/1 marian@nest ~ $ ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8007::6a) 56 data bytes 64 bytes from 2a00:1450:8007::6a: icmp_seq=1 ttl=57 time=24.1 ms 64 bytes from 2a00:1450:8007::6a: icmp_seq=2 ttl=57 time=23.6 ms 64 bytes from 2a00:1450:8007::6a: icmp_seq=3 ttl=57 time=57.7 ms ^C --- ipv6.google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 23.625/35.175/57.706/15.934 ms marian@nest ~ $ odhlášení Connection to 2002:bcaf:2821:0:21f:d0ff:fed6:905e closed. [marian@nb ~]$ ssh marian@nest Password: Last login: Thu Feb 17 19:37:12 CET 2011 from 2002:bcaf:2821:0:221:6aff:fe55:41ee on pts/1 marian@nest ~ $ ping6 ipv6.google.com PING ipv6.google.com(2a00:1450:8007::6a) 56 data bytes 64 bytes from 2a00:1450:8007::6a: icmp_seq=1 ttl=57 time=33.0 ms 64 bytes from 2a00:1450:8007::6a: icmp_seq=2 ttl=57 time=23.9 ms 64 bytes from 2a00:1450:8007::6a: icmp_seq=3 ttl=57 time=36.7 ms ^C --- ipv6.google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 23.944/31.244/36.706/5.371 ms marian@nest ~ $
Nabízí se tedy otázka, proč. Má někdo nějaký nápad, co může být za tím? Další detaily, se dají najít tady.
Tiskni
Sdílej:
[maros@router disc0_3]$ iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere state NEW ACCEPT all -- anywhere anywhere state NEW SECURITY all -- anywhere anywhere state NEW ACCEPT udp -- anywhere anywhere udp spt:bootps dpt:bootpc BRUTE tcp -- anywhere anywhere tcp dpt:ssh flags:FIN,SYN,RST,ACK/SYN ACCEPT tcp -- anywhere router tcp dpt:www ACCEPT icmp -- anywhere anywhere ACCEPT udp -- anywhere anywhere udp dpts:33434:33534 ACCEPT ipv6 -- anywhere anywhere DROP all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:9176 ACCEPT udp -- anywhere anywhere udp dpt:9176 ACCEPT tcp -- anywhere anywhere tcp dpt:51413 ACCEPT udp -- anywhere anywhere udp dpt:51413 ACCEPT tcp -- anywhere anywhere tcp dpt:9091 ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT udp -- anywhere anywhere udp dpt:https ACCEPT tcp -- anywhere anywhere tcp dpt:webcache ACCEPT udp -- anywhere anywhere udp dpt:webcache DROP tcp -- anywhere anywhere tcp dpts:netbios-ns:netbios-ssn DROP udp -- anywhere anywhere udp dpts:netbios-ns:netbios-ssn DROP tcp -- anywhere anywhere tcp dpts:bootps:bootpc DROP udp -- anywhere anywhere udp dpts:bootps:bootpc DROP all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED DROP all -- anywhere anywhere SECURITY all -- anywhere anywhere state NEW ACCEPT all -- anywhere anywhere ctstate DNAT DROP all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain BRUTE (1 references) target prot opt source destination DROP all -- anywhere anywhere recent: UPDATE seconds: 600 hit_count: 5 name: BRUTE side: source ACCEPT all -- anywhere anywhere recent: SET name: BRUTE side: source Chain MACS (0 references) target prot opt source destination Chain SECURITY (2 references) target prot opt source destination RETURN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN limit: avg 1/sec burst 5 RETURN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5 RETURN udp -- anywhere anywhere limit: avg 5/sec burst 5 RETURN icmp -- anywhere anywhere limit: avg 5/sec burst 5 RETURN ipv6 -- anywhere anywhere DROP all -- anywhere anywhere Chain logaccept (0 references) target prot opt source destination LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `ACCEPT ' ACCEPT all -- anywhere anywhere Chain logdrop (0 references) target prot opt source destination LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `DROP ' DROP all -- anywhere anywhere [maros@router disc0_3]$ ip6tables -L Chain INPUT (policy ACCEPT) target prot opt source destination DROP all anywhere anywhere rt type:0 ACCEPT ipv6-icmp anywhere anywhere ipv6-icmp !echo-request ACCEPT all anywhere anywhere ACCEPT all anywhere anywhere ACCEPT all fe80::/10 anywhere ACCEPT all ff00::/8 anywhere ACCEPT tcp anywhere anywhere tcp dpt:ssh ACCEPT tcp anywhere router/128 tcp dpt:www ACCEPT ipv6-icmp anywhere anywhere ipv6-icmp echo-request ACCEPT udp anywhere anywhere udp dpts:33434:33534 DROP all anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination DROP all anywhere anywhere rt type:0 ACCEPT all anywhere anywhere ACCEPT all ff00::/8 anywhere ACCEPT ipv6-icmp anywhere anywhere ACCEPT all fe80::/10 anywhere DROP all anywhere anywhere DROP all anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination DROP all anywhere anywhere rt type:0 Chain SECURITY (0 references) target prot opt source destination RETURN tcp anywhere anywhere tcp flags:SYN,RST,ACK/SYN limit: avg 1/sec burst 5 RETURN tcp anywhere anywhere tcp flags:FIN,SYN,RST,ACK/RST limit: avg 1/sec burst 5 RETURN udp anywhere anywhere limit: avg 5/sec burst 5 RETURN icmp anywhere anywhere limit: avg 5/sec burst 5 DROP all anywhere anywhere Chain logaccept (0 references) target prot opt source destination LOG all anywhere anywhere LOG level warning tcp-sequence tcp-options ip-options prefix `ACCEPT ' ACCEPT all anywhere anywhere Chain logdrop (0 references) target prot opt source destination LOG all anywhere anywhere LOG level warning tcp-sequence tcp-options ip-options prefix `DROP ' DROP all anywhere anywhere
[maros@router disc0_3]$ ping ipv6.google.com PING ipv6.google.com (2a00:1450:8007::63): 56 data bytes 64 bytes from 2a00:1450:8007::63: seq=0 ttl=58 time=23.466 ms 64 bytes from 2a00:1450:8007::63: seq=1 ttl=58 time=23.556 ms 64 bytes from 2a00:1450:8007::63: seq=2 ttl=58 time=23.425 ms 64 bytes from 2a00:1450:8007::63: seq=3 ttl=58 time=23.159 ms
[maros@router net]$ cat ./ipv6/conf/all/forwarding 1Ovšem tohle jsem teď našel v messages. Vypadá to zajímavě. Zkusím google.
Feb 17 23:49:49 kernel: Dead loop on virtual device six0, fix it urgently! Feb 17 23:49:54 kernel: NET: 4 messages suppressed. Feb 17 23:49:54 kernel: Dead loop on virtual device six0, fix it urgently! Feb 17 23:49:59 kernel: NET: 4 messages suppressed. Feb 17 23:49:59 kernel: Dead loop on virtual device six0, fix it urgently!
Aha, asi jsem koukal jinam.
Nemůžete si na router nainstalovat tcpdump, který umí IPv6, nebo si uložit pcap protokol a ten dekódovat jinde? (Luštit z hlavy binární proud se mi nechce; chodí tam packety ze stanice do Googlu, ale jenom tam.) Obě umí tcpdump. Nezapomeňte při ukládání zadat paremetr -s0, aby se ukládaly celé packety, ne jenom kousek, jak je vidět u těch IPv6 rámců.
Navíc zjevně máte problém už v lokální síti, když si ze stanice nepingnete ani na vlastní router. (Tohle vůbec není vidět ve výpisu z routeru, tam máte jen ten Google.) Řešte nejprve tento problém. U dekódovaného výstupu by se taky hodil parametr -e, aby byly vidět linkové adresy.
Pokud nechcete být rušen IPv4 provozem, zadejte jako argument „ip6“, ve výpisu pak bude jen ten.
Taky se v době poruchy podívejte na obsah cache linkových adres (ip -6 ne show
) a zeptejte se jádra, jak si představuje směrování pro danou cílovou IP adresu (ip route get IP_ADRESA
).
Možná místo restartování routeru vám bude stači smazat cache směrovacích pravidel (ip -6 route flush cache
).
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.