Module 15 – BONUS: Network Cards in VirtualBox and VMware
+==============================================================================+
| MODULE 15 (BONUS): NETWORK CARDS – VIRTUALBOX vs VMWARE |
| Estimated Duration: 30-45 minutes | Level: Beginner to Intermediate |
+==============================================================================+
Table of Contents
- Why multiple network cards?
- Network card types in VirtualBox (Oracle)
- Network card types in VMware
- Comparison table: VirtualBox vs VMware
- Practical examples from labs
- How to configure cards in VirtualBox
- How to configure cards in VMware
- Visual summary
- FAQ – Frequently Asked Questions
Why multiple network cards?
In a virtualization lab, a single network card is not always enough. We often need to separate uses:
| Need | Example | Card type |
|---|---|---|
| Internet access (download packages, updates) | apt update, dnf install | NAT |
| Communication between VMs (isolated private network) | Server ↔ Client on 10.11.12.0/24 | Internal Network / Custom VMnet |
| Access from the host machine (SSH from your PC) | SSH to the VM from the host terminal | Host-Only |
Imagine your VM as an apartment:
- NAT = the front door to the Internet (you go out, but no one can enter directly)
- Internal Network = an internal hallway between apartments (VMs talk to each other, but no one from outside sees this hallway)
- Host-Only = an intercom with the concierge (your host PC can talk to the VM, but not the Internet)
- Bridged = you are directly on the sidewalk (your VM is visible like a real PC on the physical network)
Network card types in VirtualBox (Oracle)
VirtualBox offers 5 main modes of network connection. Here is each explained simply:
1) NAT (Network Address Translation)
┌─────────────┐ ┌──────────────────┐ ┌──────────┐
│ VM │ ──NAT──▶│ Host machine │ ───────▶│ Internet │
│ 10.0.2.15 │ │ (does the translation)│ │ │
└─────────────┘ └──────────────────┘ └──────────┘
| Feature | Detail |
|---|---|
| Internet access from the VM | ✅ Yes |
| Access to the VM from the host | ❌ No (except port forwarding) |
| Communication between VMs | ❌ No (each VM has its own isolated NAT) |
| Assigned IP | 10.0.2.15 (automatic, by VirtualBox's internal DHCP) |
| Use case | Download packages, browse the Internet |
NAT is like a translator. Your VM uses your host PC's IP address to go on the Internet. From the outside, only your PC is visible, not the VM.
2) NAT Network
┌──────────┐ ┌──────────┐
│ VM 1 │ │ VM 2 │
│ 10.0.2.4 │ │ 10.0.2.5 │
└────┬─────┘ └────┬─────┘
│ │
└───────┬────────┘
│
┌────────▼────────┐ ┌──────────┐
│ NAT Network │ ───────▶│ Internet │
│ (shared NAT) │ │ │
└─────────────────┘ └──────────┘
| Feature | Detail |
|---|---|
| Internet access from the VM | ✅ Yes |
| Access to the VM from the host | ❌ No (except port forwarding) |
| Communication between VMs | ✅ Yes (if same NAT network) |
| Assigned IP | Internal DHCP (e.g., 10.0.2.4, 10.0.2.5) |
| Use case | VMs that need to communicate with each other AND access the Internet |
- NAT: each VM is isolated in its own NAT "bubble" → VMs do not see each other
- NAT Network: all VMs share the same NAT network → VMs can communicate with each other
3) Bridged Adapter
┌──────────┐ ┌──────────┐ ┌──────────────┐
│ VM │ │ PC │ │ Other PCs │
│192.168.1.│ │192.168.1.│ │ on the │
│ 50 │ │ 10 │ │ physical net │
└────┬─────┘ └────┬─────┘ └──────┬───────┘
│ │ │
└───────────┬────┴───────────────────┘
│
┌────────▼────────┐
│ Switch/Router │
│ real network │
└─────────────────┘
| Feature | Detail |
|---|---|
| Internet access from the VM | ✅ Yes |
| Access to the VM from the host | ✅ Yes |
| Communication between VMs | ✅ Yes |
| Visible on the physical network | ✅ Yes (the VM gets an IP from the real router) |
| Assigned IP | By the physical network's DHCP (e.g., 192.168.1.50) |
| Use case | Server accessible from the entire local network |
In Bridged mode, your VM is visible to everyone on the physical network. Do not use on a public network (café Wi-Fi, school) without precautions.
4) Internal Network
┌──────────┐ ┌──────────┐
│ VM 1 │ │ VM 2 │
│10.11.12.1│ │10.11.12.2│
└────┬─────┘ └────┬─────┘
│ │
└───────┬────────┘
│
┌────────▼────────┐
│ Internal Network│ ❌ No Internet access
│ "intnet" │ ❌ No host access
└─────────────────┘
| Feature | Detail |
|---|---|
| Internet access from the VM | ❌ No |
| Access to the VM from the host | ❌ No |
| Communication between VMs | ✅ Yes (if same internal network name) |
| Assigned IP | Manual (no automatic DHCP) |
| Use case | Isolated labs, private networks between VMs, topology simulation |
When you configure an Internal Network in VirtualBox, you give it a name (e.g., intnet, lan, clientnet). Only VMs with the same internal network name can communicate with each other.
5) Host-Only Adapter
┌──────────┐ ┌──────────────┐
│ VM │ │ Host │
│192.168.56│ │ machine │
│ .101 │ │192.168.56.1 │
└────┬─────┘ └──────┬───────┘
│ │
└────────┬─────────┘
│
┌─────────▼─────────┐
│ Host-Only Network│ ❌ No Internet access
│ vboxnet0 │
└───────────────────┘
| Feature | Detail |
|---|---|
| Internet access from the VM | ❌ No |
| Access to the VM from the host | ✅ Yes |
| Communication between VMs | ✅ Yes (if same host-only network) |
| Assigned IP | VirtualBox DHCP or manual (default range 192.168.56.0/24) |
| Use case | SSH from the host to the VM, access a web server on the VM from the host |
Do you want to be able to ssh user@192.168.56.101 from your Windows/Mac/Linux host terminal? → Host-Only is made for that!
VirtualBox Summary: 5 modes in a table
| Mode | Internet | Host → VM | VM ↔ VM | Physical network | IP |
|---|---|---|---|---|---|
| NAT | ✅ | ❌ | ❌ | ❌ | 10.0.2.15 (auto) |
| NAT Network | ✅ | ❌ | ✅ | ❌ | Internal DHCP |
| Bridged | ✅ | ✅ | ✅ | ✅ | Real network IP |
| Internal Network | ❌ | ❌ | ✅ | ❌ | Manual |
| Host-Only | ❌ | ✅ | ✅ | ❌ | 192.168.56.x |
Network card types in VMware
VMware (Workstation / Player / Fusion) uses virtual networks called VMnet. Here are the main ones:
1) NAT (VMnet8)
┌──────────┐ ┌──────────────┐ ┌──────────┐
│ VM │──VMnet8─▶│ Host machine │────────▶│ Internet │
│ │ │ (NAT) │ │ │
└──────────┘ └──────────────┘ └──────────┘
| Feature | Detail |
|---|---|
| Virtual network | VMnet8 (default) |
| Internet access | ✅ Yes |
| Host → VM access | ✅ Yes (via VMnet8 network) |
| VM ↔ VM | ✅ Yes (if same VMnet8) |
| Assigned IP | VMware DHCP (e.g., 192.168.128.x) |
VMware's NAT (VMnet8) is more permissive than VirtualBox's:
- VMware: the host can access the VM via the VMnet8 network
- VirtualBox: the host cannot access the VM in simple NAT (port forwarding is needed)
2) Bridged (VMnet0)
┌──────────┐ ┌──────────────┐ ┌──────────┐
│ VM │ │ Host machine │ │ Physical │
│ │ │ │ │ network │
└────┬─────┘ └──────┬───────┘ └────┬─────┘
│ │ │
└────────┬─────────┴───────────────────┘
│
┌─────────▼─────────┐
│ VMnet0 (Bridged) │
│ = physical card │
└───────────────────┘
| Feature | Detail |
|---|---|
| Virtual network | VMnet0 (default) |
| Internet access | ✅ Yes |
| Visible on the physical network | ✅ Yes |
| Assigned IP | By the physical network's DHCP |
Identical to VirtualBox's Bridged mode.
3) Host-Only (VMnet1)
┌──────────┐ ┌──────────────┐
│ VM │ │ Host machine │
│ │ │ │
└────┬─────┘ └──────┬───────┘
│ │
└────────┬─────────┘
│
┌─────────▼─────────┐
│ VMnet1 │ ❌ No Internet access
│ (Host-Only) │
└───────────────────┘
| Feature | Detail |
|---|---|
| Virtual network | VMnet1 (default) |
| Internet access | ❌ No |
| Host → VM access | ✅ Yes |
| VM ↔ VM | ✅ Yes (if same VMnet1) |
Identical to VirtualBox's Host-Only mode.
4) Custom VMnet (VMnet2, VMnet3, ..., VMnet19)
This is VMware's strength: you can create up to 20 virtual networks (VMnet0 to VMnet19), each with its own settings.
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ VM A │ │ VM B │ │ VM C │ │ VM D │
└────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │ │
└───────┬────────┘ └───────┬────────┘
│ │
┌────────▼────────┐ ┌─────────▼────────┐
│ VMnet2 │ │ VMnet3 │
│ (LAN network) │ │ (Client network)│
└─────────────────┘ └──────────────────┘
| Feature | Detail |
|---|---|
| Virtual network | VMnet2 to VMnet19 (customizable) |
| Internet access | Configurable (NAT or not) |
| VM ↔ VM | ✅ Yes (if same VMnet) |
| DHCP | Configurable in Virtual Network Editor |
A custom VMnet without NAT and without host connection is VMware's equivalent to VirtualBox's Internal Network. Example: VMnet2 configured as "Host-only" without host connection = isolated network between VMs.
5) LAN Segment
The LAN Segment is a completely isolated network, without DHCP, without host connection, without NAT.
| Feature | Detail |
|---|---|
| Internet access | ❌ No |
| Host → VM access | ❌ No |
| VM ↔ VM | ✅ Yes (if same LAN Segment) |
| DHCP | ❌ No (manual IP only) |
The LAN Segment in VMware is the closest equivalent to VirtualBox's Internal Network: a completely isolated network, manual IPs, only between VMs.
VMware Summary: the VMnets
| VMnet | Mode | Internet | Host → VM | VM ↔ VM | Notes |
|---|---|---|---|---|---|
| VMnet0 | Bridged | ✅ | ✅ | ✅ | Connected to the physical network |
| VMnet1 | Host-Only | ❌ | ✅ | ✅ | Private network with the host |
| VMnet8 | NAT | ✅ | ✅ | ✅ | NAT via the host |
| VMnet2-7, 9-19 | Custom | Configurable | Configurable | ✅ | Custom networks |
| LAN Segment | Isolated | ❌ | ❌ | ✅ | Like Internal Network |
Comparison table: VirtualBox vs VMware
Direct correspondence
| Function | VirtualBox | VMware |
|---|---|---|
| Internet access via host | NAT | NAT (VMnet8) |
| Internet + communication between VMs | NAT Network | NAT (VMnet8) |
| VM on the physical network | Bridged Adapter | Bridged (VMnet0) |
| Private network with host | Host-Only Adapter | Host-Only (VMnet1) |
| Isolated network between VMs | Internal Network | LAN Segment or Custom VMnet |
| Multiple custom networks | Internal Network (named) | Custom VMnet (VMnet2-19) |
Key differences
| Criterion | VirtualBox | VMware |
|---|---|---|
| Max number of cards per VM | 4 (GUI) or 8 (CLI) | 10 |
| Max number of internal networks | Unlimited (by name) | 20 (VMnet0 to VMnet19) |
| NAT: can host access the VM? | ❌ No (port forwarding needed) | ✅ Yes (via VMnet8) |
| DHCP in internal network | ❌ No (manual IP required) | Configurable by VMnet |
| Virtual network editor | Limited | ✅ Virtual Network Editor (advanced) |
| Network performance | Good | Very good (VMXNET3) |
Practical examples from labs
Example 1: Lab 4 – SSH (2 cards per VM)
In Lab 4 (SSH Protocol), each VM uses 1 network card in Internal Network:
┌──────────────────────────────────────────────────┐
│ Internal Network "intnet" │
│ 10.11.12.0/24 │
│ │
│ ┌────────────┐ ┌────────────┐ │
│ │ SSH-SRV │ │ SSH-CLI │ │
│ │ │ │ │ │
│ │ Adapter 1: │ │ Adapter 1: │ │
│ │ Internal │◄────────►│ Internal │ │
│ │ Network │ │ Network │ │
│ │ "intnet" │ │ "intnet" │ │
│ │ 10.11.12.1 │ │ 10.11.12.2 │ │
│ └────────────┘ └────────────┘ │
└──────────────────────────────────────────────────┘
Configuration in VirtualBox:
| VM | Adapter 1 |
|---|---|
| SSH-SRV | Internal Network → intnet (manual IP: 10.11.12.1/24) |
| SSH-CLI | Internal Network → intnet (manual IP: 10.11.12.2/24) |
VMware equivalent:
| VM | Network Adapter 1 |
|---|---|
| SSH-SRV | LAN Segment → intnet (manual IP: 10.11.12.1/24) |
| SSH-CLI | LAN Segment → intnet (manual IP: 10.11.12.2/24) |
This lab does not need Internet. The two VMs communicate only with each other on the internal network. If you need to install packages, temporarily add a NAT card, install, then remove it.
Example 2: Lab 5 – SSH, HTTP, and Firewall (up to 3 cards)
In Lab 5 (SSH, HTTP, and Firewall), srvGateway uses 3 network cards:
┌──────────────────────────────────┐
│ srvGateway │
│ │
│ Adapter 1: NAT (Internet) │
│ Adapter 2: Internal "lan" │
│ 10.11.12.1/24 │
│ Adapter 3: Internal "clientnet" │
│ 20.21.22.1/30 │
└───┬──────────┬──────────┬────────┘
│ │ │
Internet│ LAN │ Client│
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐
│ srvSSH │ │ Client │
│ srvWEB │ │20.21.22.2│
│10.11.12.x│ └──────────┘
└──────────┘
Configuration in VirtualBox:
| VM | Adapter 1 | Adapter 2 | Adapter 3 |
|---|---|---|---|
| srvGateway | NAT (Internet) | Internal Network → lan | Internal Network → clientnet |
| srvSSH | Internal Network → lan | — | — |
| srvWEB | Internal Network → lan | — | — |
| Client | Internal Network → clientnet | — | — |
VMware equivalent:
| VM | Network Adapter 1 | Network Adapter 2 | Network Adapter 3 |
|---|---|---|---|
| srvGateway | NAT (VMnet8) | Custom → VMnet2 (lan) | Custom → VMnet3 (clientnet) |
| srvSSH | Custom → VMnet2 (lan) | — | — |
| srvWEB | Custom → VMnet2 (lan) | — | — |
| Client | Custom → VMnet3 (clientnet) | — | — |
Each card has a specific role:
- NAT → Internet access (for
apt update, downloads) - Internal
lan→ server network (10.11.12.0/24) - Internal
clientnet→ client network (20.21.22.0/30)
The srvGateway machine does the routing between these 3 networks using ip_forward and iptables.
Example 3: Lab with 3 cards (NAT + NAT Network + Host-Only)
Here is another common case: a VM that needs Internet, to communicate with other VMs, AND to be accessible from the host:
VirtualBox Configuration:
| Adapter | Mode | Role | Typical IP |
|---|---|---|---|
| Adapter 1 | NAT | Internet access | 10.0.2.15 (automatic) |
| Adapter 2 | NAT Network (NatNetwork1) | Communication between VMs + Internet | 10.0.2.x (DHCP) |
| Adapter 3 | Host-Only (vboxnet0) | SSH access from the host | 192.168.56.x |
VMware equivalent:
| Adapter | Mode | Role | Typical IP |
|---|---|---|---|
| Network Adapter 1 | NAT (VMnet8) | Internet access + host | 192.168.128.x |
| Network Adapter 2 | Custom (VMnet2) | Communication between VMs | Manual IP |
| Network Adapter 3 | Host-Only (VMnet1) | SSH access from the host | 192.168.xxx.x |
How to configure cards in VirtualBox
Step by step (GUI)
- Select the VM → Click on Settings
- Go to Network
- You see the tabs Adapter 1, Adapter 2, Adapter 3, Adapter 4
- For each adapter:
- Check Enable Network Adapter
- Choose the mode in the Attached to dropdown (Network access mode)
Configuration for each mode
NAT
☑ Enable Network Adapter
Attached to: NAT
Nothing else to configure. VirtualBox handles everything automatically.
Internal Network
☑ Enable Network Adapter
Attached to: Internal Network
Name: intnet ← type the network name (VMs with the same name see each other)
You must configure the IP manually in the VM (no DHCP):
# Example on Ubuntu (netplan file)
sudo nano /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
enp0s8: # interface name (check with "ip a")
addresses:
- 10.11.12.1/24
sudo netplan apply
Host-Only
☑ Enable Network Adapter
Attached to: Host-only Adapter
Name: VirtualBox Host-Only Ethernet Adapter
If no Host-Only network exists:
- Menu File → Host Network Manager
- Click on Create
- A
vboxnet0network is created with the range192.168.56.0/24
NAT Network
☑ Enable Network Adapter
Attached to: NAT Network
Name: NatNetwork ← the shared NAT network name
- Menu File → Preferences → Network
- Click on + to add a NAT network
- Give it a name (e.g.,
NatNetwork)
Bridged
☑ Enable Network Adapter
Attached to: Bridged Adapter
Name: Intel(R) Wi-Fi... ← choose your physical network card
CLI Command (VBoxManage)
For advanced users, you can configure the cards via command line:
# Adapter 1: NAT
VBoxManage modifyvm "MyVM" --nic1 nat
# Adapter 2: Internal Network named "lan"
VBoxManage modifyvm "MyVM" --nic2 intnet --intnet2 "lan"
# Adapter 3: Internal Network named "clientnet"
VBoxManage modifyvm "MyVM" --nic3 intnet --intnet3 "clientnet"
# Adapter 2: Host-Only
VBoxManage modifyvm "MyVM" --nic2 hostonly --hostonlyadapter2 "vboxnet0"
# Adapter 1: Bridged
VBoxManage modifyvm "MyVM" --nic1 bridged --bridgeadapter1 "Intel(R) Wi-Fi"
How to configure cards in VMware
Step by step (GUI)
- Select the VM → Click on Edit virtual machine settings
- Click on Add... to add a network adapter (or select an existing one)
- Choose the connection type:
- Bridged (VMnet0)
- NAT (VMnet8)
- Host-only (VMnet1)
- Custom → choose a specific VMnet
Virtual Network Editor (VMware Workstation Pro)
The Virtual Network Editor is VMware's most powerful tool for managing networks:
- Menu Edit → Virtual Network Editor
- Click on Change Settings (admin rights)
- You can:
- Create new VMnets
- Configure DHCP per VMnet
- Configure subnet per VMnet
- Enable/disable NAT per VMnet
- Connect/disconnect the host
Example: create an isolated network (equivalent to Internal Network)
In the Virtual Network Editor:
VMnet2:
☐ Connect a host virtual adapter ← unchecked (host does not see this network)
☐ Use local DHCP service ← unchecked (manual IP)
Subnet IP: 10.11.12.0
Subnet mask: 255.255.255.0
Then in the VM:
Network Adapter → Custom → VMnet2
IP configuration in the VM
Same procedure as VirtualBox – configure the IP manually in the VM:
# Ubuntu (netplan)
sudo nano /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
ens33: # VMware interface name (check with "ip a")
addresses:
- 10.11.12.1/24
sudo netplan apply
Visual summary
Decision diagram: which card to choose?
The 3 most common lab configurations
┌─────────────────────────────────────────────────────────────────────┐
│ COMMON CONFIGURATION #1 │
│ "I just want Internet on my VM" │
│ │
│ → 1 card: NAT │
│ VirtualBox: Adapter 1 = NAT │
│ VMware: Network Adapter 1 = NAT (VMnet8) │
├─────────────────────────────────────────────────────────────────────┤
│ COMMON CONFIGURATION #2 │
│ "My VMs need to talk on a private network" │
│ │
│ → 2 cards: NAT + Internal Network │
│ VirtualBox: Adapter 1 = NAT, Adapter 2 = Internal "intnet" │
│ VMware: Adapter 1 = NAT, Adapter 2 = Custom VMnet2 │
├─────────────────────────────────────────────────────────────────────┤
│ COMMON CONFIGURATION #3 │
│ "My VM is a gateway between 2 private networks + Internet" │
│ │
│ → 3 cards: NAT + Internal "lan" + Internal "clientnet" │
│ VirtualBox: Adapter 1 = NAT, Adapter 2 = Internal "lan", │
│ Adapter 3 = Internal "clientnet" │
│ VMware: Adapter 1 = NAT, Adapter 2 = VMnet2, Adapter 3 = VMnet3 │
└─────────────────────────────────────────────────────────────────────┘
FAQ – Frequently Asked Questions
Q: Maximum number of network cards per VM?
| Hypervisor | Maximum (GUI) | Maximum (CLI/advanced) |
|---|---|---|
| VirtualBox | 4 | 8 (with VBoxManage) |
| VMware | 10 | 10 |
Q: My VM has no connection between VMs, what to check?
- Same network name: VMs must be on the same internal network (e.g.,
intnet) - Manual IPs configured: in Internal Network / LAN Segment, no automatic DHCP
- Same subnet: IPs must be in the same network (e.g.,
10.11.12.1/24and10.11.12.2/24) - Firewall disabled (for testing):
sudo ufw disableorsudo iptables -F - Card enabled: check with
ip athat the interface is UP
Q: How to know my interface name in the VM?
ip a
# or
ip link show
Common names:
- VirtualBox:
enp0s3(card 1),enp0s8(card 2),enp0s9(card 3) - VMware:
ens33(card 1),ens34(card 2),ens35(card 3)
Q: Can I mix VirtualBox and VMware?
❌ No. VirtualBox VMs cannot communicate with VMware VMs via an internal network. Each hypervisor has its own isolated virtual networks.
Q: What is the difference between NAT and NAT Network in VirtualBox?
| NAT | NAT Network | |
|---|---|---|
| Internet | ✅ | ✅ |
| VM ↔ VM | ❌ (each VM isolated) | ✅ (VMs on the same network) |
| Usage | Single VM | Multiple VMs that need to communicate AND have Internet |
Q: In VMware, does VMnet8 (NAT) allow VMs to see each other?
✅ Yes! Unlike VirtualBox's simple NAT, VMware's NAT (VMnet8) allows VMs on the same VMnet8 to communicate with each other.
Bonus Lab created on: February 2026