6

In Windows 7, my computer can automatically get a IPV6 global address and use IPV6 network, but in Ubuntu Natty, I can't find out how to let stateless configuration work. My network is a university campus network,so I don't need tunnels. I think if one thing can silently and successfully be accomplished in Windows, it shouldn't be impossible in linux.

I tried manually editing /etc/network/interfaces and used a static IPV6 address, and I can use IPV6 this way, but I just want to use auto-configuration.

I found this post: https://superuser.com/questions/33196/how-to-disable-autoconfiguration-on-ipv6-in-linux

and tried

sudo sysctl -w net.ipv6.conf.all.autoconf=1
sudo sysctl -w net.ipv6.conf.all.accept_ra=1

but without any luck.

I got this in dmesg:

root@natty-150:~# dmesg |grep IPv6
[   26.239607] eth0: no IPv6 routers present
[  657.365194] eth0: no IPv6 routers present
[  719.101383] eth0: no IPv6 routers present
[32864.604234] eth0: no IPv6 routers present
[33267.619767] eth0: no IPv6 routers present
[33341.507307] eth0: no IPv6 routers present

I am not sure whether it matters,but then I setup a static IPv6 address (with gateway) and restart network,I ping6 ipv6.google.com and the ipv6 network is fine.This time a entry was added in dmesg

[33971.214920] eth0: no IPv6 routers present

So I guess the complain of no IPv6 router does not matter?

Here is the ipv6 forwarding setting.But I guessed forwarding is used for radvd stuff?

root@natty-150:/# cat /proc/sys/net/ipv6/conf/eth0/forwarding
0

After ajmitch mentioned forwarding setting, I added this to sysctl.conf file:

net.ipv6.conf.all.autoconf = 1 
net.ipv6.conf.all.accept_ra = 1 
net.ipv6.conf.default.forwarding = 1 
net.ipv6.conf.lo.forwarding = 1 
net.ipv6.conf.eth0.forwarding = 1

and then ran sysctl -p /etc/init.d/networking restart But this still doesn't work.

2
  • Can you please run 'cat /proc/sys/net/ipv6/conf/eth0/forwarding' & edit the question to add in the output?
    – ajmitch
    Mar 22, 2012 at 2:30
  • Sure~ I have added it.
    – Allan Ruin
    Mar 22, 2012 at 3:55

2 Answers 2

9

Disable forwarding should fix your problem.

Hint: only routers needs forwarding.

Another hint: enable forwarding = disabling stateless autoconfig

1
  • 1
    well,before I set forwarding to true, it's 0,and still can't get auto-configured
    – Allan Ruin
    Mar 25, 2012 at 14:41
0

One option is upgrading to Oneiric (Ubuntu 11.10), and using its IPv6 auto method in /etc/network/interfaces

iface eth0 inet6 auto

You'll also need an auto eth0 clause, so the minimum viable IPv6 config would look like this:

auto eth0
iface eth0 inet6 auto
6
  • Thank you. But using iface eth0 inet6 auto make system failed to bring up eth0. and I have a look at manual,it said " but there is also some support for IPX networking ("ipx"), and IPv6 networking ("inet6"). Following that is the name of the method used to configure the inter‐ face." I guessed auto is not a "method" like dhcp or static? The manual list these methods for "INET6":loopback,static,manual,v4tunnel
    – Allan Ruin
    Mar 22, 2012 at 4:14
  • My mistake, I thought this was available in Natty, but it appears to be an Oneiric feature: manpages.ubuntu.com/manpages/oneiric/man5/interfaces.5.html
    – cqcallaw
    Mar 22, 2012 at 4:26
  • Never mind it. But can I use stateless configuration to configure IPV6 setting in Natty? Or the stateless configuration is only available after Oneiric? Someone said to me that his box running ubuntu is fine and automatically got a IPv6 global address, but in my own experience, I have never succeed at getting IPv6 address automatically. (begin with 9.04 to 11.04)
    – Allan Ruin
    Mar 22, 2012 at 4:31
  • I'd guess this method doesn't work in Natty, given its absence from the manpage, and your experience. You might try removing your sysctl.conf edits though, see if they're interfering somehow.
    – cqcallaw
    Mar 22, 2012 at 4:33
  • Thinking about this more, I seem to recall the interfaces stanza being unnecessary if I didn't need IPv6 connectivity before the display manager came up. Have you looked at the IPv6 settings for your device in Network Manager? help.ubuntu.com/community/NetworkManager0.7
    – cqcallaw
    Mar 22, 2012 at 4:46

You must log in to answer this question.

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