VMware is a well-known virtualization product company, and VMware ESXi is also a virtualization software designed for servers. On servers that install VMware ESXi, you can run multiple virtual systems at the same time to take advantage of server resources. One major feature is the ability to generate virtual network topologies that can manage traffic on different virtual systems by creating virtual switches, and also make the configuration of virtual devices more flexible. Unfortunately, VMWare ESXi uses vswitch as a network switching device and does not directly provide a NAT Internet solution. The following is an example of sharing a public IP network with multiple virtual machines (equivalent to the need for router configuration to surf the Internet) to configure the NAT environment in VMware ESXi. (This tutorial to explain the construction of ESXi virtual network topology mainly, the installation of ESXi and virtual machines, set up soft routes and other operations do not focus, so omitted, there is a need to search the relevant tutorials or refer to the "reference" at the end of this article)
Purpose: a public network IP (this example is assumed to be 200.200.200.9), 3 virtual devices share the Internet
System Environment: VMWare Esxi 5.5
Software Environment: Sea Spider soft Route (v6.1.5),VMWare vSphere Client 5.5, operating system mirroring
Detailed steps:
1. Install and configure VMware Esxi
The hardware environment can use VMware Workstation[1], provided that the PC preferably has more than 8G of memory, if the conditions can be installed on the real server or idle PC directly. and tutorials, you can search your own online tutorials. After installation, you need to configure the management IP ESXi, if it is under the LAN (Router) To do this experiment, it is recommended to first change the router's network segment to a 172-beginning Class B address and turn off DHCP (to prevent soft-routed address conflicts within the virtual machine). After a specific tutorial, you can log in to the admin backend via vsphere Client for configuration success, such as.
2. Installing the system on ESXi
This step is the same as installing a virtual machine on a VMware workstation, so a little.
For ESXi running on virtual machines, it is recommended to install WinXP, Linux, which have less resource-intensive systems, and it is sufficient to install two systems altogether.
This tutorial uses a real-world server environment as an example, so two Win7 and a winserver system are installed, which is not necessary in the experiment.
3. Install sea spider soft route on ESXi
Soft routing can help the virtual network topology to implement the route forwarding function, although the performance is not as good as the hardware router, but has more than the hardware routing features, and the general routing function needs not high performance, on the server running soft routing can meet the basic NAT requirements. The sea spider used in this example has the advantage of being powerful and easy to use, and installing a sea spider on ESXi can satisfy the need of NAT sharing Internet. Sea spider here slightly, you can download the trial version from the official website [2] or find a cracked version of the tutorial [3].
The installation of sea spider is also very simple, according to the prompts to install or refer to the online tutorial can be. For cracked versions, you can use command activation after installation [4]. Note When creating a sea spider virtual machine, you need to create at least two network adapters.
After installation, go to the Sea Spider console (right-click Virtual machine-open console), you can see the background interface of the sea spider, including the configuration address and change the parameters of the options. This tutorial uses the default configuration, which is NAT intranet address 192.168.0.1, management port 880.
4. Building a local Area network
After the soft route is installed, as long as the network is configured with other virtual machines, you can enter the configuration page through other virtual machines, which is equivalent to 192.168 of the general router. 1.1, this is 192.168.0.1:880. Below is a local area network built by creating Vswitch [5].
In ESXi, click "Configure"-"network", as
The next step is to create a standard switch (created in 9-lan):
4.1 Click on the button in the upper right corner to add a network ...-Virtual machine-Create vsphere standard switch, note to cancel all actual network cards, this switch is non-adapter, such as:
4.2 Click Next to change the name of the port group (in this case, replace 9-lan)
4.3 When you are finished, in the "Edit Virtual machine settings" option for the virtual machine, change the network adapter option for all current virtual machines to 9-lan (based on the port group name of Step 4.2)
4.4 After the configuration is complete, the port group for VSwitch0 should be this way (this switch has no physical adapter):
At this point the LAN has been configured, open one of the virtual machine, through the browser login soft routing management background (192.168.0.1:880, account admin, password Admin). To prove that you are connected to a local area network (for managing the Home page interface), you can ping the IP tests of other virtual machines. As for the LAN, DHCP and other settings in the router, this is the router configuration problem, here slightly.
5. Connecting WAN ports
There is also a WAN port on the hardware router, with the exception of several LAN ports. For soft routing, there can be more than one WAN port. In the 4th step, the LAN has been set up, different virtual machines and virtual machines and the sea spider can communicate between. The next step is to plug in the soft-routed WAN port and you can surf the Internet.
Create a standard switch: Add a network ...-Create a vsphere standard switch (check here for an idle network card)-rename (this example is 9-wan)
In the configuration of the Sea Spider virtual Machine, add another free network adapter of the Sea Spider virtual machine to the 9-wan network:
Comparing the configuration above vSwitch0, the 9-router-hispider-soft route spans two switch port groups. Next open one of the system virtual machine, through the browser into the routing console, in the left option can be found to add the "WAN interface" this option (because the WAN port is already plugged in, if the 9-wan network to allocate more than one NIC, WAN interface will appear two). Through the "WAN interface" can set the network parameters of the WAN port (with the server or host to do the experiment with the configuration of PC Internet, if it is through the hardware router, to the VMware Workstation, and then to Exsi, the IP address parameters are filled in the hardware router, Just connect to the hardware router on it).
6. Analysis
In terms of ESXi, NAT shared IP network topology has been set up, if the network virtual function connected to the router and not the Internet, that is the router configuration problem. The following is a network topology to analyze the principle of NAT Internet.
From the network topology configuration (above two switches) can be seen, soft routing across two port groups, because 9-lan does not have a physical adapter, all virtual machine traffic is sent to the soft route (other virtual machines will also receive, but not processing), soft routing in the 9-lan network adapter to receive LAN traffic. The soft routing program can implement the routing function, and the traffic is unified by the network adapter in the 9-wan after the operation of NAT conversion. Since the 9-wan is connected to a physical adapter, traffic goes from 9-lan to routing, from 9-wan forward, and eventually from the physical adapter (VNMIC0) to the real network.
If you want to compare with the hardware router, 9-lan is equivalent to several LAN ports on the router, and 9-wan is the WAN port. Usually the hardware router has only one WAN port, but soft routing can realize multi-bandwidth load balancing functions, so it can plug in multiple WAN ports.
The system structure, where the switches have only one port group (same as all port group ports properties). Public IP (200.200.200.9) from the VSWITCH2 into the soft route, through the routing function to generate an intranet segment (192.168.0.1), from the vSwitch0 the 192.168.0.1xx URL assigned to 3 virtual machines. There is only one job of soft routing here, that is, to convert the extranet IP to multiple NAT intranet addresses, the function of address assignment is implemented by VSwitch0, so 3 virtual machines and routers are plugged into the 9-lan port group.
The red wireframe indicates how a hardware router works (the hardware router WAN port is unplugged, only a few other LAN ports are equivalent to the switch), within which the routing and switching functions are implemented, and the WAN port cable is equivalent to the red dashed line (directly connected to the Internet port), It is only necessary to connect the real network card via the switch (VSWITCH2) in ESXi.
Through the soft routing, can realize the server to establish multiple virtual machines and use the same IP, in the virtual machine to install the Server software, you can access 3 virtual machines through this extranet IP. Of course, the port can not be shared, 80 port can only be used for a virtual machine, the other can be forwarded through the port, or with the method of reverse proxy, here also do not elaborate.
Resources and references:
[1] Workstation installation ESXi: Red and Black Alliance. VMware ESXi 5 Installation graphics tutorial. http://www.2cto.com/os/201201/117743.html
[2] Sea Spider official website: http://www.hi-spider.com/
[3] Sea spider perfect activation + Hai Dun: Sea spider 6.15 perfect activation + Sea Shield + tutorial. http://bbs.pxecn.com/thread-101591-1-1.html
[4] Sea Spider Muddyboot activation method: Sea spider hack method. http://blog.chinaunix.net/uid-20832381-id-1743773.html. Part 4th
[5] LAN configuration: Configure NAT Internet on VMware esxi server. http://www.it165.net/os/html/201309/6206.html
VMWare Esxi + Sea Spider configuration Nat shared IP Internet