In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to configure virtual machine NAT mode network. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Configure the network in NAT mode
There are three network modes in the virtual machine:
1. Bridging
two。 Shared host
3.NAT mode
This time, we will configure the network in NAT mode.
NAT mode network connection structure:
Local IP--VM8 Nic springboard-virtual machine DHCP automatically forwards IP
| |
| |
Set eth0 IP in the virtual machine (eth0 is assigned by the DHCP service of the virtual machine)
The three are in the same network segment.
1. Select NAT mode network in the virtual machine
two。 View local IP
Cmd---ipconfig/all finds the preference IP and remembers the IP. The following figure is an example
3. The network card IP of editing VMware8 is in the same network segment as the query preference IP.
4. Virtual machine-edit-virtual network editor click on, set DHCP service
4.1 set the VM8 network card to share the local network
5. Set virtual machine eth0
[root@hadoop network-scripts] # vi / etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:90:41:12
TYPE=Ethernet
UUID=538ad6cb-6712-46c5-b368-783615bba1c7
ONBOOT=yes
IPADDR=192.168.1.100
NETMASK=255.255.255.0
GATEWAY=192.168.1.2
DNS1=192.168.1.1
NM_CONTROLLED=no
# BOOTPROTO= "static"
BOOTPROTO= "static"-the network is not available this time because it was DHCP before and then changed to static mode.
6. After both the local and virtual machine IP are configured, the network is often still blocked, so the firewall should be considered at this time.
6.1 turn off windows Firewall
6.2 close selinux in linux
Vi / etc/selinux/
Modify SELINUX=disabled
6.3 permanently turn off the firewall
Chkconfig iptables off
Or temporary shutdown.
Service iptables stop
6.4 you need to enable these two services if you shut down before.
6.5 restart the network
Service network restart
Thank you for reading! This is the end of the article on "how to configure virtual machine NAT mode network". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.