Difference between revisions of "VirtualBox dengan Bridged Host Interface Permanen"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 38: | Line 38: | ||
bridge_ports all tap0 tap1 tap2 | bridge_ports all tap0 tap1 tap2 | ||
− | Tambahkan Interface | + | Kalau ingin agar br0 menggunakan setting statik maka gunakan perintah |
+ | |||
+ | iface br0 inet static | ||
+ | address xxx.xxx.xxx.xxx | ||
+ | netmask 255.255.255.0 | ||
+ | broadcast xxx.xxx.xxx.255 | ||
+ | gateway xxx.xxx.xxx.xxx | ||
+ | |||
+ | |||
+ | |||
+ | Tambahkan Interface melalui shell | ||
# /sbin/ifup tap0 | # /sbin/ifup tap0 |
Revision as of 15:12, 2 May 2008
Install Aplikasi Pendukung
# apt-get install uml-utilities bridge-utils
Tambahkan Username Anda
# adduser <yourusername> uml-net
Tambahkan ke file /etc/network/interfaces
# vi /etc/network/interfaces
Misalnya kita ingin membuat interface virtual yang di bridged ke LAN dengan nama tap0, tap1 & tap2. Isi informasi berikut,
auto tap0 iface tap0 inet manual up ifconfig $IFACE 0.0.0.0 up down ifconfig $IFACE down tunctl_user <yourusername>
auto tap1 iface tap1 inet manual up ifconfig $IFACE 0.0.0.0 up down ifconfig $IFACE down tunctl_user <yourusername>
auto tap2 iface tap2 inet manual up ifconfig $IFACE 0.0.0.0 up down ifconfig $IFACE down tunctl_user <yourusername>
auto br0 iface br0 inet dhcp bridge_ports all tap0 tap1 tap2
Kalau ingin agar br0 menggunakan setting statik maka gunakan perintah
iface br0 inet static address xxx.xxx.xxx.xxx netmask 255.255.255.0 broadcast xxx.xxx.xxx.255 gateway xxx.xxx.xxx.xxx
Tambahkan Interface melalui shell
# /sbin/ifup tap0 # /sbin/ifup tap1 # /sbin/ifup tap2 # /sbin/ifup br0
Reboot PC anda
# shutdown -r now
Edit /etc/udev/rules.d/20-names.rules
# vi /etc/udev/rules.d/20-names.rules
Ubah
KERNEL=="tun", NAME="net/%k"
Menjadi
KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660"
Beritahu VirtualBox Host Interface tap0 Yang digunakan
Selesai Sudah ..
Mesin Ubuntu yang kita gunakan akan mempunyai beberapa interface,
- tap0 - virtual milik mesin di virtualbox
- tap1 - virtual milik mesin di virtualbox
- tap2 - virtual milik mesin di virtualbox
- br0 - bridge yang akan bicara ke interface yang benar
- eth0 - interface awal di mesin host.