Sun VM supports 4 kinda Network Adapter
- Not Attached (behaves as network cable is un-pulgged).
- NAT (Good if you want to sruf web and download coontents, not much communication with host OS).
- Host Interface (Provides almost real network adapter kinda support).
- Internal Network (Some kinda secure and fast stuff as per document).
We will use Host Interface to achieve our network structure.
Software requirement:
- Bridge Utility
apt-get install bridge-util
- Uml Utility
apt-get install uml-utilities
Next provide the access right to the tap0 device
sudo chmod 0660 /dev/net/tun
sudo chgrp vboxusers /dev/net/tun
Next create the tap0 device
sudo tunctl -t tap0 -u
Now create scripts files to control Starting/Stopping the tap0 interface
StartTap0.sh
#!/bin/sh
gksu brctl addbr br0
gksu ifconfig eth0 0.0.0.0
gksu brctl addif br0 eth0
gksu ifconfig $2 0.0.0.0
gksu brctl addif br0 $2
gksu dhclient br0
StopTap0.sh
#!/bin/sh
gksu brctl delif br0 $2
gksu ifconfig eth0 down
gksu ifconfig $2 down
gksu ifconfig br0 down
gksu brctl delif br0 eth0
gksu brctl delif br0 $2
gksu brctl delbr br0
gksu ifconfig eth0 up
After the scripts are ready open xVM and navigate to network adapter tab, Set the following config.
|
All set just boot up the guest OS, fill in the password and enjoy full fledge network. At Guest OS Network adapter will only take static IP, remember to set it to something under the same subnet mask. Thus enjoy complete Network (lets play). :D
No comments:
Post a Comment