2

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 ?

2
  • What command are you using to "up eth0"? Is it ifup or ifconfig eth0 up? Apr 18, 2012 at 12:15
  • ifconfig eth0 up Apr 18, 2012 at 12:21

2 Answers 2

4

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.)

0

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

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

Should be fine.

2
  • without the subnet mask I get connect: Invalid argument Apr 18, 2012 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. Apr 18, 2012 at 13:01

You must log in to answer this question.

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