I'm trying to add an ipv6 address to an already existing interface, which previouosly only had ipv4. This is my config:

auto lo
iface lo inet loopback

auto eth8
iface eth8 inet static
  address 88.**.**.**
  gateway 88.**.**.**

iface eth8 inet6 static
  pre-up modprope ipv6
  address 2a01:**:**::5
  netmask 120
  gateway 2a01:**:**::7f

but after restarting the interface eth8 still only has a link-local address:

eth8      Link encap:Ethernet  HWaddr 00:15:**:**:**:**
          inet addr:88.**.**.**  Bcast:  Mask:
          inet6 addr: fe80::**:**:**:**/64 Scope:Link

what am I doing wrong?


As Peter mentions, the modprope is spelled incorrectly.

This is causing the scripts to not use the inet6 static section as the pre-up command is failing. You can just get rid of it - no need for it.

pre-up command
       Run command before bringing the interface up.  If  this  command
       fails then ifup aborts, refraining from marking the interface as
       configured, prints an error message, and exits  with  status  0.
       This behavior may change in the future.

Other than that your file is correct. /120 is not the usual netmask but presumably you know what you're doing.

  • Well... there was no error message, so this part of the spec is actually wrong :)And yep, /120 is all I've got from the ISP :( – SztupY Nov 22 '11 at 16:09
  • Check the man page for interfaces on your system - this was from my debian box ;) – MikeyB Nov 22 '11 at 16:15

You misspelled modprobe, it's possible that the module isn't loading properly?

  • 1
    I'd guess this isn't the problem, since the interface has an IPv6 address, just not the one the OP wants. – nickgrim Nov 22 '11 at 16:00
  • My answer was the problem, but my "why" isn't correct. MikeyB's answer is the appropriate answer, since when pre-up fails, the script bails before actually setting the addresses. +1 for MikeyB! – Peter Grace Nov 22 '11 at 16:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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