How to enable Ipv6 on my ubunutu 11.04 virtual machine

liv2hak asked:

I have installed 3 VM’s on my PC.(Ubuntu 11.04).I want to setup an IPV6 network to review and test some of the IPV6 tools like NDPMonitor.(monitors ICMP messages of Neighbour Discovery Protocol.)

IP v6 addresses are as follows.

linux_router – fe80::a00:27ff:fed5:f7e9/64
labhack1 – fe80::a00:27ff:fed2:8bd1/64
labhack2 – fe80::a00:27ff:fed7:2f2d/64

The below commands have been run on both linux_router and labhack1.

sudo ip r a 2001:468:181:f100::/64 dev eth0

sudo vim /etc/radvd.conf /file looks like below./

interface eth0
{
   AdvSendAdvert on; /*means that we are sending out advertisments.*/

   MinRtrAdvInterval 5; /*these options control how often advertisments are sent*/
   MaxRtrAdvInterval 15; /*these are not mandatory but valueable settings.*/

   prefix fe80::a00:27ff::/64
   {
        AdvOnLink on;   /*Says to the host everyone sharing this prefix is on the sam local                       link as you.*/

        AdvAutonomous on;  /*Says to a host: "Use this prefix to autoconfigure your address"*/
   };
};

sudo sysctl -w net.ipv6.conf.all.forwarding=1

I try to do a

ping6 -I eth0 fe80::a00:27ff:fed5:f7e9

I get Destination unreachable: Address unreachable.I am not sure what I am doing wrong here.I am a beginner at linux administration.Basically I think I am missing whatever is analogous to physically connecting VM’s.Any help that would point me in the right direction would be greatly appreciated.

My answer:


The prefix you’ve specified in radvd.conf is invalid in several ways.

  • First, you’ve placed two ::s in it, which is not allowed. This shortcut may only appear once in any given address.
  • Second, you seemed to be attempting to specify a /96 range rather than a /64, which is a very bad idea (you must use /64 for router advertisements to work, no exceptions).
  • Finally, you seem to be attempting to advertise link-local addresses, which is also not going to work since these are automatically generated by each host based on each interface.

To resolve the issue, advertise a valid global prefix. If you haven’t received one from your ISP, use a random prefix in the Unique Local Address range.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.