WiMax, Ubuntu Network Manager and vboxnet0

Discussions related to using VirtualBox on Linux hosts.
Post Reply
pyrocloud
Posts: 4
Joined: 13. Jun 2010, 10:34
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7

WiMax, Ubuntu Network Manager and vboxnet0

Post by pyrocloud »

I have switched to using Ubuntu as my primary OS and run Windows for the few applications that require it. Mainly for use with my Clear Wireless WiMax USB dongle, Motorola made with a Beceem chipset.

Because of the current lack of drivers for the WiMax dongle, I'm using a WIndows XP virtual to feed Internet back through the Host Only adapter - (vboxnet0) .

I accomplished this by
1. Giving the XP virtual one network adapter in VBox, setting it to Host Only mode (vboxnet0)
2. Setting the USB dongle to be controlled by the XP virtual, installing the Clear software on the XP virtual.
3. In the XP virtual, sharing the WiMax network interface with the Host Only adapter using ICS.

4. On the Ubuntu host, adding these lines to /etc/rc.local to set the IP address and DNS servers of the vboxnet0 adapter.

Code: Select all

ifconfig vboxnet0 192.168.0.3 netmask 255.255.255.0
route add default gw 192.168.0.1
cp /home/adam/resolv.conf /etc/resolv.conf

where resolve.conf holds the addresses for the DNS servers.

5. Setting the XP virtual to run in headless mode at startup.

This seems to work, but is certainly not the preferred way of doing things, but without an alternative I'm stuck using this. Other than a few small issues, Network Manager not seeing the vboxnet0 interface, ifconfig incorrectly reporting vboxnet0's state, Firefox starting in offline mode, and the large overhead of running a XP virtual for connecting to the Internet, it isn't that bad.

However here is my hangup, I would like to set up Internet connection sharing to either a wireless ad-hoc network or through the Ethernet port.

How would I go about doing this with my current setup?

I have looked for some time before asking here. Reading as much as I couldn't about trying to get Network Manager to recognize vboxnet0 as my primary interface. I have learned quite a bit about how Linux, or Debian, controls the network interfaces, but the info I need remains out of grasp. Here is what I have looked at so far.

Removing my custom script from rc.local and manually adding vboxnet0 to /etc/network/interfaces doesn't seem to do anything.
Found a link_state file in /sys/devices/virtual/net/vboxnet0 that looks like it may hold the state info I'm looking for but I can't seem to change it.
Adding the info into Network Manager for vboxnet0 does nothing.

ifconfig is reporting that vboxnet0 has an IP and is reporting TX packets, but not RX packets.

Not sure what other information I can provide that may be useful. If there is other info needed to help out please let me know. This is something I would like to solve, although its not pressing. I'm just curious about how it all works and I know the info provided could help me to get a better overall picture of how network interfaces interact with each other on Linux.

Thank you for taking the time to read this, any help or suggestions are highly appreciated.

Cheers,
pyrocloud
Posts: 4
Joined: 13. Jun 2010, 10:34
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7

Re: WiMax, Ubuntu Network Manager and vboxnet0

Post by pyrocloud »

Solved

I did not see a thread that was discussing this same topic. My apologies. Thread is here http://forums.virtualbox.org/viewtopic.php?f=7&t=23823

To post the solution to my issue. ndedonald came up with the idea of using a ad-hoc connection and bridging the wlan0 interface to the virtual network interface in VBox.

Thank you sir.

To do this properly you must set the IP, netmask and DNS servers as I had been doing, but change the addresses of the DNS servers to the default GW address. In my case I kept 192.168.0.3, but changed the interface to wlan0 instead of vboxnet0 in my script. I also changed the DNS servers in /etc/resolv.conf to "nameserver 192.168.0.1"

So to be clear, I created a script inside /etc/rc.local with

Code: Select all

ifconfig wlan0 192.168.0.3 netmask 255.255.255.0
route add default gw 192.168.0.1
cp /home/adam/resolv.conf /etc/resolv.conf
inside the resolv.conf file is one line

Code: Select all

nameserver 192.168.0.1
This should enable the addresses needed to pass info back and forth. Then create a ad-hoc connection and everything should work. That is if you already have your guest OS setup with Internet connection sharing.

Anyone wishing to discuss this with me please shoot me a line and I will help with what I can. Posting a thank you in the other thread now.

Mods please feel free to delete this if you see fit. Again my apologies. :oops:
Post Reply