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/01 Report--
This article mainly introduces how to make VMware ip and native ip in the same network segment, the article is very detailed, has a certain reference value, interested friends must read it!
First confirm the native ip
You can see the message:
Native ip: 192.168.1.162
Gateway: 192.168.1.1
DNS Server: 192.168.1.1
There are two kinds of virtual machine network adapters: VMnet1 and VMnet8.
View virtual machine network adapter
Open the virtual machine workbench:
Right-click the target virtual machine, select Settings, open the Virtual Machine Settings dialog box, and then select Network Adapter
My virtual computer configuration starts with NAT mode, as shown in the following figure
To view the properties of the network adapter, the VMnet8 network adapter is used by default:
As you can see, the ip of the virtual machine is 192.168.232.1, which is not on the same network segment as our native 192.168.1.162, because the network where the virtual machine is located is generally regarded as the local area network.
Ps: virtual machine ip supplement: assume that the ip of the virtual machine is 192.168.232.1, the gateway of the virtual machine is generally 192.168.232.2, and 192.168.232.255 is generally broadcast ip
After confirming the vmware and local ip information, the question has not been answered, so let's officially start the configuration.
Change the vmware network adapter to "bridging mode"
Then click OK to save.
Click the "Advanced" button and you can see that the MAC address of vmware is "00:0C:29:49:40:79". Leave this information first and list it later.
Configure ip for vmware
There is an episode and a problem is found. There is no ifcfg-eth0 file in the / etc/sysconfig/network-scripts directory, only the ifcfg-lo file.
Solution:
Create an ifcfg-eth0 file
Cd / etc/sysconfig/network-scripts touch ifcfg-eth0
Edit the ifcfg-eth0 file
NAME=eth0 file name DEVICE=eth0 alias IPADDR=192.168.1.188 want to set the ip address NETMASK=255.255.255.0 subnet mask NETWORK=192.168.1.0 network, the same network as ip, generally the last bit is 0 GATEWAY=192.168.1.1 gateway BROADCAST=192.168.1.255 broadcast address, the same network as ip, generally the last bit is whether 255ONBOOT=yes is activated at startup, yes, or no USERCTL=no non-root users can control the device Yes or no BOOTPROTO=static network allocation method, static HWADDR=00:0C:29:49:40:79 MAC address, which can be seen earlier in viewing the properties of the virtual machine adapter
After editing, press ESC and enter ": wq" to save it.
Set up dns: vim / etc/resolv.conf
Nameserver 192.168.1.1
Restart eth0 when booting:
Vim / etc/rc.d/rc.local
Write: ifup eth0
Restart network services
Service network restart
Verification
Ping Native ping 192.168.1.162 on the host ping virtual machine ping 192.168.1.188 on the virtual machine ping can ping on the virtual machine, such as ping www.baidu.com, indicating that it has been configured.
The above is all the contents of the article "how to make VMware ip and native ip in the same network segment". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.