Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam,
Chcę na interfejsie eth0 skonfigurować połączenie przez ipv6, udało mi się to zrobić, ale połączenie było zrywane co pół godziny i już nie łączyło znowu do momentu restartu maszyny. W tej chwili kompletnie nie łączy przez IPv6, nie mogę sobie z tym poradzić.
Dane od providera:
IPv6 IPv6 prefix: 2a02:25b0:aaaa:200::/64 IPv6 gateway: 2a02:25b0:aaaa::1 DNS1: 2001:4860:4860::8888 DNS2: 2001:4860:4860::8844
Moja konfiguracja:
root@worldshit:/home/mleko# ping6 2a01:270:0:6668::2 connect: Network is unreachable root@worldshit:/home/mleko# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 46.36.37.40 netmask 255.255.255.0 gateway 46.36.37.1 #ipv6 static iface eth0 inet6 static address 2a02:25b0:aaaa:200::2/64 pre-up modprobe ipv6 gateway 2a02:25b0:aaaa::1 netmask 64
root@worldshit:/home/mleko# cat /etc/resolv.conf nameserver 46.36.35.65 nameserver 8.8.8.8 root@worldshit:/home/mleko#
root@worldshit:/home/mleko# ifconfig -a eth0 Link encap:Ethernet HWaddr 9e:ca:04:b0:1f:be inet addr:46.36.37.40 Bcast:46.36.37.255 Mask:255.255.255.0 inet6 addr: fe80::9cca:4ff:feb0:1fbe/64 Scope:Link inet6 addr: 2a02:25b0:aaaa:200::2/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2196 errors:0 dropped:0 overruns:0 frame:0 TX packets:272 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:183957 (179.6 KiB) TX bytes:43163 (42.1 KiB) 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:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@worldshit:/home/mleko#
Jeszcze ping na brame:
root@worldshit:/home/mleko# ping6 2a02:25b0:aaaa::1 connect: Network is unreachable root@worldshit:/home/mleko#
Ostatnio edytowany przez milik (2013-11-21 10:27:53)
Offline
Na pierwszy rzut oka jedna rzeczy wydaje się nie w porządku:
[b]Twój adres to:[/b] 2a02:25b0:aaaa:200::2
[b]Długość prefixu to:[/b] /64
[b]Twoja brama to:[/b] 2a02:25b0:aaaa::1
Wynika z tego, że twój host jest w innej podsieci niż brama. Aby brama była w tej samej podsieci, co twój host (przy długości prefixu /64), powinna zawierać się w przedziale:
2a02:25b0:aaaa:200::1 - 2a02:25b0:aaaa:200:ffff:ffff:ffff:ffff
Offline
Poprawiłem plik /etc/network/interfaces :
root@worldshit:/home/mleko# cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 46.36.37.40 netmask 255.255.255.0 gateway 46.36.37.1 #ipv6 static iface eth0 inet6 static pre-up modprobe ipv6 address 2a02:25b0:aaaa:200:0000:0000:0000:0002 netmask 64 gateway 2a02:25b0:aaaa:0000:0000:0000:0000:0001 root@worldshit:/home/mleko#
zgodnie z poradnikiem:
http://www.cyberciti.biz/faq/debian-linux-ipv6-networking-configuration/
Dalej nie działa:
root@worldshit:/home/mleko# ip -6 route show 2a02:25b0:aaaa:200::/64 dev eth0 proto kernel metric 256 fe80::/64 dev eth0 proto kernel metric 256 root@worldshit:/home/mleko#
root@worldshit:/home/mleko# ping6 www.cyberciti.biz connect: Network is unreachable root@worldshit:/home/mleko#
Offline
Twoja brama cały czas jest w innej podsieci, niż host (patrz poprzedni post).
Offline
No, ok, rozumiem, ale tak jest to ustalone przez dostawce serwera VPS. Możliwe, że to oni się pomylili?
Pisałem wczoraj do supportu i przysłali mnie taką odpowiedź, może to coś pomoże bo ja nie mam kompletnie pojęcia co i jak:
Now i can see, you got problem in v6 connectivity - these settings should resolve your problem. The main goal is to disable IPv6 autoconfiguration features in sysctl. #/etc/network/interfaces allow-hotplug eth0 iface eth0 inet static up ip -6 addr add 2a02:25b0:aaaa:200::1/48 dev eth0 up ip -6 route add default via 2a02:25b0:aaaa::1
#/etc/sysctl.conf net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.eth0.accept_ra = 0
Mój plik /etc/sysctl.conf wygląda tak:
root@worldshit:/home/mleko# cat /etc/sysctl.conf # # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additonal system variables # See sysctl.conf (5) for information. # #kernel.domainname = example.com # Uncomment the following to stop low-level messages on console #kernel.printk = 3 4 1 3 ##############################################################3 # Functions previously found in netbase # # Uncomment the next two lines to enable Spoof protection (reverse-path filter) # Turn on Source Address Verification in all interfaces to # prevent some spoofing attacks #net.ipv4.conf.default.rp_filter=1 #net.ipv4.conf.all.rp_filter=1 # Uncomment the next line to enable TCP/IP SYN cookies # See http://lwn.net/Articles/277146/ # Note: This may impact IPv6 TCP sessions too #net.ipv4.tcp_syncookies=1 # Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 # Enabling this option disables Stateless Address Autoconfiguration # based on Router Advertisements for this host #net.ipv6.conf.all.forwarding=1 ################################################################### # Additional settings - these settings can improve the network # security of the host and prevent against some network attacks # including spoofing attacks and man in the middle attacks through # redirection. Some network environments, however, require that these # settings are disabled so review and enable them as needed. # # Do not accept ICMP redirects (prevent MITM attacks) #net.ipv4.conf.all.accept_redirects = 0 #net.ipv6.conf.all.accept_redirects = 0 # _or_ # Accept ICMP redirects only for gateways listed in our default # gateway list (enabled by default) # net.ipv4.conf.all.secure_redirects = 1 # # Do not send ICMP redirects (we are not a router) #net.ipv4.conf.all.send_redirects = 0 # # Do not accept IP source route packets (we are not a router) #net.ipv4.conf.all.accept_source_route = 0 #net.ipv6.conf.all.accept_source_route = 0 # # Log Martian Packets #net.ipv4.conf.all.log_martians = 1 # net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.eth0.accept_ra = 0 root@worldshit:/home/mleko#
Offline
No widzisz. Oni przesłali Ci adres z prefikxem o długości /48 i w takiej sytuacji oba hosty będą w tej samej podsieci. Ty natomiast, ustawaiasz prefix o długości /64
Offline
Dziękuję za pomoc, okazało się że problem był właśnie w prefixie. Źle wpisywałem.
Offline
Time (s) | Query |
---|---|
0.00010 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00114 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.217.237.169' WHERE u.id=1 |
0.00083 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.217.237.169', 1732855157) |
0.00044 | SELECT * FROM punbb_online WHERE logged<1732854857 |
0.00089 | DELETE FROM punbb_online WHERE ident='3.138.175.10' |
0.00074 | SELECT topic_id FROM punbb_posts WHERE id=246280 |
0.00106 | SELECT id FROM punbb_posts WHERE topic_id=24647 ORDER BY posted |
0.00064 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=24647 AND t.moved_to IS NULL |
0.00005 | SELECT search_for, replace_with FROM punbb_censoring |
0.00128 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=24647 ORDER BY p.id LIMIT 0,25 |
0.00099 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=24647 |
Total query time: 0.0082 s |