Questions relating to bridging between linux host and window

Discussions related to using VirtualBox on Linux hosts.
Post Reply
acecliffy
Posts: 5
Joined: 23. Nov 2007, 20:35

Questions relating to bridging between linux host and window

Post by acecliffy »

I am running VirtualBox v. 1.5.0_OSE
Host OS: OpenSuse 10.3
Guest OS: Windows 2000
Installation worked fine. I am using most default settings.

Questions
I guess my main question is conceptual and relates to bridging:

Question 1: Once I bridge my ethernet device (eth1) to use it with my VM, will I be able then to still connect with my host openSuse OS to the internet through it?

Question 2: Is there another way to get the networking to work, like setting up a proxy or [the thing I don't even know to ask about] that can make the guest Win2k VM use the network? Because I am also mobile, so I have to change my network configuration when I go to work, in order to connect. So, my host IP address is always changing (I use static at home and DHCP at work).

Question 3: I am using a wireless network card on a Tecra M4 tablet notebook, which has a hard-wire connection on-board. Is this the likely cause of my problems?
Some of the reading suggested that this might cause problems. Here is my info from "Network Connections" under YaST...
  • Intel PRO/Wireless 2915ABG Network Connection
    MAC : 00:xx:xx:xx:xx:8e
    • Device Name: wlan-eth1
    • Started automatically on cable connection
    • IP address: 192.168.1.18, subnet mask 255.255.255.0

    Toshiba America Info Marvell 88E8053 Gigabit Ethernet Controller (Toshiba) (not connected)
    MAC : 00:xx:xx:xx:xx:98
    • Device Name: eth-eth0
    • Started automatically on cable connection
    • IP address assigned using DHCP

//
// BEGIN lengthy explanatory section
//


Scenario
Trying to get networking to work for the host Win2k to wean off of Windows altogether. I live in a real world, and I still have to run Windows apps to get along. My wife wants to run Family Tree Maker, but it cannot connect because, as everyone knows, the default network setup for VirtualBox acts like a firewall for most ports in the VM.

This is how I proceeded...
  • Step 1: Searched the forum online regarding networking; discovered bridging concept; Post said to RTFM
    Step 2: I RTFM (browsed VirtualBox manual, read relevant sections, especially section 6.5.1.2)
    Step 3: Realize that I don't know what I am doing and that I don't understand some basic Ethernet concepts
    Step 4: Search for more information, reading topics from this forum -- 1636, 2151, 2768, 2884
    Step 5: Search Google, find http://www.violtan.com/ae/virtualbox.html and this seems more doable, so I try it
Attempting to set up bridging
This is what I did (after fetching the appropriate packages)

Code: Select all

# tunctl -t tap0 -u <acecliffy>
Set 'tap0' persistent and owned by uid 1000
# ifconfig tap0 0.0.0.0 up
# brctl addbr br0
# brctl addif br0 eth0 tap0
# brctl addif br0 eth1 tap0
# dhcpcd br0
# ifconfig br0 up
# ifconfig eth1 0.0.0.0
# ping 192.168.1.1
connect: Network is unreachable
From this point, I had no connectivity on my local machine, although the network card seemed to be working. The guest Win2k had no connectivity either when I set the VM to use tap0. So, I "undid" what I did using these commands:

Code: Select all

# brctl delbr br0
bridge br0 is still up; can't delete it
# ifconfig br0 down
# brctl delbr br0
# cd /etc/rc.d
# ./network restart
Shutting down the NetworkManager                                      done
Shutting down the DHCP DBUS Daemon                                    done
Shutting down the NetworkManagerDispatcher                            done
Starting the DHCP DBUS Daemon                                         done
Starting the NetworkManagerDispatcher                                 done
Starting the NetworkManager                                           done
# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.29 ms
Now I have my network connectivity back the way it was before. I obviously am not doing something right, or I would have had connectivity at leat on the guest Win2k VM. However, I am worried that I will make my network setup FUBAR then not even be able to get to this forum to fix it.

Any help would be appreciated! :)
Ingo
Volunteer
Posts: 731
Joined: 22. Aug 2007, 10:13
Location: Germany

Post by Ingo »

Hi acecliffy,
some answers to your questions:
Question 1: Once I bridge my ethernet device (eth1) to use it with my VM, will I be able then to still connect with my host openSuse OS to the internet through it?
No, you cannot use an interface added to the bridge. It's completely occupied by the bridge and will also loose any IP address. Instead use the bridge interface (br0) itself. It gets all the functionality of the physical interface (static IP or DHCP etc.).
Question 2: Is there another way to get the networking to work, like setting up a proxy or [the thing I don't even know to ask about]...
Yes, look here:
http://forums.virtualbox.org/viewtopic.php?t=2217
Question 3: I am using a wireless network card on a Tecra M4 tablet notebook, which has a hard-wire connection on-board. Is this the likely cause of my problems?
Yes, yes, yes, very likely!
This is from the user manual chapter 6.3 Introduction to Host Interface Networking (HIF)
You will need wired (Ethernet) network hardware on the host for this as
most current wireless network devices do not support bridging.
So setup a bridge without a wireless interface or use a setup without a bridge (see above).
Step 3: Realize that I don't know what I am doing and that I don't understand some basic Ethernet concepts
That's bad for the setup of a sophisticated environment like yours, but with your commitment and some help I hope we will get it run.
To proceed further with bridging a wireless interface is waste of time I think.
Post Reply