LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-11-2015, 09:45 PM   #1
woowoo
LQ Newbie
 
Registered: May 2015
Posts: 3

Rep: Reputation: Disabled
Question IPv6 works, then stops working, then works again after restarting networking service


Hi there, and first of all thanks for reading!

So I saw some problems on my server as I am using IPv6 for some services such as DNS transfer for instance. I thus want to keep IPv6 active.

When I reboot my server, IPv6 works fine:
Code:
root@x:~# ping6 ipv6.google.com
PING ipv6.google.com(par10s22-in-x0e.1e100.net) 56 data bytes
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=1 ttl=57 time=4.61 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=2 ttl=57 time=4.67 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=3 ttl=57 time=4.81 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=4 ttl=57 time=4.64 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=5 ttl=57 time=4.56 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=6 ttl=57 time=4.68 ms
But after a few minutes/hours:
Code:
root@x:~# ping6 ipv6.google.com
connect: Network is unreachable
But if I restart the networking service:
Code:
root@x:~# service networking restart
[warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
[....] Reconfiguring network interfaces...SIOCDIFADDR: Cannot assign requested address
done.
root@x:~# ping6 ipv6.google.com
PING ipv6.google.com(par10s22-in-x0e.1e100.net) 56 data bytes
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=1 ttl=57 time=4.58 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=2 ttl=57 time=4.59 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=3 ttl=57 time=4.71 ms
64 bytes from par10s22-in-x0e.1e100.net: icmp_seq=4 ttl=57 time=4.62 ms
I am using Debian Wheezy:
Code:
root@x:~# cat /etc/debian_version
7.8
And my IPv6 configuration is done statically in /etc/network/interfaces:
Code:
iface lo inet6 loopback

iface eth0 inet6 static
	address 2001:x:x:x::42/64
	netmask 64
Do you have any idea why it stops working every so often?
Is there anything I can do to correct that behavior?

Thanks!
 
Old 05-11-2015, 11:15 PM   #2
woowoo
LQ Newbie
 
Registered: May 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
I keep here updated of my research in case someone has an idea reading from my news.

So I looked up that:
Code:
root@x:~# ip -6 route
And I saw that the result is different whether I can ping an IPv6 IP or not.
Working case:
Code:
root@x:~# ip -6 route
2001:xxxx:xxxx:4b3a::/64 dev eth0  proto kernel  metric 256 
2001:xxxx:xxxx:4b00::/56 dev eth0  proto kernel  metric 256  expires 2591970sec
fe80::/64 dev eth0  proto kernel  metric 256 
default via fe80::xxxx:xxxx:xxxx:f080 dev eth0  proto kernel  metric 1024  expires 1608sec
default via fe80::xxxx:xxxx:xxxx:f100 dev eth0  proto kernel  metric 1024  expires 1608sec
Not working case:
Code:
root@x:~# ip -6 route
2001:xxxx:xxxx:4b3a::/64 dev eth0  proto kernel  metric 256 
2001:xxxx:xxxx:4b00::/56 dev eth0  proto kernel  metric 256  expires 2591970sec
fe80::/64 dev eth0  proto kernel  metric 256
So, it seems my two default gateway disappear.

I used a bash script to loop every few seconds and ping6 -c1 ipv6.google.com while the default route were still in the result of that command:
Code:
mROUTE="$(ip -6 route)"; while [ -n "$(echo "$mROUTE" | grep "default")" ]; do echo "$mROUTE"; ping6 -c1 ipv6.google.com; sleep 2; mROUTE="$(ip -6 route)"; done; echo "NOPE"; echo "NOPE"; echo "NOPE"; ping6 -c1 ipv6.google.com
And it seemed to loop even after the expiration, because as soon as it expired, I got these lines instead in the ip -6 route:
Code:
default via fe80::xxxx:xxxx:xxxx:f100 dev eth0  proto kernel  metric 1024  expires 8590471sec
default via fe80::xxxx:xxxx:xxxx:f080 dev eth0  proto kernel  metric 1024  expires 8590471sec
So I stopped my loop, and used ping6 ipv6.google.com manually: I got the error. I looked back at ip -6 route, and the lines were not here anymore.
I tried editing my /etc/network/interfaces to add the "gateway" line, then did service networking restart. I have the same default via appearing in the ip -6 route, with the same expiration. I'm now waiting for the delay to expire to see if ipv6 will be inaccessible again...

Last edited by woowoo; 05-11-2015 at 11:17 PM. Reason: wording
 
Old 05-11-2015, 11:53 PM   #3
woowoo
LQ Newbie
 
Registered: May 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Ok, problem solved!
So it was really a gateway problem. Adding the gateway as static work now like a charm!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
XAWTV works, videodog works, motion works but how to code my own? rylan76 Linux - Hardware 0 01-06-2006 06:30 AM
PCMCIA works only after restarting it f.haverkamp Linux - Laptop and Netbook 0 03-21-2004 05:50 AM
VNC Works then stops! Reboot fixes but then it stops again! Leethal Linux - Software 1 02-26-2004 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration