How do I connect to a virtual host in VMware using SOURCECRT?

Source: Internet
Author: User
Tags virtual environment

How do I connect to a virtual host in VMware using SOURCECRT?

Before entering the topic, we need to understand some concepts.

    1. Some simple concepts that you should know
      1. Intranet address

We first need to understand the so-called intranet address, in the following three forms of the beginning of the known as the Intranet address:

10.x.x.x

172.16.x.x to 172.31.x.x

192.168.x.x

So the intranet address is said that these addresses are only used in the LAN, on the public network, you are not able to use these addresses. Of course, there is a 127.0.0.1 is the return address of the machine, this address can only be used by you, use this address to send data, the data will only in your local computer will not run outside.

What is the use of those intranet addresses above?

    1. Nat

Intranet address is widely used in NAT, the so-called NAT refers to the network address translation, of course, this article will not speak too much of the theoretical things, in short, what is the use of this stuff?

We know that now the address of the IPv4 has been basically exhausted, in order to delay the lack of address embarrassment, people try to address reuse, so there is an intranet address, the intranet address is said that these addresses can only be used in a local area network, in the public network is not see these addresses, if said, Now a local area network of a machine want to connect to the Internet, that should be how to deal with it?

This time is NAT prowess time, in the local area network and the public network connection gateway or router, these guys have this LAN a few public network address , LAN host to send external data will pass through these gateways, The gateway does some processing: change the source address to its own public address, and then record the destination address and the address of the local area network, the next time when the target host transmits data to the Gateway (route), the gateway does a conversion processing, The destination address of the IP packet is changed to the corresponding (previously recorded) LAN address (intranet address), which is probably the principle of Nat. You can view the relevant information for more details.

In this way, from the public network, our local area network has only a number of addresses, but the number of addresses to enable Multiple host access to the Internet, which is the benefits of NAT technology, it greatly reduces the consumption of public network address.

In fact, Nat is very close to us, it is possible that you are using NAT access to the Internet, you just see your IP is not an intranet address, and then you can also connect to the Internet, then sorta.

    1. Dhcp

In this article there is also a concept of DHCP, also known as Dynamic Host Configuration Protocol, the main role of this protocol is to dynamically assign IP address, said before, the IP address is now very tense, in addition to using the intranet address, you can also use the dynamic form to assign IP address, because many hosts are not simultaneously online, If the host is not in the line, then the IP address assigned to the host is temporarily wasted, in order to reduce this waste, people came up with this way to allocate IP, its operating procedures are as follows:

If a host wants to surf the internet, it sends a request to the DHCP server, the DHCP server assigns the host an IP address that the host can connect to the Internet, and if the host is offline, the DHCP server detects that it will reclaim the address so that it can be allocated to the required host. Similarly, you need to know the details to see the relevant information.

NAT can be mixed with DHCP to save more addresses.

    1. Switch

This article also has a concept is the switch , so-called switch, I do not pull too deep, this thing often used in the home or bedroom, if you have a dormitory cable socket only one, and your bedroom has a lot of people to surf the internet, how to do? Relatively inexpensive solution is to buy a switch, so that more interfaces, and here can see the role of the switch, well, in fact, nothing to do, is to let more than one host connected to a network inside.

?

With those concepts in front, we understand that VMware's network settings are much simpler.

    1. Some examples under the VM
      1. Bridged (bridging mode)

In this mode, the VMware virtual operating system is like a separate host in the LAN, which can access any machine in the network. This means that VMware, like a switch, connects virtual hosts and hosts to a single LAN.

In bridging mode, you need to manually configure the virtual system with an IP address, subnet mask, and a host machine in the same network segment 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.

?

The relationship between a virtual system using bridging mode and a host machine is like two computers connected to the same hub . To make them communicate with each other, you need to configure the IP address and subnet mask for the virtual system, or you will not be able to communicate.

?

Let's have a look at how to do it!

Then we set the network connection mode for the virtual machine to be bridged.

Then set the host's IP in the virtual machine:

After the configuration is complete, we use SECURECRT to connect to the host.

Easy connection success.

Then the second way, through Nat.

    1. NAT (network address translation mode)

As previously stated, this model is actually the simplest. In general, we can make virtual machines connect to the Internet with little or no configuration.

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. The biggest advantage of using NAT mode is that virtual system access to the Internet is very simple, you do not need to do any other configuration, only the host machine can access the Internet.

If you want to use VMware to install a new virtual system, you can directly access the Internet without any manual configuration in the virtual system, it is recommended that you use NAT mode.

