Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 11 down vote accepted

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.

share|improve this answer
    
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?

share|improve this answer
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

try to type modprobe ipv6 , and then restart your netowrk configuration with:

sudo /etc/init.d/networking restart
share|improve this answer
1  
As you can see from the output of ifconfig, ipv6 is already loaded. –  MikeyB Nov 22 '11 at 16:07
    
my mistake, but at least he knows how to restart the networking service and don't need to reboot the system at every change. –  Hanan N. Nov 22 '11 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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