LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-16-2015, 09:05 AM   #1
Lieta
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Rep: Reputation: Disabled
ping6 doesn't work


I'm not very familiar with IPv6, hence this question.
IPv6 ping of a link local address of another host in LAN doesn't work. The reply is received, but it is passed to ip6_forward instead of ip6_input, so the problem is in the routing subsystem.
The reply has destination IPv6 address of eth0 - fe80::203:19ff:fe00:1616
Code:
root@OpenWrt:/# ping -6 -I eth0 fe80::6508:85f3:bc2b:596f
PING fe80::6508:85f3:bc2b:596f (fe80::6508:85f3:bc2b:596f): 56 data bytes
^C
--- fe80::6508:85f3:bc2b:596f ping statistics ---
6 packets transmitted, 0 packets received, 100% packet loss
[  137.308000] icmp6_send: no reply to icmp error
[  137.312000] icmp6_send: no reply to icmp error
[  137.316000] icmp6_send: no reply to icmp error
[  140.320000] icmp6_send: no reply to icmp error
[  140.324000] icmp6_send: no reply to icmp error
[  140.328000] icmp6_send: no reply to icmp error

root@OpenWrt:/# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:03:19:00:16:16
          inet addr:192.168.1.121  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::203:19ff:fe00:1616/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9484 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9588 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4839591 (4.6 MiB)  TX bytes:1486258 (1.4 MiB)

root@OpenWrt:/# route -A inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
fe80::203:19ff:fe00:1580/127                ::                                      U     256    0        0 veth0
fe80::/64                                   ::                                      U     256    0        0 eth0
fe80::/64                                   ::                                      U     256    0        0 eth1
::1/128                                     ::                                      U     0      0        1 lo
fe80::203:19ff:fe00:1580/128                ::                                      U     0      0        1 lo
fe80::203:19ff:fe00:1617/128                ::                                      U     0      0        1 lo
ff02::1:2/128                               ::                                      UC    0      4        0 eth0
ff00::/8                                    ::                                      U     256    0        1 eth0
ff00::/8                                    ::                                      U     256    0        0 veth0
ff00::/8                                    ::                                      U     256    0        0 eth1
 
Old 04-16-2015, 09:41 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
You have two route to the subnet of your local ipv6 address on eth0. One is to iface eth0 the other to eth1. You need to narrow those routes down. But as i dont know how you should check the "Advanced routing and traffic control howto". But to be sure thats the cause. Disable eth1 for a minute and see if the ping works then. Else check some iptables settings. Maybe theres some fancy stuff there.

http://www.lartc.org/
 
Old 04-16-2015, 09:45 AM   #3
Lieta
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
You have two route to the subnet of your local ipv6 address on eth0. One is to iface eth0 the other to eth1. You need to narrow those routes down. But as i dont know how you should check the "Advanced routing and traffic control howto". But to be sure thats the cause. Disable eth1 for a minute and see if the ping works then. Else check some iptables settings. Maybe theres some fancy stuff there.

http://www.lartc.org/
Disabled eth1, the route disappeared:
Code:
root@OpenWrt:/# route -A inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
fe80::203:19ff:fe00:1580/127                ::                                      U     256    0        0 veth0
fe80::/64                                   ::                                      U     256    0        0 eth0
::1/128                                     ::                                      U     0      0        1 lo
fe80::203:19ff:fe00:1580/128                ::                                      U     0      0        1 lo
ff00::/8                                    ::                                      U     256    0        0 eth0
ff00::/8                                    ::                                      U     256    0        0 veth0
but ping6 still doesn't work. iptables are disabled.
 
Old 04-17-2015, 08:02 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
How did you qualify that the reply goes into ip6_forward. Actually what do you mean with it? Did you use tcpdump to confirm the reply package hits your machine?

How about the routes on the other system? The one you are pinging.
 
Old 04-17-2015, 08:08 AM   #5
Lieta
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
How did you qualify that the reply goes into ip6_forward. Actually what do you mean with it? Did you use tcpdump to confirm the reply package hits your machine?

How about the routes on the other system? The one you are pinging.
I added printks to the functions along the packet path. Yes, I captured the packets on eth0 with tcpdump as well and see that the replies are there.
 
Old 04-22-2015, 10:48 AM   #6
Lieta
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
I identified the routing rule responsible for receiving packets.
Code:
root@OpenWrt:/# cat /proc/net/ipv6_route
fe80000000000000020319fffe001580 7f 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001    veth0
fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001     eth0
fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001     eth1
00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 0000000a 00200200       lo
00000000000000000000000000000001 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001       lo
fe80000000000000020319fffe001580 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001       lo
fe80000000000000020319fffe001617 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001       lo
ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001     eth0
ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001    veth0
ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001     eth1
00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 0000000a 00200200       lo

