Ubuntu: IPv6: ping6 from foreign host works, but cannot ping6 on same host



Question:

I have a strange issue with ipv6 on Ubuntu 12.04.

There are two hosts, directly connected to the internet. Both have assigned a /64 network. They are properly configured with a /128 endpoint each and one can ping6 the other and vice versa. My plan was to terminate a /112 subnet of my assigned ipv6/64 to the interface to have plenty of addresses for usage in apache2 vhosts. But that's not the point.

Host A:

$ ifconfig  eth0      Link encap:Ethernet  HWaddr (...)            inet6 addr: fe80::5246:5dff:(...)/64 Scope:Link            inet6 addr: 2a01:xxx:xxx:000A::2/64 Scope:Global    $ route -A inet6  Kernel IPv6 routing table  Destination                    Next Hop                   Flag Met Ref Use If  2a01:xxx:xx:000A::/64          ::                         U    256 0     0 eth0  fe80::/64                      ::                         U    256 0     0 eth0  ::/0                           fe80::1                    UG   1024 0     0 eth0  ::/0                           ::                         !n   -1  1  5689 lo  ::1/128                        ::                         Un   0   1    18 lo  2a01:xxx:xx:000A::2/128        ::                         Un   0   1   202 lo  2a01:xxx:xx:000A::/112        ::                         U    1024 0     0 lo  fe80::5246:5dff:fea1:977c/128  ::                         Un   0   1    86 lo  ff00::/8                       ::                         U    256 0     0 eth0  ::/0                           ::                         !n   -1  1  5689 lo  

Host B can ping6 2a01:xxx:xx:000A::[0001-FFFF] correctly and works as I expected it. But on Host A, I cannot ping my own Addresses. If I try to ping6 2a01:xxx:xxx:000A::n, I get this one:

$ ping6 2a01:xxx:xxx:000A::3  PING (...) 56 data bytes  ping: sendmsg: Invalid argument  ping: sendmsg: Invalid argument  ping: sendmsg: Invalid argument  

I suspect the routing table, but I've played around with it a long time and even using google I can't get it work.

Any Ideas? Thanks.


Solution:1

The problem appears to be this:

2a01:xxx:xx:000A::/112        ::                         U    1024 0     0 lo  

You have a /112 route which is more specific than the /64 route:

2a01:xxx:xx:000A::/64          ::                         U    256 0     0 eth0  

And are telling it to deliver over loopback interface.

It is also curious that you have:

2a01:xxx:xx:000A::2/128        ::                         Un   0   1   202 lo  

Can you ensure all these addresses are on the eth0 interface and that if you are adding routes you add them to eth0?


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »