1

On CentOS 5.10 I'm trying to add static IPv6 route via external GW (6::a0c:34a) as follows:

ip -6 route add 12::/64 via 6::a0c:34a dev eth1

The above returns a RTNETLINK answers: Invalid argument error.

Now if I try the same but change the GW addr to 2006::a0c:34a

ip -6 route add 12::/64 via 2006::a0c:34a dev eth1

everything works fine.

Any ideas?

1
  • 3
    How did you get IANA to delegate that address space to you? :-) If they didn't: please use real addresses from either your ISP, PI addresses or ULA addresses. There is no reason to hijack unused address space in IPv6. Nov 29, 2013 at 12:00

1 Answer 1

1

You cannot add a route whose gateway is an invalid IP address. If you try, you receive the Invalid argument error.

(But you can add routes to invalid IP address ranges. This is to support bogon handling, blackholing, and various other oddball scenarios that you should not normally have to deal with.)

To resolve this problem, renumber your network so that all hosts have valid IPv6 addresses.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .