分三步:
1.虛擬機網絡連接方式選擇Nat



2.關閉liunx防火牆,命令service iptables stop
確定是否關閉,命令service iptables status
3.關閉windows防火牆
4.在linux使用ifconfig查看ip,如圖可看出ip是192.168.189.131


在windows主機的網絡設置中選擇VMNet8


——》右鍵——》屬性——》TCP/Ipv4——》IP地址輸入192.168.189.1(這個是根據虛擬機192.168.189.131來的),子網掩碼輸入255.255.255.0,其他空


再互相ping試試,應該就可以了