In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Recently, we are setting up several virtual machines to learn the related technologies of distribution and big data. First of all, we must set up the virtual machine, the first step is to install the system, and then to configure the network.
Vmware provides us with three network working modes: Bridged (bridging mode), NAT (network address translation mode) and Host-Only (host-only mode).
1. Bridged (bridge mode)
The bridging mode is equivalent to the virtual machine and the host on the same real network segment, and the VMWare acts as a hub function (a network cable is connected to the router connected to the host), so if the computer changes the intranet, the statically assigned ip will be changed. The figure is as follows:
2. NAT (Network address Translation Mode)
NAT mode can access the Internet as well as bridge mode, except that the virtual machine virtualizes an intranet, and the host and virtual machines are in this virtual local area network. VMWare in NAT is equivalent to a switch (creates a local area network in which hosts and virtual machines are assigned ip addresses, respectively)
Steps:
1. Set the default gateway for VMVare (equivalent to setting up the router):
Edit-> Virtual Network Editor-> change Settings-> check VM8 > Click NAT Settings to set the default gateway to 192.168.182.2.
two。 Set the host ip address, click VMnet8, set the ip address to 192.168.182.1, and the gateway is the gateway set above.
3. Set the network configuration on the linux virtual machine and interface it as above.
Cd / etc/sysconfig/network-scripts/ enter mv / ifcfg-ethXXX / ifcfg-eth0 / / name to ifcfg-eth0vi ifcfg-eth0 / / edit the file TYPE=Ethernet DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yesIPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=eth0 UUID=ae0965e7-22b9-45aa-8ec9-3f0a20a85d11 ONBOOT=yes # to enable automatic network connection This must be changed to 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 standby DNS BOOTPROTO=static # enable static IP address, default to dhcp:wq! # Save exit service network restart # restart network ping www.baidu.com # Test whether the network is normal ip addr # check IP address
Test the OK.
After ping connects to the network, you can download the ifconfig command.
Yum provides ifconfig # to see which package provides the ifconfig command, display net-toolsyum-y install net-tools # install the package that provides ifconfig
3. Host-Only (host mode only)
The host mode is very similar to the NAT mode, except that it can not surf the Internet, which is equivalent to VMware virtual local area network, but this local area network is not connected to the Internet.
If you use xshell to directly drag and transfer files after the virtual machine is installed, execute the following command
Yum-y install lrzsz
Summary
The above is the diagram of the VMWare virtual machine 15.X LAN network configuration tutorial introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.