Solution to connecting centOS to a wireless LAN in VMWare
Yesterday, when I configured the centOS network under the virtual machine, because my host is connected to wifi, many tutorials only talk about how to configure the network of the virtual machine when the host has a fixed IP address, I saw a lot of solutions for connecting to wifi on the Internet and found that they were useless after one attempt. So I tried another method and recorded it here.
1. Configure the VM as a bridge
2. Enter setup in centOS to set the network to DHCP.
3. Enter vi/etc/sysconfig/network-scripts/ifcfg-eth0 under centOs to change ONBOOT = no to ONBOOT = yes, then save and exit (Press ESC first, then press: wq)
4. Enter service network restart in centOS to restart the network service.
After completing the preceding steps, you can view the ip address and other information of the VM through ifconfig, and ping the VM.
If the preceding steps do not work, add the following steps:
1. Choose Edit from VMWare> Virtual Network editor.
2. Then change the settings
3. Connect the VMNet0 bridge to your host's wireless network card, as shown in figure
4. After confirming, enter service network restart under centOS to restart the network service.