Differing Behaviors of Identically Configured Windows 11 and Ubuntu 22.04 VMware Clients with Internet Connectivity
In this article, we will explore the differences in internet connectivity between two identically configured virtual machines (VMs) running on VMware Workstation 17 Player: one with Windows 11 and the other with Ubuntu 22.04.
Identical Configuration of VMs
Both virtual machines have been created with the same hardware settings, including the same number of CPUs, memory allocation, and network adapter type. The guest operating systems have also been configured with the same network settings, such as a static IP address, subnet mask, and default gateway.
SSH Transfer between VMs
To transfer files between the two virtual machines, we can use the SSH protocol. In Windows 11, we can use the built-in OpenSSH client, while in Ubuntu 22.04, we can use the built-in OpenSSH server.
# In Windows 11:
$ ssh user@ubuntu-vm-ip-address
# In Ubuntu 22.04:
$ ssh user@windows-vm-ip-address
Internet Connectivity Differences
Despite the identical configuration, we may encounter differences in internet connectivity between the two virtual machines. These differences can be caused by various factors, such as the guest operating system's network stack, firewall settings, or VMware network adapter drivers.
Windows 11 VM
In the Windows 11 VM, we may experience issues with internet connectivity due to the Windows Firewall blocking incoming and outgoing traffic. To resolve this issue, we need to add exceptions for the necessary network protocols and ports in the Windows Firewall settings.
# Open Windows Defender Firewall with Advanced Security
$ wf.msc
# Allow incoming and outgoing traffic for the necessary protocols and ports
Ubuntu 22.04 VM
In the Ubuntu 22.04 VM, we may encounter issues with DNS resolution due to the /etc/resolv.conf file being overwritten by NetworkManager. To resolve this issue, we need to configure NetworkManager to use a static DNS server.
# Edit /etc/NetworkManager/NetworkManager.conf
$ sudo nano /etc/NetworkManager/NetworkManager.conf
# Add the following lines:
[main]
dns=none
# Save and close the file
# Restart NetworkManager
$ sudo systemctl restart NetworkManager
# Configure a static DNS server in /etc/resolv.conf
$ sudo nano /etc/resolv.conf
# Add the following line:
nameserver dns-server-ip-address
# Save and close the file
Although we may configure our virtual machines identically, differences in internet connectivity can still arise due to various factors. By understanding the key concepts and configurations related to network settings, we can troubleshoot and resolve these issues effectively.
References
- VMware Workstation 17 Player Documentation
- Windows 11 Documentation
- Ubuntu 22.04 Documentation
- OpenSSH Documentation