With TAP, the Linux kernel can simulate Ethernet interfaces that, instead of being attached to networking hardware, communicate with VirtualBox. The TAP interfaces therefore appear like physical network interfaces (e.g. eth0) on the system. To create a TAP devices, use the tunctl utility. For Fedora Core 4 release, have a download session on this link.
Bridging, then, is a feature provided by the Linux kernel and can be controlled with the brctl command from another utility package. This tiny packages released for Fedora Core 4 are available on this link.
The libsysfs is a dependency library needed by the brctl utility. Again, for Fedora Core 4, the download link are available here.
There are two ways these interfaces can be created, define a static link or dynamically. A static link build a persistent TAP interfaces on the Linux host and make them available to VirtualBox. While a dynamically build TAP interfaces each time a VirtualBox starts, and destroyed when it stops. To simplify this, I let you know how to create a static link. For a moments, go provide those 3 packages above available & install it on your Linux system. Then perform the following steps as root:
1. As root, run tunctl to create a new TAP interface:
tunctl -t tap1 -u
2. Create a new bridge, which we will call br0:
brctl addbr br03. Put your network adapter in promiscuous mode so that it will accept Ethernet frames for MAC addresses other than its own:
ifconfig eth0 0.0.0.0 promiscYou will lose network connectivity on eth0 at this point.
4. Add your network adapter to the bridge:
brctl addif br0 eth05. Transfer the network configuration of your ethernet adapter to the bridge (the following example assumes your network adapter is configured with DHCP):
dhclient br0Your physical Ethernet adapter will now merely act as a transport medium for the bridge.
For configurations where the network adapter is configured statically, you need to setup br0 exactly as you would have set up eth0. At this point the host should have network connectivity
6. Add the new TAP device to the bridge as well:
brctl addif br0 tap17. Activate the new TAP device:
ifconfig tap1 upAfter this, you can now specify tap1 in the settings of your virtual machine, as if it were a real network adapter. Note that in order to use a static TAP interface, the VirtualBox process needs to have write access to /dev/net/tun. Either make sure the access bits allow access or add the user of the VirtualBox process to the group owning that device file.
Go get some pinging process to local Linux host or other else hosts & it will working good. By the way, if the existing network are configured with proxy & gateway, you may adding a router mechanism after succeded bridging the VirtualBox. This would done by "route add" command prompt at Windows, just like example below:
C:\WINDOWS\Desktop>route add 10.1.1.0 mask 255.255.255.0 10.1.7.225
Network Address Netmask Gateway Address Interface Metric
10.1.1.0 255.255.255.0 10.1.7.225 10.1.7.225 1
10.1.7.0 255.255.255.0 10.1.7.225 10.1.7.225 1
10.1.7.225 255.255.255.255 127.0.0.1 127.0.0.1 1
10.255.255.255 255.255.255.255 10.1.7.225 10.1.7.225 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
220.127.116.11 18.104.22.168 10.1.7.225 10.1.7.225 1
The settings above are helping me to connect to the LAN & internet connectivity from the proxy or gateway. So on, there will be no problem with the Windows based native application required networking link but totally failed to run over the Windows emulator. Just like the problem I described earlier…
So, case is closed!
Labels: My Works
PS: If you've benefit from this blog,
you can support it by making a small contribution.