The configuration method I wrote below has been published by someone else on the Internet. But I think someone else wrote
Something is not necessarily correct. You must test it yourself. As the saying goes: "practice is the only criterion for testing truth." Here are my steps. Hope that the readers can point out the shortcomings.
1. Check whether the VMware DHCP Service and VMware NAT Service of your windows system are enabled. If it is not started, start it.
2. Set VMware Network Adapter VMnet8 as an IP address and automatically retrieve it from the DNS server.
3. Set your local connection to share. Set VMware Network Adapter VMnet8 as the option to allow connections from other networks through the computer's inteernet connection. For example
4. Choose vm> settings from the vm, and select "NAT" from networkAdapter.
5. in the VM menu, choose Edit-> virtual network editor and select subnet to the right of VMnet8 under "Host virtual network mapping". I will change it to 192.168.0.0 and 255.255.255.0. later, select NAT on the Right of VMnet8 and modify the gateway. I will change it to 192.168.0.2. enable the "NAT" function of vmnet8 in "NAT.
For example:
6. Click "Nat settingss" in the "Nat settingss" column to view the gateway (you need to write down the gateway)
Click dhcp settings to view and write down the DHCP address range ()
Okay. Next we will operate under the redhat of the virtual machine.
Enter the netconfig command in the terminal to enter the settings. Use the up and down keys and the Enter key to perform operations.
For example, if the IP address is set to any IP address in the DHCP range, for example, 192.168.0.129, The subnet mask in the second column is set to 255.255.255.0, And the gateway address in the third column is set to the gateway address noted down above, in this example, It is 192.168.0.2, and the fourth column does not care whether it is okay, and then OK to continue.
After the preceding settings, enter service network restrat in the terminal to restart the network, and ping the gateway address. In this example, 192.168.0.2 is used.
The ping is successful. It indicates that the network is successfully configured. You can use the browser of redhat to try accessing the Internet.
Note that, in some cases, the domain name cannot be resolved because the DNS is not set. (this is the case for me. I don't know how to set it, but it won't affect your use ), if you enter a URL directly in the address bar, you may not be able to access the Internet. You must enter an IP address. In the real PC, ping www.baidu.com, as shown in figure
You can see that Baidu's IP address is 220.181.6.19. OK, enter 220.181.6.19 in the address bar of the redhat browser of the VM,
OK. The Internet access is successfully set.
If you need to enable ftp, nfs, and other services, enter redhat-config-services on the terminal and check the corresponding vsftp, nfs, and click restart.
Author: "ITeamsky-Yang Bo's technical space"