Week 3 - Lab 2: Proxmox Networking Deep Dive
Module: Operating Systems 3 (Virtualisation & Cloud Technologies) Instructor: KT Nshimba Topic: Practical VM Networking and Bridge Configuration Estimated Time: 90 Minutes
Lab Overview
Building on your Week 2 Proxmox installation, this lab focuses on practical network configuration. You'll first build a working multi-VM network with static IPs and connectivity, then dive deep into how Proxmox manages these networks through configuration files and bridges.
Objectives:
- Configure static IP addresses on multiple VMs
- Establish VM-to-VM and Host-to-VM connectivity
- Implement floating IPs for high availability scenarios
- Analyze Proxmox network configuration files (
/etc/network/interfaces) - Troubleshoot common networking issues
Prerequisites: - Completed Week 2 Lab 2 (Proxmox installed and accessible) - Two VMs available for networking experiments - SSH/Shell access to Proxmox host
Part 1: Create Two Network VMs
We need two VMs to test inter-VM communication.
-
Create VM 200 (if not already exists from Week 2):
- Name:
vm-web - OS: Alpine or Ubuntu Server (minimal)
- Network: Bridge
vmbr0, ModelVirtIO - Start the VM
- Name:
-
Clone to create VM 201:
- Right-click VM 200 → Clone
- Mode: Full Clone
- Name:
vm-db - Start the cloned VM
Verification: You should now have two running VMs (200 and 201).
Part 2: Configure Static IP Addresses
By default, VMs use DHCP. We'll assign static IPs to ensure predictable addressing.
On VM 200 (vm-web):
- Log in via Console
-
Identify the network interface:
bash ip addr show- Note the interface name (usually
eth0orens18)
- Note the interface name (usually
-
Configure static IP (Alpine Linux example): ```bash # Edit network config vi /etc/network/interfaces
Add/modify:
auto eth0 iface eth0 inet static address 192.168.
Save and restart networking
rc-service networking restart ```
Ubuntu/Debian alternative (using netplan): ```bash sudo vi /etc/netplan/01-netcfg.yaml
Add:
network: version: 2 ethernets: ens18: dhcp4: no addresses: - 192.168.1.50/24 gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8]
sudo netplan apply ```
-
Verify configuration:
bash ip addr show eth0 ping -c 3 192.168.1.1 # Test gateway
Record: VM 200 IP address: _______
On VM 201 (vm-db):
- Repeat the same process but use 192.168.1.51 as the IP address
- Verify:
bash ip addr show
Record: VM 201 IP address: _______
Part 3: Test VM-to-VM Communication
Now verify that the two VMs can communicate on the same network.
-
From VM 200, ping VM 201:
bash ping -c 3 192.168.1.51- Expected: 3 successful ping responses
-
From VM 201, ping VM 200:
bash ping -c 3 192.168.1.50
Interactive Question: - Were both pings successful? [ Yes / No ] - If no, which VM failed? ___ - Average latency: ____ ms
Part 4: Configure Default Gateway (Internet Access)
The gateway routes traffic outside the local network.
-
On both VMs, test external connectivity:
bash ping -c 3 8.8.8.8 -
If ping fails, verify gateway configuration:
bash ip route show- Expected output:
default via 192.168.1.1 dev eth0
- Expected output:
-
If gateway is missing, add it manually:
bash ip route add default via 192.168.1.1 -
Retest internet:
bash ping -c 3 google.com
Verification: Can VM 200 reach the internet? [ Yes / No ]
Part 5: Access VMs from Host PC
Now we'll configure access from your host computer (Windows/Mac/Linux laptop) to the VMs.
Step 1: Verify Host Network
-
On your host PC, check your IP address:
- Windows:
ipconfig - Mac/Linux:
ifconfigorip addr
- Windows:
-
Ensure you're on the same subnet:
- If your host is
192.168.1.x, you can reach192.168.1.50and192.168.1.51 - If your host is on a different subnet (e.g.,
10.0.0.x), you'll need to adjust VM IPs or configure routing
- If your host is
Host IP: _______
Step 2: Ping VMs from Host
- Open terminal/command prompt on host
-
Ping VM 200:
bash ping 192.168.1.50 -
Ping VM 201:
bash ping 192.168.1.51
Interactive: - Can you ping VM 200 from host? [ Yes / No ] - Can you ping VM 201 from host? [ Yes / No ]
Step 3: SSH Access (Bonus)
If you installed SSH server on the VMs:
-
From host, connect to VM 200:
bash ssh root@192.168.1.50 -
Run a command remotely:
bash ssh root@192.168.1.50 "hostname && uptime"
Verification: Were you able to SSH into the VM? [ Yes / No ]
Part 6: Floating IP Concept (HA Scenario)
A Floating IP is an IP address that can "float" between VMs for high availability.
Simulation:
-
On VM 200, add a secondary IP (the "floating" IP):
bash ip addr add 192.168.1.100/24 dev eth0 -
Verify it exists:
bash ip addr show eth0- You should see both
192.168.1.50and192.168.1.100
- You should see both
-
Test from host:
bash ping 192.168.1.100 -
Simulate failover - Remove IP from VM 200 and add to VM 201: ```bash # On VM 200 ip addr del 192.168.1.100/24 dev eth0
On VM 201
ip addr add 192.168.1.100/24 dev eth0 ```
-
Test from host again:
bash ping 192.168.1.100- The IP now points to VM 201!
Critical Thinking: In your own words, why is this useful for web servers?
Part 7: Network Diagram Challenge
Draw a simple diagram showing:
- Your host PC
- The Proxmox hypervisor
- Bridge vmbr0
- VM 200 (192.168.1.50)
- VM 201 (192.168.1.51)
- The physical network interface
- The gateway (192.168.1.1)
Submit your diagram (draw on paper or use a tool like draw.io).
Part 8: Anatomy of /etc/network/interfaces
Now that you've built a working network, let's see how Proxmox manages it behind the scenes.
Proxmox does not use a database for networking; it writes standard Debian configuration text.
- SSH into Proxmox host (or use Shell from GUI)
-
View the Config:
bash cat /etc/network/interfaces -
Analyze the Output: Find the section for
vmbr0. It likely looks like this:bash auto vmbr0 iface vmbr0 inet static address 192.168.1.10/24 gateway 192.168.1.1 bridge-ports eno1 bridge-stp off bridge-fd 0 -
Field Report (Fill in your values):
- My Bridge Name:
[ _____________________________ ] - Physical Interface (bridge-ports):
[ _____________________________ ] - My IP Address:
[ _____________________________ ] - Gateway:
[ _____________________________ ]
- My Bridge Name:
-
Critical Thinking:
- What would happen if you deleted the line
bridge-ports eno1and rebooted? [ _________________________________________________________________________ ]
- What would happen if you deleted the line
Part 9: Tracing the Cabling (Bridge Layout)
We need to see what is plugged into our switch right now.
-
Run the Bridge Command: ```bash # If bridge-utils is installed brctl show
OR using the modern ip command
ip link show master vmbr0 ```
-
Field Report: List all interfaces currently plugged into
vmbr0(look fortap...oreno...):[ _____________________________ ][ _____________________________ ][ _____________________________ ]
-
Critical Thinking:
- If you see an interface named
tap100i0, what does the number100usually represent in Proxmox? [ _________________________________________________________________________ ]- Hint: Look at your VM IDs from Part 1!
- If you see an interface named
Part 10: Simulating a Troubleshooting Scenario
Scenario: A Junior Admin complains that their new VM (VM 105) cannot get an IP address via DHCP. They configured the VM to use Tag 20 (VLAN 20), but the router for VLAN 20 is working fine.
You suspect the issue might be the bridge configuration.
-
Check Bridge VLAN Awareness: Look at your
/etc/network/interfacesagain forvmbr0.- Do you see
bridge-vlan-aware yes?
- Do you see
-
Investigation:
- Is VLAN Aware enabled?
[ Yes / No ] - If No: Can this bridge legally pass VLAN tags, or will it strip them?
[ _________________________ ]
- Is VLAN Aware enabled?
-
The Fix: If you were to fix this via CLI, you would add
bridge-vlan-aware yesunder thevmbr0block.- Try to simulate this by editing a test file (do NOT edit the real config if on production): ```bash
Create a dummy config to practice editing
cp /etc/network/interfaces ~/interfaces.bak nano ~/interfaces.bak ```
Part 11: Open vSwitch (OVS) Exploration (Optional)
If you installed OVS in Lab 1, let's see how it differs in the Proxmox context.
-
List OVS Bridges:
bash ovs-vsctl show -
Field Report:
- What is the UUID of your OVS setup?
[ _____________________________ ] - Does it show a "Controller" connected?
[ Yes / No ]
- What is the UUID of your OVS setup?
Lab Reflection
-
Persistence: Why do we edit
/etc/network/interfacesinstead of just runningip link add...?[ _________________________________________________________________________ ]
-
Risk: Why is editing the network config of a remote server considered "high risk"?
[ _________________________________________________________________________ ]
-
Design: In your own words, describe the difference between a Bridge and a Bond.
[ _________________________________________________________________________ ]
Final Lab Checkpoint
Practical Skills: - [ ] Configured static IP on VM 200 - [ ] Configured static IP on VM 201 - [ ] Successfully pinged VM 201 from VM 200 - [ ] Verified default gateway and internet access - [ ] Pinged both VMs from host PC - [ ] Demonstrated floating IP migration - [ ] Created network topology diagram
Theoretical Understanding:
- [ ] Analyzed /etc/network/interfaces file
- [ ] Identified bridge-port relationships
- [ ] Troubleshooted VLAN awareness issue
- [ ] Explained persistence vs temporary configs
Troubleshooting Checklist:
If you cannot ping between VMs:
1. Check firewall: iptables -L (should allow ICMP)
2. Verify IPs: ip addr show
3. Check route: ip route show (should have default gateway)
4. Verify bridge: On Proxmox host, brctl show vmbr0 (both tap interfaces should be present)
Instructor Signature: ___ Date: ___