First set VMware to NAT mode
Click "Virtual Network Editor" in "Edit" and check the DHCP service Assign the IP address to the virtual machine and set the subnet IP
Click NAT Settings next to NAT mode, and then modify the gateway IP in the same network segment as the subnet IP. Click "Confirm" to save the settings
Enter the network configuration directory /etc/sysconfig/network-scripts, as shown below
Use vi command to edit ifcfg-ens33, press shift i to enter insert editing mode, set BOOTPROTO to dhcp, set ONBOOT to yes, press Esc to enter command mode and enter: wq to save and exit
Enter service network restart to restart the network card to make the network card settings take effect, and then you can access the Internet.
Recommended tutorial: centos tutorial
The above is the detailed content of How to configure network connection in centos. For more information, please follow other related articles on the PHP Chinese website!