1

Im having this issue recently.

the iproute2 utility cant add a ipv6 address

/sbin/ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0 

RTNETLINK answers: Invalid argument

that ip is just copied from the examples I found online

in a fedora(20) machine works flawlesly but in this centos6 dont seems to work

cat /proc/sys/net/ipv6/conf/default/disable_ipv6
0
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0

do I need a module?

I also tried with ifconfig and the result was the same

  • Are you absolutely sure the prefix is 48? It is usually 64 – Michael Hampton Jun 11 '15 at 21:31
  • ah. I pasted a ip from google just to be sure that the ip is valid. but checked the same ip from the example. letme edit that – Freaktor Jun 11 '15 at 21:33
  • 1
    Do you actually have an interface named eth0? – Michael Hampton Jun 11 '15 at 21:42
  • The command works on Ubuntu as well. I don't see anything wrong with it. I don't know any specific misconfigurations which would lead to that error message. Does the interface have any other IPv6 addresses assigned to it? Is there a link-local address? – kasperd Jun 11 '15 at 21:44
  • @MichaelHampton I looked which error messages Ubuntu produces if the interface doesn't exist or has a too low MTU to run IPv6. Neither produced the same error message as the one in this question. – kasperd Jun 11 '15 at 21:47
0

sorry to respond to myself in such short time but this may help someone

ip -6 addr show
[root@ localhost main]# 

no ipv6 on my system

ip addr add dev eth0 fe80::20c:29ff:fee3:d166/64
RTNETLINK answers: Invalid argument

cannot assign ipv6, but if I do this

[root@localhost main]# ip -6 addr add dev lo 2001:0db8:0:f101::10/64

[root@buildhv main]# ip -6 addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
    inet6 2001:db8:0:f101::10/64 scope global
       valid_lft forever preferred_lft forever

lo got the ipv6,

and now

[root@localhost main]# ip -6 addr add dev eth0 2001:0db8:0:f101::20/64
[root@localhost main]# ip -6 addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436
    inet6 2001:db8:0:f101::10/64 scope global
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 2001:db8:0:f101::20/64 scope global
       valid_lft forever preferred_lft forever

eth0 got the ipv6 If you dont set LO in centos 6.2 you cant assign ipv6. in the fedora box i can have ipv6 w/o lo

  • Why are you trying to put a global IPv6 address on the lo interface?! – Michael Hampton Jun 11 '15 at 22:30
  • just to demonstrate that it needs a IPv6 (sorry i dont have an ipv6 to test so copy pasted one in my confined machine) – Freaktor Jun 11 '15 at 22:35
  • 2
    Don't mess with things. Leave the localhost address ::1 on the lo interface and save yourself a lot of trouble. – Michael Hampton Jun 11 '15 at 22:49
  • Got it, but my deep, my problem was the lack of any ipv6 on lo, and in my dictionary thats weird or a bug. – Freaktor Jun 12 '15 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.