• Start 2 Linux VMs with the network in bridged mode and check that they are reachable using ping.
时间: 2024-06-04 21:10:05 浏览: 59
ping命令 测试主机间网络连通性
To start 2 Linux VMs in bridged mode and check their connectivity using ping, follow these steps:
1. Open your virtualization software (such as VirtualBox or VMware) and create two Linux virtual machines.
2. Configure the network settings of both VMs to use bridged mode. This will allow the VMs to share the same network as your host machine.
3. Power on both VMs and log in.
4. Open a terminal window on each VM.
5. On the first VM, type the command "ifconfig" to check its IP address. Note down the IP address.
6. On the second VM, type the command "ifconfig" to check its IP address. Note down the IP address.
7. On the first VM, type the command "ping [IP address of the second VM]" and press Enter. This will initiate a ping request to the second VM.
8. If the second VM is reachable, you should see a series of responses from the ping command. If the second VM is not reachable, you will see a "host unreachable" error message.
9. Repeat step 7 on the second VM, pinging the IP address of the first VM.
10. If both VMs can ping each other successfully, then they are reachable and connected in bridged mode.
阅读全文