[Linux] [VMWare] Learning notes Install Linux systems-Network configuration

Source: Internet
Author: User

Recently started to toss Linux, installed in this machine VMware and CentOS, after the installation of the virtual machine inside the OS can surf the internet, but use SECURECRT connect not on the virtual machine, start tossing this network.

After the installation of VMware, will automatically add two network card (VMNET1 and Vmnet8), the middle card, the entire structure of the machine can be abstracted into: Virtual machine system (virtual machine card vmnet0)-(Vmnet1 vmnet8), intermediate network card)--The actual system network card

Several ways VMware's network card settings are:

1. Bridged (bridging) mode
In this way, the IP of the virtual system can be set to the same network segment as the native system, the virtual machine is equivalent to a separate machine within the network , and the machine is plugged into a hub (router), the other machines in the network can access the virtual machine, the virtual machine can also access other machines in the network, Of course, two-way access to the native system is not a problem. At this time, VMware is modeled as a bridge function, only using the VMNET1 network card , VMNET8 can not

2. NAT (network address translation) mode
This approach also enables two-way access to the native system and the virtual system. However, other machines within the network cannot access the virtual machine, and the virtual system can access other machines in the network through the NAT protocol of the native system.
Now VMware is impersonating a DHCP-capable router , and this time it will be vmnet8 .

3. Host-only mode
In this way, only the network communication between the virtual machine and the host is possible, the virtual system cannot be accessed by other machines in the network, and the virtual system cannot access other machines.

4. Not use mode
This method does not use the network , the virtual system is a single machine.

Understand the above several ways, set up will be convenient, understand a lot:

1. Choose Bridged mode: Generally choose this way, the network will be set automatically, if you really want to set up, you can also set manually, through the previous explanation, we know that the virtual machine and the native interaction using the Vmnet1 this virtual network card, It is only necessary to set the IP of the Linux system on the virtual machine and the VMNET1 network card in the same network segment, for example:

The IP on this machine is 192.168.0.37,linux system set to 192.168.0.102, and the mask and gateway are consistent with this machine . There is a downside to this approach, which is the need to occupy an IP on the local network, where some companies have limited access to IP and require a fixed IP (as our company does)

2. Nat mode: For companies with limited IP usage, this is a good choice, and you need to set up Vmnet8 to get the network settings for your native Vmnet8:

Then set the IP of the Linux virtual machine, enter setup at the command line, locate the network configuration, and make modifications, such as setting the IP to 192.168.139.110, Subnet mask, The default gateway is 192.168.139.2, this must be 139.2, the setup is complete, the system can surf the internet

3. Host-only mode: This approach is equivalent to the establishment of a small local area network, local and virtual machines to form a local area network

First, modify the sharing settings for the local NIC connection, select VMnet1 and VMnet8 one of them can:

After selecting VMnet1, the IP of VMnet1 has changed after selection:

At this point, the IP and gateway for the virtual machine Linux system are set as follows:

ip:192.168.137.2 (the first three bits are the same as the VMnet1, the last one can be changed, the other IP can)

Subnet mask: Consistent with VMnet1

Default gateway:192.168.137.1 (the IP address of VMnet1 is used here)

4. At this point, the network settings for VMware have been completed.

Other, after setting up the network on Linux, may not be effective immediately, need to use the command line to do some things

Restart Network Service:/sbin/service networks restart

Resources:

http://blog.163.com/[email protected]/blog/static/55384535201031325857745/

http://wenku.baidu.com/link?url=K_nKlCqLL7VN0iWR8aUZ7lNLbOTZHFc-DoTEofGmxj9aN3obzo0_ 9lbpp5yl3k5yup5n9a8u4t8hpvq_3lukkb0ga2nf-0kth6ek2i8zumo

http://blog.csdn.net/truelie/article/details/1354508

Http://bbs.chinaunix.net/thread-374483-1-1.html

Http://bbs.chinaunix.net/thread-376768-1-1.html

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.