Date: Fri, 23 Oct 2015 01:08:38 +0200 From: Alarig Le lay <alarig@swordarmor.fr> To: freebsd-net@freebsd.org Subject: Cannot add an ipv6 route with -interface Message-ID: <20151022230838.GA22065@drscott.swordarmor.fr>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi, I try to add an IPv6 route on a 10.1 FreeBSD router by using the option -interface. It works with IPv4 but not with IPv6. In IPv4: alarig@nominoe:~ % ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 76 bytes from te0-0-2-2.rcr11.uro01.atlas.cogentco.com (130.117.1.242): Destination Net Unreachable Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 68 0054 0bea 0 0000 3e 01 d145 149.6.72.98 192.168.1.1 alarig@nominoe:~ % sudo route add 192.168.1.0/24 -interface em1 add net 192.168.1.0: gateway em1 alarig@nominoe:~ % ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=75 ttl=64 time=0.831 ms In IPv6: alarig@nominoe:~ % ping6 2a00:5884:8200::100 PING6(56=40+8+8 bytes) 2001:978:2:4e::5:2 --> 2a00:5884:8200::100 ^C --- 2a00:5884:8200::100 ping6 statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss alarig@nominoe:~ % sudo route add -6 2a00:5884:8200::/40 -interface em1 add net 2a00:5884:8200::/40: gateway em1 alarig@nominoe:~ % ping6 2a00:5884:8200::100 PING6(56=40+8+8 bytes) 2a00:5884::1 --> 2a00:5884:8200::100 ping6: sendmsg: Operation not permitted ping6: wrote 2a00:5884:8200::100 16 chars, ret=-1 This operation works on linux: alarig@judicael:~$ ping6 2a00:5884:8200::100 PING 2a00:5884:8200::100(2a00:5884:8200::100) 56 data bytes From 2a00:5884::1 icmp_seq=1 Destination unreachable: Address unreachable From 2a00:5884::1 icmp_seq=2 Destination unreachable: Address unreachable ^C --- 2a00:5884:8200::100 ping statistics --- 2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1007ms alarig@judicael:~$ sudo ip -6 route add 2a00:5884:8200::/40 dev eth0 alarig@judicael:~$ ping6 2a00:5884:8200::100 PING 2a00:5884:8200::100(2a00:5884:8200::100) 56 data bytes 64 bytes from 2a00:5884:8200::100: icmp_seq=1 ttl=63 time=1.41 ms 64 bytes from 2a00:5884:8200::100: icmp_seq=2 ttl=63 time=0.588 ms 64 bytes from 2a00:5884:8200::100: icmp_seq=3 ttl=63 time=0.459 ms ^C --- 2a00:5884:8200::100 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 0.459/0.819/1.410/0.421 ms It also works if I add an intermediate router: alarig@nominoe:~ % sudo route add -6 2a00:5884:8200::/40 2a00:5884::3 add net 2a00:5884:8200::/40: gateway 2a00:5884::3 alarig@nominoe:~ % ping6 2a00:5884:8200::100 PING6(56=40+8+8 bytes) 2a00:5884::1 --> 2a00:5884:8200::100 16 bytes from 2a00:5884:8200::100, icmp_seq=0 hlim=64 time=0.590 ms 16 bytes from 2a00:5884:8200::100, icmp_seq=1 hlim=64 time=0.699 ms 16 bytes from 2a00:5884:8200::100, icmp_seq=2 hlim=64 time=0.764 ms 16 bytes from 2a00:5884:8200::100, icmp_seq=3 hlim=64 time=0.806 ms ^C --- 2a00:5884:8200::100 ping6 statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 0.590/0.715/0.806/0.081 ms This router is theoretically useless as it is on the same network than the FreeBSD one. Do you have any idea about this issue? Did I make a mistake or is it a bug? Thanks, -- Alarig Le Lay [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWKWx2AAoJEK84SsFrICuI5qEH/3PVrhKlaDV2IJV2F/10ravJ 5VKR0RwcNn6reZW+iSuEJ1oZx7FjKAfx7gIdILn+gtD7FrOZ8+TnbrRxmyOEtL8y dlFkWMsuM365V09H3Zvnr1cAKkvONacbIumgbO847z3W7J5Fq5CpXznN2T7NTDVJ tepeOu9cUjj/5d/UvotTg5aZvfYEGZs1IiIEPEI5WWlrbhRtYq4kGGFikNTQyTTj VLDaePTiAyHpcbLM3ju5/cEGkMP/FF23fm94Greb8g5UO/Cg7YYyatGGtBIEEr3Q /uHNQW3ETFtCFWJyMlX68Cx5iCYmRDvRYBePsFSOIqEVyf+t4PIAFL5OGroczHI= =rhq7 -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151022230838.GA22065>
