# Adding IPv4 AND IPv6 via /etc/conf.d/net error [solved]

## Duncan Mac Leod

Hi!

I am using /etc/conf.d/net to add my IPs. (Kernel gentoo-sources-3.10.37/udev-208)

Works great with IPv4 only.

Now, I have added one IPv6 address, like:

config_eth0="71.238.82.218/32 71.238.12.122/32 71.238.12.123/32 2c01:688:97:1001:6bfa:53da:0:1/128"

and I got an error -> RTNETLINK answers: Operation not supported

If I add the IP manually after booting, like:

ifconfig eth0 inet6 add 2c01:688:97:1001:6bfa:53da:0:1/128

...the IP is added and everything works.

Any ideas?Last edited by Duncan Mac Leod on Sat Apr 26, 2014 4:56 pm; edited 1 time in total

----------

## wswartzendruber

And you're sure it's the IPv6 address specifically?  I have mine broken down into separate lines.

```
  1 modules="iproute2"

  2

  3 # Virtual interface

  4 config_eth0="208.111.39.92/24

  5              2607:f740:0:3f::f23/64"

  6 routes_eth0="default via 208.111.39.1

  7              default via 2607:f740:0:3f::1"

  8

  9 # The network scripts are now part of net-misc/netifrc

 10 # In order to avoid sys-apps/openrc-0.12 from removing this file, this comment was

 11 # added; you can safely remove this comment.  Please see

 12 # /usr/share/doc/netifrc*/README* for more information.
```

----------

## Duncan Mac Leod

Now, my config is broken down into separate lines, too.

Same error! Are any specific kernel options necessary for adding IPs via /etc/conf.d/net ?

----------

## NeddySeagoon

Duncan Mac Leod,

```
modules="iproute2" 
```

May make a difference.  You will need to 

```
emerge iproute2 
```

to test

----------

## Duncan Mac Leod

There was no line in /etc/conf.d/net with modules="" (all were commented out, so it should use iproute2 per default)

Now I have one line with modules="iproute2" - same error as before...

I guess iproute2 need some specific kernel options...

----------

## NeddySeagoon

Duncan Mac Leod,

You only need IPv6 support as far as I know.

Is your IPv6 built in or as a module?

If its a module, are you sure its loaded before the IPv6 address is allocated?

A few years ago I had problems related to building IPv6 as a module.

Booting just hung.

----------

## Duncan Mac Leod

modules_3="ipv6" in /etc/conf.d/modules did the trick  :Cool: 

----------