root@OpenWrt:/# ip -6 route list table local
local ::1 dev lo  proto none  metric 0
local fe80::203:19ff:fe00:1580 dev lo  proto none  metric 0
local fe80::203:19ff:fe00:1617 dev lo  proto none  metric 0
ff00::/8 dev eth0  metric 256
ff00::/8 dev veth0  metric 256
ff00::/8 dev eth1  metric 256
I want to add the same rule for eth0
Code:
root@OpenWrt:/# ip -6 route add local fe80::203:19ff:fe00:1616 table local dev lo proto none metric 0
root@OpenWrt:/# ip -6 route list table local
local ::1 dev lo  proto none  metric 0
local fe80::203:19ff:fe00:1580 dev lo  proto none  metric 0
local fe80::203:19ff:fe00:1616 dev lo  metric 1024
local fe80::203:19ff:fe00:1617 dev lo  proto none  metric 0
Result:
Code:
fe80000000000000020319fffe001616 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 80000001       lo
ping6 still doesn't work.
The difference is in the "flags" parameter (last but one column):
80200001
vs
80000001
The "metrics" doesn't match as well, but I think it is not the reason of non working ping.

The newly added rule doesn't have a RTF_NONEXTHOP flag set, which is commented as "route with no nexthop" flag in header file. How to set this flag?

Last edited by Lieta; 04-22-2015 at 11:04 AM.
 
Old 04-23-2015, 04:30 AM   #7
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Nice catch on finding it.

Honestly I did not look at the lo device. Any special reason why it has another ip address instead of the usual ::1? I'm not into ipv6 thus deep but is there any special reason why its set?

On how to set the flag I have not clue. Sorry can't help you there.
 
Old 04-23-2015, 05:12 AM   #8
Lieta
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
Nice catch on finding it.

Honestly I did not look at the lo device. Any special reason why it has another ip address instead of the usual ::1? I'm not into ipv6 thus deep but is there any special reason why its set?
lo has IPv6 of ::1/128.
Code:
root@OpenWrt:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:03:19:00:16:16
          inet addr:192.168.1.121  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::203:19ff:fe00:1616/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9168 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9255 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4814437 (4.5 MiB)  TX bytes:1437851 (1.3 MiB)

eth1      Link encap:Ethernet  HWaddr 00:03:19:00:16:17
          inet addr:10.2.2.1  Bcast:10.2.255.255  Mask:255.255.0.0
          inet6 addr: fe80::203:19ff:fe00:1617/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3380 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3393 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1868716 (1.7 MiB)  TX bytes:1873906 (1.7 MiB)

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:65536  Metric:1
          RX packets:49 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3412 (3.3 KiB)  TX bytes:3412 (3.3 KiB)
Another routing entry for the eth0 IPv6 address with "lo" device is required.
 
Old 04-23-2015, 05:31 AM   #9
Lieta
LQ Newbie
 
Registered: Nov 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
I was able to add the routing rule by removing IPv6 address from eth0 and adding it back with
Code:
ip -6 addr del fe80::203:19ff:fe00:1616/64 dev eth0
ip -6 addr add fe80::203:19ff:fe00:1616/64 dev eth0
Now it works, with interface specified:
Code:
ping6 -I eth0 -c 1 fe80::6508:85f3:bc2b:596f

Last edited by Lieta; 04-23-2015 at 06:03 AM.
 
Old 04-24-2015, 02:36 AM   #10
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Great you got it solved. I did not even bother looking into the lo device. As it seems theres something special about it with ipv6. Just an example from my machine
Quote:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:15:5d:64:fb:42 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.9/24 brd 192.168.100.255 scope global eth0
inet6 fe80::215:5dff:fe64:fb42/64 scope link
valid_lft forever preferred_lft forever

mom@rm:~$ ip -6 route list table local
local ::1 via :: dev lo proto none metric 0 rtt 15ms rttvar 19ms cwnd 10
local fe80::215:5dff:fe64:fb42 via :: dev lo proto none metric 0
ff00::/8 dev eth0 metric 256
mom@rm:~$ ip route list table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.100.0 dev eth0 proto kernel scope link src 192.168.100.9
local 192.168.100.9 dev eth0 proto kernel scope host src 192.168.100.9
broadcast 192.168.100.255 dev eth0 proto kernel scope link src 192.168.100.9
The ipv6 network from eth0 is also put down on lo. Which is not the case with ipv4.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Keyboard doesn't work right click on mouse doesn't work ramblinrick Linux Mint 2 10-15-2010 02:10 AM
Help in ping6 ssenthilkumar Linux - Networking 0 07-14-2009 03:03 AM
Need help in ping6 ssenthilkumar Linux - Networking 0 07-10-2009 05:28 AM
IPv6: Can't get ping6 to work in Foresight Linux PaulFXH Linux - Networking 0 07-26-2008 01:10 PM
cannot ping6 kpachopoulos Linux - Networking 0 05-04-2006 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration