VBOX's virtual network card

The bank’s network team got involved the day before yesterday

Toss my security client cannot go online. For this reason, even remote desktop cannot work and communicate with colleagues.

A colleague in the network team came to check and found that I used a fixed IP to connect to the network, and then changed it to an automatic IP.

Both the secure client and remote desktop are OK!

After he left, I manually changed back to the fixed IP, but I couldn't connect to the LAN, and then the PING gateway couldn't work.

I had to change back to obtain the IP automatically. After the change back, the virtual computer on my computer could not be connected. Because it is not possible to bind another IP to the automatically obtained network card

WIN won't let you add!

Then asked another operation and maintenance colleague, he said that the virtual network mode can be changed. For this reason, several network modes of VBOX under Baidu

1 NAT mode (NAT)

The host can access the Internet, and the virtual machine can access the Internet; there is no communication between the virtual machines; the virtual machine can ping the host; the host cannot ping the virtual machine.

2 Bridged Adapter

The host can access the Internet, so can the virtual machine; the virtual machines can communicate; the main virtual machine can also communicate.

I just use the IP that binds the physical network card of the laptop to the virtual network

3 Host network (host-only)

The virtual machine cannot access the Internet; the virtual machines can communicate; the communication between the virtual machine and the host must be through the VBOX virtual network card (192.168.56.1)

4 Intranet mode

Virtual machines can be connected to the Internet; virtual machines can communicate with each other, but virtual hosts cannot communicate with each other

This model may be suitable for building a private cloud

Originally wanted to go to the virtual machine to change the IP of the virtual machine through the interface, and change 192.168.2.19 to 192.168.56.19

或者把网关192.168.2.1 改成192.168.56.1 (VBOX的虚拟网卡IP)

然后把在主机的网卡IPV4 属性 高级部分添加新的网关(192.168.56.1)

这方法没有去测试,因为虚拟机装得很多,全部修改一遍很麻烦。

灵感一闪,直接把虚拟网卡的IP改成192.168.2.1

经过测试发现 主机模式 主机可以PING通虚机,而虚机无法PING通网关(192.168.2.1)和主机另外的IP地址128.224.167.44

发现好像不影响正常使用,主机上的TOAD FOR MYSQL FREE可以连,MOBAXTREM shell终端也可以连,也可以传文件

Guess you like

Origin blog.51cto.com/15080028/2643038