Parallels下Ubuntu实例桥接网络无法Ping/SSH问题求助
Hey there! Let's tackle this connectivity issue step by step. Since both your Ubuntu VMs are set to bridged mode in Parallels but can't reach each other via ping or SSH, here are the key checks you should run—including how to interpret your ifconfig logs:
ifconfig Output for Proper Bridged Setup First, confirm both VMs have valid, subnet-matching IP configurations. Run ifconfig (or ip addr for newer Ubuntu versions, since ifconfig is deprecated) on each machine and verify these details:
- The active network interface (usually
eth0orenp0sX) shows the correct IP (10.171.102.162 for control, 10.171.102.161 for host) - The subnet mask matches across both VMs (typically
255.255.255.0or255.255.0.0depending on your network) - A default gateway is listed (and it’s the same for both instances)
A valid ifconfig snippet should look something like this:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.171.102.162 netmask 255.255.255.0 broadcast 10.171.102.255 inet6 fe80::xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x20<link> ether 00:1c:42:xx:xx:xx txqueuelen 1000 (Ethernet)
If either VM has no valid IP (shows inet 0.0.0.0 or missing inet line), reset the network interface with:
sudo ifdown eth0 && sudo ifup eth0 # Or for systemd-based Ubuntu: sudo systemctl restart networking
Ubuntu’s default ufw (Uncomplicated Firewall) often blocks ICMP (ping) and SSH traffic by default:
- On the host VM (10.171.102.161), check if
ufwis active:sudo ufw status - If it’s enabled, allow ping and SSH access:
sudo ufw allow icmp sudo ufw allow ssh sudo ufw reload - On the control VM, double-check outgoing traffic isn’t blocked (default allows outgoing, but
sudo ufw statuswill confirm).
Parallels sometimes bridges to the wrong physical host interface, breaking connectivity:
- Open Parallels Desktop, go to Settings for each VM > Network
- Ensure "Bridged Network" is selected, and it’s mapped to your host’s active network adapter (e.g., Wi-Fi or Ethernet that’s connected to your network)
- Toggle the network mode temporarily to "Shared Network" then back to "Bridged Network", then reboot both VMs to apply changes.
Rule out VM-specific network issues by pinging the loopback and local IP:
- On each VM, ping itself:
ping 10.171.102.XXX(replace XXX with the VM’s own IP) - If this fails, check your static IP configuration (in
/etc/netplan/files if using static IP) or ensure DHCP is working correctly.
If ping returns "Destination Host Unreachable", verify the VMs can see each other’s hardware addresses:
- On the control VM, run
arp -aand look for an entry for 10.171.102.161 with a valid MAC (should match theetherline from the host’sifconfig) - If no entry exists or it’s incomplete, clear the ARP cache and retry:
sudo arp -d 10.171.102.161 ping 10.171.102.161
If ping starts working but SSH still fails:
- On the host VM, check if the SSH daemon is active:
sudo systemctl status sshd - If it’s not running, start it and enable auto-start on boot:
sudo systemctl start sshd sudo systemctl enable sshd - Also, verify
/etc/ssh/sshd_configallows password authentication (setPasswordAuthentication yesif using password login) and permits your user to connect.
If you’ve gone through all these steps and still have issues, share the full ifconfig output from both VMs, and we can troubleshoot further!
内容的提问来源于stack exchange,提问作者Rıfat Erdem Sahin

