Virtual Box Manager-Networking Modes With LAB Practical

There are basically 4 types of network configuration available in Oracle Virtual Box Manager Tool.

1:Bridge Network Mode : In Bridge Networking Mode , physical NIC port of host machine acts like a bridge for our guest machine. So our guest machines can communicate with the internet directly. Guest machines can also communicate with host machine directly as  they both are on same network. 

2:NAT Network Mode : In this configuration VB manager uses NAT (Network Address Translation) technic. So our guest machines will get a private range of IP addresses. which are different from out host machines IP address. Thats why guest machine can not communicate with host machine but can access the internet. In NAT you can use port forwarding to get communicate with host or any other machine.

3:Host Only Network Mode : In Host Only Networking , Guest machines only connected with host machine. and can not access internet.
  
4:Internal Network Mode: Internal Networking is a advance mode of networking in VB manager, Where you create your own network within the virtual box like a company's network.

Networking in Different Mode :
Where '+' = enable , '-' = disable
networking in different modes







internal networking mode example


















LAB Practical


> Bridge Network Mode:

1-Open Virtual Box Manager








2-Select your virtual machine(guest os)
3-Open Setting
4-Select network










5-Enable network adapter(if disabled) (step 5)
6-Select 'bridge network' in drop down menu











-Restart the network service of virtual machine

Thats all you have to done for bridge networking.

>HostOnly Network Mode:

First we have to create a virtual adapter for host-only networking
1-Open virtual box manager
2-Select the tools option > network













3-Create a virtual host only network adapter
4-Select property option of network adapter
5-Select "configure adapter automatically" option
6-Enable"dhcp server" option










7-Now repeat the first 5 steps as mentioned in bridge networking
8-Now select "host only adapter" in drop down menu
9-restart network service of virtual machine

>NAT Network Mode:

There are two types of NAT services available in oracle virtual box manager.
(I) NAT (II) NAT Network
The only difference between 'NAT' & 'NAT Network' is that the NAT creates the separate private network for each virtual machine , but 'NAT Network' create a single private network for every virtual machine.so in that case you are not able to ping one virtual machine to another virtual machine in 'NAT' & only able to ping in 'NAT Network'.

To configure the NAT :

1- just repeat the first 5 steps of bridge network mode 
2- And Instead of bridge , select NAT or NAT network in drop down menu











Generally we can not ping or access virtual machine from host machine but in case required we can use port forwarding rules to enable it. For this follow the below steps:

1- open the advance option in network selection window for NAT mode.
Or
- go to 'File' > 'Preferences' > select 'Network' > create port for 'NAT Network'(skip if created) > select 'properties' > select 'port forwarding' > create a rule for port forwarding  For NAT Network 
For NAT Mode











For NAT Network Mode















Port Forwarding Rule For SSH Should Like In Above Pic.

-Now To access guest machine from host machine run below command
ssh -p2222 username@127.0.0.1
Where 'username' is the name of user account of guest machine


Post a Comment

0 Comments