我是 Linux 新手,我想设置一个像这样的基本客户端服务器配置场景:
1. I have installed two Linux OSs on virtual machine.
A. Server having ip=192.168.0.1 255.255.255.0 and hostname=server.com
B. Client having ip=192.168.0.2 255.255.255.0 and hostname=client.com
2. /etc/hosts made changes 192.168.0.1 server.com
192.168.0.2 client.com at both sides
3. On the virtual machine I selected as NAT networking for both.
但问题是服务器和客户端能否 ping 通自己,但不能互相 ping 通?
剩下的是什么?
答案1
由于您在两个实例上都选择了 NAT 作为网络,因此无法互相 ping 通。
如果要 ping 客户端/服务器,则应选择桥接网络或内部网络