2

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.**.**.**
  netmask 255.255.255.0
  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:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::**:**:**:**/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

what am I doing wrong?

2 Answers 2

12

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.

2
  • 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, 2011 at 16:09
  • Check the man page for interfaces on your system - this was from my debian box ;)
    – MikeyB
    Nov 22, 2011 at 16:15
9

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

2
  • 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, 2011 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! Nov 22, 2011 at 16:06

You must log in to answer this question.

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