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/.


Użytkownik



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

Użytkownik


Na pierwszy rzut oka jedna rzeczy wydaje się nie w porządku:
Twój adres to: 2a02:25b0:aaaa:200::2
Długość prefixu to: /64
Twoja brama to: 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


Użytkownik



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-netw … onfiguration/
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

Użytkownik


Twoja brama cały czas jest w innej podsieci, niż host (patrz poprzedni post).
Offline


Użytkownik



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

Użytkownik


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


Użytkownik



Dziękuję za pomoc, okazało się że problem był właśnie w prefixie. Źle wpisywałem.
Offline