1

I have Ubuntu 12.04 installed in a VirtualBox VM on a Windows 8 host computer. Windows 8 had a hosted (wireless) network to which I can connect with my Android phone. The eth0 interface of my VM is connected to the Windows network using a bridged adapter.

Additionally, a wireless 6LoWPAN (low power wireless personal area network over IPv6 using 802.15.4) is connected to the usb0 interface of my VM using a dongle. In this network are several Zigduino nodes. Now, I need to ping from my phone to these sensor nodes.

phone ---802.11--- eth0 Ubuntu usb0 ---802.15.4--- sensor node

The problem is now that I already spent hours on this, but I am still unable to do this. I have given eth0 a static IPv6 address aaaa::xxxx:xxxx:xxxx:xxxx and do router advertisements from this interface with prefix aaaa::/64 using radvd (so my phone also gets an aaaa::xxxx:xxxx:xxxx:xxxx address). The IP address of my dongle and the sensor nodes is also something like aaaa::xxxx:xxxx:xxxx:xxxx. While pinging, I monitored traffic using wireshark. I noticed that eth0 gets router sollicitations from my phone, but these do not reach usb0. It looks like they are not forwarded to the usb0 interface so my VM does not know what to do with these messages and the ping fails.

IPv6 forwarding and all that are already enabled, and I understand that this would suffice from what I read on the internet. Any ideas what I am doing wrong?

Sam
  • 11
  • 2

2 Answers2

3

Two comments: you should use ULA addresses instead of aaaa:, but that doesn't matter for your problem.

The reason that your bridge doesn't work is that 6LoWPAN is not compatible with ethernet so you cannot bridge between them. Bridging only copies frames between interfaces, but 6LoWPAN uses a different frame format with different layer-2 (MAC) addresses than ethernet.

A solution would be to use one /64 subnet for your ethernet network and a separate /64 for your 6LoWPAN network. Then you indeed need to enable IPv6 forwarding so that your box will forward packets between the networks. If your box is the default gateway for both networks then it will forward the packets between them. If it isn't then you need to set up some routing so that the other gateways/routers know where to send packets for those networks.

Sander Steffann
  • 4,654
  • 15
  • 18
  • Thank you for your helpful answer. I have now set up two different subnets (one with prefix 'aaaa::/64' and one with 'bbbb::/64'), IPv6 forwarding is enabled and my box is the default gateway for both networks. Still, I get the same result. Adding routing entries to my box does not work (invalid arguments for my gateway address?). Another thing: could it have something to do with the fact that this Windows 8 hosted network uses IPv4 addresses by default (except from link-local addresses) and I just use radvd to advertise my 'bbbb::' prefix to get an IPv6 address on my phone? –  Oct 30 '14 at 10:36
  • You'll need IPv6 (real addresses, not just link-local) on all devices for this to work. – Sander Steffann Oct 30 '14 at 12:27
  • In fact, that is the case... But they also still have their IPv4 addresses. –  Oct 30 '14 at 15:31
  • Then I don't understand your comment about your 'Windows 8 hosted network' – Sander Steffann Oct 30 '14 at 19:51
  • I mean that this 'windows hosted network' on the eth0 side probably does not support IPv6, because it does not give global IP addresses to my devices automatically. These devices have obtained IPv6 addresses because I advertised the prefix with radvd. Could that be the reason that it does not work? Should I use tunneling instead? Or is there a way to forward from IPv4 network to IPv6 network? – Sam Oct 31 '14 at 15:40
  • I'm sorry, I can't follow you. First you say "does not support IPv6" and "does not give global IP addresses to my devices automatically", followed by "These devices have obtained IPv6 addresses because I advertised the prefix with radvd" which explicitly contradicts the previous statements... – Sander Steffann Oct 31 '14 at 17:35
  • Then it probably does support IPv6. I don't know. The eth0 interface in my VM is assigned a static ipv6 address compliant with what radvd advertises and my phone uses the advertisements to get an IPv6 address. Maybe that doesn't even matter, but I am just giving a bit more information about my setup, because it doesn't work while it should according to your (and many others) explanation. – Sam Oct 31 '14 at 19:06
0

Turns out to be a bug in the Wi-Fi drivers of VirtualBox. Nothing to do about it. I now use an IPv6 router/AP that is connected to my computer via Ethernet.

Sam
  • 11
  • 2