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

Freaktor
  • 271
  • 2
  • 9
  • 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
  • OK. the problem is that if you remove all you ipv6 address (even in your lo interface) later you cannot assign IPv6 on any interface except lo then you can again assign IPv6 freely... this seriously bugsme... this behavior is only present on my centos 6.2 machine, the fedora20 works as expected – Freaktor Jun 11 '15 at 22:14

1 Answers1

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

Freaktor
  • 271
  • 2
  • 9