Network mode configuration and IP address not working properly under VMware solution

Source: Internet
Author: User

Catalogue


Errors and solutions in a network configuration


Introduction to the three modes of network configuration under two VMware


1. Bridging mode (bridged)
2. Network address conversion Mode (NAT)
3. Host-only mode (host-only)


Errors and solutions in a network configuration

Error 1: Everything is fine after the virtual machine is installed, and after a day of use it is discovered that the IP address is not available.
Error Analysis : Consider a virtual machine configured with NAT mode, bridged mode, and host-only mode.
The TCP/IP configuration information for the virtual system in NAT mode is provided by the DHCP server of the VMNET8 (NAT) virtual network, which cannot be modified manually, and the IP address of the virtual machine must be set to get automatically. That is, the host computer is the equivalent of a DHCP-enabled router, and the virtual machine is a real host in the intranet, through the router (host computer) DHCP dynamic access to network parameters. This speculation is related to the services of the host computer.
resolution process : Task Manager--Details--services--turn on related services
solution result : Guess correctly, after executing the above procedure, enter the virtual machine query Ip,ip address normal get.
Diagram Process :


Figure 1


Figure 2

Figure 3

Figure 4

error 2: Actually still the same, I also want to know why the IP address is always with me, right, it is not normal to obtain the IP address @ [email protected]
Error Analysis : With the last error experience, I thought again DHCP and other services did not open, excitedly want to point a few to return to normal. However, this is not the problem, Meng Circle. But, still to solve, the analysis process is as follows:

1, the suspicion is caused by Windows system services, such as DHCP does not start, etc., to check the discovery is not the problem, negative.

2, the suspicion of virtual network configuration problems, view the virtual network configuration of VMware, everything is OK, there is no such problem, negative.

The above analysis does not solve the problem. After asking the teacher, understand should be the network service does not boot, and the problem is I do not know how to solve this problem, the solution is all the winter ocean teachers to solve the whole process, I just succeeded in the results of the porter. The following is the teacher's problem solving code, integrity is not guaranteed.

The code is as follows:

IP A
Service Network restart
IP A
cd/etc/sysconfig/network-scripts/
Vim Ifcfg-eth0
Reboot
IP A
Getenforce
Vim/etc/sysconfig/selinux
Reboot
IP A
Ls
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Getenforce
DMESG |grep eth0
IP A
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Vim/etc/sysconfig/network-scripts/ifcfg-eth1
Chkconfig--list
Chkconfig NetworkManager off
Reboot
IP A
Service Network Ststus
Chkconfig--list |grep Network
Chkconfig Network on
Reboot

Solution : The problem is solved, but I do not understand the principle, and so on after learning the relevant courses, will continue to add.

Introduction to the three modes of network configuration under two VMware
Because the learning needs to install the virtual machine, but do not understand the network configuration, resulting in a number of errors, in this summary of network configuration three modes.
VMware offers three modes of operation: Bridge mode (bridged), network address translation mode (NAT), host-only mode (host-only). After installing the virtual machine, we can see more than two NICs in the network connection.

Figure 5

1 bridging mode (bridged)


1.1. Introduction to the Model
Bridge network refers to the local physical network card and virtual network card through the VMnet0 Virtual Switch Bridge, physical network card and virtual network card in the topology map on the same status, then the physical network card and virtual network card is equivalent to the same network segment, Virtual switch is equivalent to a real network switch, Therefore, the IP address of the two network card should also be set to the same network segment.
1.2. Working principle
A virtual machine configured as a bridge network connection mode is considered as part of the host Ethernet, and the relationship between the virtual system and the host machine, like two computers connected to the same hub, can access all the shared resources and network connections in the Ethernet as a host. Can directly share the host network of the Internet or access lines to access the Internet. You can exchange visits between the host and the virtual machine, as well as between the virtual machines. Each virtual machine is connected to the host Ethernet via the default VMNET0 network card, and the virtual machine is VMnet0, and the virtual machine is like a separate physical machine in the LAN.
In this mode, the VMware virtual operating system is like a separate host in the LAN, which can access any machine in the network. In bridging mode, we need to manually configure the virtual system with an IP address, subnet mask, and the same network segment as the host machine, so that the virtual system can communicate with the host machine. At the same time, because this virtual system is a separate host system in the LAN, it is possible to manually configure its TCP/IP configuration information to enable access to the Internet through a LAN gateway or router.

1.3. Bridge mode diagram


Figure 6

2 Network Address Conversion Mode (NAT)


2.1. Introduction to the model
NAT, which is the abbreviation for network address translation, is the translation of Web addresses. Nat mode is also the default network connection mode for VMware to create virtual machines. When using NAT mode network connections, VMware establishes a separate private network on the host to communicate with each other between the host and the virtual machine. The request data packets sent by the virtual machine to the external network will be forwarded to the NAT network adapter with a special token and transmitted in the name of the host, the response data returned by the external network is received by the host, and then the NAT network adapter is identified and forwarded to the corresponding virtual machine according to the special token, so The virtual machine does not have to have its own IP address in the external network. From the external network, the virtual machine and host are sharing an IP address, and by default, the external network terminal cannot access the virtual machine.
In addition, only one virtual network with a NAT mode is allowed on a single host. As a result, multiple virtual machines with NAT mode network connections on the same host can be accessed from each other.
2.2. Working principle
Using NAT mode, the virtual system uses the NAT (network address translation) function to access the public network through the network where the host machine resides. The TCP/IP configuration information for a virtual system in NAT mode is provided by the DHCP server of the VMNET8 (NAT) virtual network and cannot be modified manually, so the virtual system cannot communicate with other real hosts on the local area network.
In fact, the role of the VMware network adepter VMnet8 Virtual network card is to provide an interface for the communication between the host and the virtual machine, even if the host's physical network card is turned off, the virtual machine can still connect to the Internet, but the host and the virtual machine cannot exchange visits.
In NAT mode, the host computer is the equivalent of a DHCP-enabled router, and the virtual machine is a real host in the intranet, which dynamically obtains network parameters through the router (host computer) DHCP. Therefore, in NAT mode, the virtual machine can access the external network, but the external network cannot access the virtual machine because the virtual machine belongs to the intranet.
2.3, network address conversion mode diagram

Figure 7


3 Host-only mode (host-only)


3.1, Introduction to the mode
       host-only mode, is a more closed network connection mode than NAT mode, which creates a private network that is fully contained in the host. Only the host-mode virtual network adapter is visible to the host and provides network connectivity between the virtual machine and the host system. Compared to NAT mode, host-only mode does not have NAT capability, so by default, virtual machines that use only host-mode network connections cannot connect to the Internet.
3.3, host-only mode illustration

Figure 8

Summary: Just started to learn Linux, is also the first time to contact the virtual machine, a lot of things are not very clear. In the course of learning will encounter big problems small problem, but I will not give up, will persist, solve a small problem, stones. This blog post is because when running the virtual machine encountered some problems, I think it is more important to remember, but there are a lot of them I do not understand now, I looked up some information, drawing on the work of others, and then organized. By the time the teacher finishes, I will update the crux of the problem thoroughly.

Network mode configuration and IP address not working properly under VMware solution

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.