Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

VM static ip bridge mode benefits:

1. On the external network can download the package
2 and the host in the same network segment, convenient and within the same local area network computer connection
3. fixed IP address for easy viewing service

Setting method:

Modify NIC configuration, the network bridge mode setting

vim /etc/sysconfig/network-scripts/ifcfg-ens33

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

One problem: restart the card, there is ip address, you can not connect to external networks

Failure Analysis: Bridging the virtual machine and the card does not correspond to the current host card, simply, like my host now use wired Internet access, while the virtual machine is a local bridge card wireless card, you can not connect to external networks

Solutions are as follows:

1. First, view the virtual machine at the moment the bridge mode information

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

2. View mode host Internet (wired or wireless connections)

3. Next View Virtual Machine Network Editor inside look at bridging the corresponding virtual network adapter name are the same

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

4. restart the virtual machine card, external network connection test

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

Second problem: When the host wireless network connection, there is ip address, but not on the external network

Analysis: Causes and above, but because the host switch to a wireless connection, bridge mode virtual machine automatically, there is no wireless LAN adapter, you can not connect to external networks

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode
Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

Solution:

1. Custom NIC mode

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

2. Configure virtual network adapter vmnet9

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

3. Restart card, external network connection test, a normal visit

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

Friendly reminder:

  我的虚拟机是vmware 14,自动桥接模式是VMnet0 ,它的自动桥接只能桥接到有线网卡,不能桥接到无线网卡。所以,当宿主机切换为无线上网,只能自定义vmnet9,然后选择桥接的无线网络适配器!

Question three: After a question I and II, also check the card information, no problem, but just could not connect to external networks

Analysis: ip address conflict, at the moment ip address may be used by someone else

Solution: Replace the ip address

vim /etc/sysconfig/network-scripts/ifcfg-ens33

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

Restart card, test

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

Other issues: all of the above methods are tried, still can not connect to external networks, but try to delete the line that DNS resolution

Solve the problem of virtual machine outside the network bridge can not be on static ip in bridge mode

to sum up:

Such problems arise when doing experiments 1. virtual machine, according to the above steps in order to troubleshoot, do not stumble, impatient!
2. All of the above issues and solutions, is my personal experience and explore out, which naturally also includes Internet access, if any part of similar documents, also normal.
3. may also have other problems, I did not think of, the exchange also welcome the comments below!

Guess you like

Origin blog.51cto.com/13760351/2426534
Recommended