Recently, I have been working on several virtual machines to learn about distributed and big data technologies. First, I need to set up the virtual machines. The first step is to install the system and then configure the network. VMware provides us with three network working modes, namely: Bridged (bridge mode), NAT (network address translation mode), and Host-Only (host-only mode). 1. Bridged The bridge mode is equivalent to the virtual machine and the host being in the same real network segment, and VMWare acts as a hub (a network cable is connected to the router connected to the host), so if the computer changes the intranet, the statically assigned IP must be changed. The picture is as follows: 2. NAT (Network Address Translation) NAT mode can access the Internet just like bridge mode, except that the virtual machine will create a virtual intranet, and both the host and the virtual machine are in this virtual LAN. In NAT, VMWare is equivalent to a switch (generating a local area network in which IP addresses are assigned to the host and virtual machine respectively) step: 1. Set the default gateway of VMVare (equivalent to setting up a router): 2. Set the host IP address, click VMnet8, set the IP address to 192.168.182.1, and the gateway to the gateway set above. 3. Set the network configuration on the Linux virtual machine, the interface is the same as above. cd /etc/sysconfig/network-scripts/ //Enter the network adapter folder mv /ifcfg-ethXXX /ifcfg-eth0 //Change the name to ifcfg-eth0 vi ifcfg-eth0 //Edit file TYPE=Ethernet DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=eth0 UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11 ONBOOT=yes #Turn on automatic network connection, this must be changed IPADDR=192.168.182.3 #Set IP address NETMASK=255.255.225.0 #Set subnet mask GATEWAY=192.168.182.2 #Set gateway DNS1=61.147.37.1 #Set primary DNS DNS2=8.8.8.8 #Set backup DNS BOOTPROTO=static # Enable static IP address, default is dhcp :wq! #Save and exit service network restart #Restart the network ping www.baidu.com #Test whether the network is normal ip addr #Check the IP address Test OK After pinging the network, you can download the ifconfig command yum provides ifconfig # Check which package provides the ifconfig command, showing net-tools yum -y install net-tools #Install the package that provides ifconfig 3. Host-Only (Host-Only Mode) The host mode is very similar to the NAT mode, except that you cannot access the Internet. It is equivalent to VMware virtualizing a LAN, but this LAN is not connected to the Internet. After the virtual machine is installed, if you use xshell to directly drag and drop files, you need to execute the following command Summarize The above is the VMWare virtual machine 15.X LAN network configuration tutorial illustrated by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL Server 8.0.3 Installation and Configuration Methods Graphic Tutorial
>>: js to implement web calculator
This article shares the specific code of JavaScri...
Table of contents 1. Introduction 2. Principle II...
1. Introduction to yum Yum (full name Yellow dogU...
Select or create a subscription message template ...
1. Pull the official 5.0.3 image [root@localhost ...
1. Ubuntu Server 18.04.5 LTS system installation ...
Preface In the Linux kernel, in order to be compa...
summary In some scenarios, there may be such a re...
Table of contents 1. Project Requirements Second,...
This article shares the specific code of react to...
1. Preparation 1.1 Download the Python installati...
This article shares the specific code of native j...
This article shares the specific code of the vue-...
MySQL x64 does not provide an installer, does not...
Q1: What indexes does the database have? What are...