Use NAT shared Host IP address to access the Internet in VMware redhat linux 9

Source: Internet
Author: User

Use NAT shared Host IP address to access the Internet in VMware redhat linux 9

1. Install VMware workstation.
2. Install the guest system. Here, I installed Red Hat Linux9. During the installation process, make sure that the network connection is in the NAT mode. Of course, you can modify it after installation.


3. Check all network connections in windows XP. In addition to the original Nic, you should find that there are more Vmnet1 and vmnet8. Vmnet1 is the hostonly interface, while Vmnet8 is the NAT Network Interface we want to use.

4. Use ipconfig on the win host to view the VMnet8 IP address, which is 192.168.X.1/255.255.255.0. At this time, the VMnet8 setting should be to automatically obtain the IP address and change it to a static IP address, enter the IP address in VMnet8 without a gateway.


5. Check VMnet8 In the NAT entry in the VM network settings. Generally, the address 192.168.X.2/255.255.255.0 is VMnet8 and the NAT gateway.


6. Now, in LINUX, set the nic ip address to the IP address of one network segment (192.168.X.Z/255.255.255.0) of VMnet8)
7. Set the gateway to the IP address 192.168.x. 2 you just viewed.



8. DNS is the same as your host.



9. After the configuration is complete, restart the linux network service.



 
Linux commands
Netconfig
Ifconfig View
Reboot restart
Services network restart (restart the network)
Generally, after vmware is installed, you can directly use the nat mode to share the Internet with the host. However, if you are using some lite versions, or you have made changes on your own, check them as follows.

1. Check whether the nat service is available and whether the related services are enabled.
First, enable the virtual network setting function of the Virtual Machine. On the Virtual Machine menu bar, choose Edit> virtual network settings.


 
If you find that the options above are gray, it means that your lite version does not have this function. You can find a new version or download instructions to see if you need to install other things.
In the subsequent dialog box, check whether the dhcp and nat services are enabled.


 


 
If you press start in the middle-the application is useless, consider whether the related service is disabled. Host Start Menu -- run -- services. msc check related services. The correct information should be as follows:


 

2. Check whether ics is enabled. Enable ics and enable nat mode, which can cause confusion and must be disabled. (Ics is internet connection share, that is, internent connection Sharing)


 

Iii. Check the network interface mode
Check whether the Virtual Machine Nic uses the nat mode and whether the same vmnet number is used in the virtual network settings. Make sure that the same vmnet number is used in both V6.


 
In versions earlier than 7.0, vmnet8 is used as the default port number for nat by default, but vm7.0 is different.


 
In nat mode, vmnet0 is used. In this case, the insurance is wonderful. Use the custom vmnet0 interface for the VM Nic.

4. Enable the VM system to check whether ip addresses are obtained. Check whether the ip, gateway, and dns are normal.


 
4.1 "cables are pulled out" in case of a network connection Red Cross ". There is no cable in the virtual machine, so it must be a setup problem.
4.1.1 check the "connection when power is turned on" hook, or check whether the virtual network card icon in the lower right corner has a cross.
4.1.2 if the previous one is normal, install vmtools again to ensure that the virtual NIC Driver is normal.
4.1.3 the above two items are normal, but there are still problems. It should be some system problems. For ubuntu, check the connection several times. For redflag, remove the hook before "display icon in the notification area after connection" in the local connection attribute. You can connect to ubuntu without any worries.

5. If vm7.0 still does not obtain the ip address, you need to set the virtual network to "default" and try again.
Shut down the system in the Virtual Machine and enable the virtual network configuration, as shown in Figure 7. Press "resore default" in the lower left corner to restore the default settings, select "always install the driver software" for all the whql driver certifications that will pop out later ".


 
After the check, continue to check the previous check items, and then open the system in the virtual machine.

6. You still cannot access the Internet after obtaining an ip address.
The 6.1 host is win7 or vista, and the vmware version is earlier than 6.5.3. Please upgrade the vmware version.
The problem is that the domain name can be pinged or accessed. However, qq can go up. This should be a compatibility issue. Please upgrade the vmware version.
6.2 use network commands to check the network.
1. ping the nat Gateway. For example, ping 192.168.47.2 in the figure 8.
2. ping the public ip address of the physical host or the real ip address of the Intranet,
3. You can continue to ping the internet isp gateway or Intranet router ip address, and finally ping the website domain name.
If all requests can be accessed, rather than the 6.1 issue, check if the browser has set an incorrect proxy.
If the dns can be resolved, but ping all Internet ip addresses is packet loss, it should be a gateway problem. check whether it is a dual gateway, and check the default gateway Under route print.
If you can ping all ip addresses and the domain name cannot be pinged, it should be because the dns resolution of the nat server is faulty and the host is restarted (the same as restarting the router) or fill in the public network dns directly in the virtual machine, or set the nat, directly fill in the dns directly to the Virtual Machine nat (10 ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.