Configure LAN and Internet access (CentOS) and vmwarecentos for Linux in VMware

Source: Internet
Author: User

Configure LAN and Internet access (CentOS) and vmwarecentos for Linux in VMware

An important operation to use a Linux system is to enable the Linux system to access the Internet. Only the Linux system can access the Internet to download many resources it needs, if you cannot access the Internet, the Linux system will usually be stuck in this step. If you have installed a minimal CentOS version, many tools in Linux are not installed, at this time, if you cannot access the Internet, you will feel a special headache, because many tools cannot be downloaded or installed, today, Alan will share with you how to configure a Linux system under VMware to successfully access the LAN and Internet.

 

Step 1: Open the vmwarevm, click the network adapter, and change the network adapter to the bridging mode (B): directly connect to the physical network and check the physical network connection status (P)

 

Step 2: Enable your own virtual machine, that is, to run the Linux operating system. If you do not install the Linux system under the virtual machine, you can find related articles in Alan's essay Linux classification, click Enable this Vm and wait for a while.

 

Step 3: Enter the user name and password of the LInux system to log on to the Linux operating system, and verify whether the file and directory can be accessed.

 

 

Step 4: Enter the ifconfig command to view the current settings of the current network device. Remember the NIC address. If you cannot access the network at this time, you may need to configure the NIC address in the network configuration, the string after ether is

 

Step 5: test whether the network can access the LAN and Internet (Internet). Run the ping command to test the Intranet (access the IP address of the computer in use ), test the Internet (access to Baidu and so on). You can see that my network transmission is correct, then it proves that little Alan's configuration should not have much problem, right? So let's continue to look at it. What should we do if the network is disconnected at this time?

 

Step 6: run the cd command to go to the/etc/sysconfig/network-scripts directory. Pay attention to the first file in the directory.

 

Step 7: run the vi command to open the file, press enter to enter the file, press I to enter the editing mode, and configure network parameters according to the content, remember that the information configured in the bridge mode must be in the same network segment as your computer. Then Press esc and enter wq to save and exit.

 

Step 8: run the service network restart command to restart the network device. After configuring the network parameters, remember to restart the network device. Otherwise, the configuration may not take effect.

 

Step 9: run the ifconfig command to check whether the configuration has taken effect and whether the IP address has changed to the IP address configured by yourself.

 

Finally, run the ping command to test whether the Intranet environment and internet environment can be connected. use Ctrl + z to disconnect the test and continue with other operations:

In this way, you can successfully access the LAN and Internet.

 

Conclusion: How far is the universe, and how far is the idea.

 

Alimail: AlanLee

Blog: http://www.cnblogs.com/AlanLee

This article is from the blog site. You are welcome to join the blog site.

 

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.