Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having a problem setting up IPv6 Address on ubuntu 10.04.I have disabled my network-manager. My /etc/network/interface file looks like this:

iface eth0 inet6 static
pre-up modeprobe ipv6
address fe80::1
netmask 10
gateway fe80::2

I have setup my ip address as fe80::1 but when I up eth0 ifconfig shows

inet6 addr:  fe80::a00:27ff:fe1e:5edf/64 Scope:Link

Why does it show a different IP address?

When I run

ping6 fe80::a00:27ff:fe1e:5edf/64

It tell me unknown host. Why ?

share|improve this question
    
What command are you using to "up eth0"? Is it ifup or ifconfig eth0 up? –  grawity Apr 18 '12 at 12:15
    
ifconfig eth0 up –  Akshit Khurana Apr 18 '12 at 12:21

2 Answers 2

up vote 3 down vote accepted

You mentioned in a comment that you use ifconfig to bring the interface up. In this case, your problem is that ifconfig does not use the interfaces file (it only tells the interface to start receiving packets). This configuration file is specific to Debian/Ubuntu and is only read by the ifupdown tools ifup and ifdown. So you would have to use:

ifup eth0

Even then, your configuration will be rejected because the configuration file syntax uses "iface", not "interface", to denote a new logical interface. (See the interfaces(5) manual for full syntax description.)

(Your pre-up line is also 1) unnecessary: it's done automatically, and 2) mistyped: it's "modprobe".)


The fe80::a00:27ff:fe1e:5edf address is shown not because of any configuration, but because IPv6 requires it. Every interface is required to have a link-local address based on the "interface ID" (its MAC address); these addresses are added automatically by the Linux kernel.

(Remember that an interface can have many addresses. You can have both fe80::1 and fe80::a00:27ff:fe1e:5edf on the same interface, and it will still work.)

Also remember that the fe80::/10 addresses are link-local – in other words, they are never routed, and the gateway configuration setting is meaningless.

This means that whenever you try to access a link-local address, you must manually specify the interface to use – this is done by adding a zone index to the address. (On Linux, the zone index is the same as interface name.) For example, to connect over eth0, you have to add %eth0:

ping6 fe80::a00:27ff:fe1e:5edf%eth0

(Oliver Salzburg's answer is also correct – you must not specify a subnet mask when referring to a single host.)

share|improve this answer

I don't think you have to supply a subnet mask for ping.

ping6 fe80::a00:27ff:fe1e:5edf

Should be fine.

share|improve this answer
    
without the subnet mask I get connect: Invalid argument –  Akshit Khurana Apr 18 '12 at 11:01
    
thanks, you were right about the subnet mask, although I did need to specify interface address using -I option or as mentioned in grawity's answer. –  Akshit Khurana Apr 18 '12 at 13:01

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.