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
inline-flex is the same as inline-block. It is a ...
1. Stop the MySQL service in the command line: ne...
1.1 Copy the nginx installation package and insta...
Table of contents Written in front Two-way encryp...
Table of contents What is the reason for the sudd...
When developing a website, you often need to use ...
Preface Many years ago, I was a newbie on the ser...
HTML consists of two parts: head and body ** The ...
Table of contents Preface Error Object throw try…...
grammar: background-image: conic-gradient(from an...
You can view the container logs through the docke...
Preface In fact, the humble "!" has man...
Table label composition The table in HTML is comp...
The new project has basically come to an end. It ...
1. this.$router.push() 1. Vue <template> &l...