My other virtual host Ubuntu happens to be online in this way, so I'll show you here.

In general, VMware provides a virtual network editor where you can control certain things, and the VMnet8 represents NAT mode for us to set up:

By clicking on DHCP settings, we can control information such as the starting and assigning time of DHCP-assigned addresses.

Note below that my Ubuntu virtual machine is configured with NAT mode:

Then configure it in the virtual host:

Perhaps your host does not have to be configured at all, you can surf the Internet. Let's take a look at the IP address:

This time if your host can connect to the Internet, then our virtual host can be directly connected to the Internet. So can this time use SECURECRT on the host to connect the virtual host? I tried a bit, the result is not in Ubuntu, under Redhat can.

Let's take Redhat as an example:

Front play not much said, set the host network connection mode is NAT, the following is the address of my virtual host:

Look at the configuration of my securecrt:

The result is easy to connect, look at

Look at the configuration of my Vmnet8 again:

    1. Host-only (host mode)

In some special network debugging environments, it is required to isolate the real environment from the virtual environment, then you can use the host-only mode. In host-only mode, all virtual systems can communicate with each other, but virtual systems and real networks are isolated.

In host-only mode, the virtual system and the host machine system can communicate with each other, which is equivalent to the two machines connected by twisted pair.

In host-only mode, the TCP/IP configuration information (such as IP address, gateway address, DNS server, etc.) of the virtual system is dynamically allocated by the DHCP server of the VMNET1 (host-only) virtual network.

In this mode, we cannot implement the SECURECRT connection to the virtual host.

    1. About Vmnet0,vmnet1 and VMnet8

We can see these things in the virtual network editor, what do these things mean?

VMNET8 represents a virtual network in NAT mode, VMNET1 represents a virtual network in host-only mode, and VMnet0 represents a virtual network in bridged mode, which is generated by the automatic configuration of the VMware virtual machine and does not need to be set by the user. VMnet8 and VMNET1 provide DHCP services, and VMNET0 virtual networks are not available. In fact, it is also very well understood, bridged mode host and virtual host is equivalent to a LAN of the two hosts, of course, only enjoy the DHCP share.

Network connection VMnet1 is the Host-only way, in host-only mode, the virtual system and the host machine system can communicate with each other, the equivalent of the two machines through the twisted pair interconnect, only the virtual machine and host connected, by default, the virtual machine can only be accessed by the host, Files can be shared with the host, but the virtual machine cannot access the external Internet.

Network Connection VMnet8 is a NAT method that allows a virtual system to access the public network through the network of the host machine, using the NAT (Network address translation) function. That is equivalent to give you a virtual switch, the virtual machine and the real system, so that virtual machines and real systems can be shared with each other, and can be implemented in the virtual operating system to access the Internet. The TCP/IP configuration information is provided by the DHCP server of the VMNET8 (NAT) virtual network and cannot be modified manually, so the virtual system will not be able to communicate with other real hosts on the local area network.

reference materials

Here are some of the things I did at the beginning of some records, we can refer to:

?

In general, using NAT to connect to a network under VMware is the most common and most convenient. This is appropriate if you have only one extranet address.

  1. Set the local network connection to shared state and share to VMnet8:

    We need to open VMware's virtual network editor to set VMnet8 as shown in:

    Here are two items to look at, one for NAT settings and one for DHCP settings.

    In the VAT settings we want to record the gateway IP, which will be used in the following settings.

    In the DHCP setup, we want to record the IP address of the starting end, with this range, it is well configured in Redhat.

      1. Set in Redhat

    Other->KDE system settings->network Settings in the application.

    Network connections->wired-> Select Connect->edit (Edit).

    Then it's set up, follow the settings:

    If we need to use the Internet, we need to fill in the DNS servers, this setting can actually be filled in and your host consistent, such as my fill out a 114.114.114.114, set to complete after you can press OK, and finally apply it.

    Now you start Firefox, you should be able to surf the Internet.

    Note here that if you want to use SOURCECRT to connect to the Redhat host, the DNS servers can not be filled, but it is not connected.

    Redhat Enterprise in a CRT-connected virtual machine

    First of all to ensure that the host and virtual machine in the same network segment, the following with my machine as an example:

    Make the host and the virtual machine connected in a bridged manner, and then set in Redhat:

    After this, the SOURCECRT can be connected with the host.

How do I connect to a virtual host in VMware using SOURCECRT?

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.