In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Environment: notebook + home WIFI + company WIFI + VMware + CentOS6.8 + Xshell
Problem description: when learning Linux, I installed a virtual machine (single network card) with a laptop. I want to realize that linux can be connected wirelessly at home and in the company, but I don't want to manually enter IP to log in to Xshell every time after the location changes.
Solution: add a network card (eth2), set eth2 to VMnet1 (host mode host-only only) for Xshell login, and the original network card eth0 is VMnet8 (NAT mode)
Implementation method:
Open the Virtual Network Editor of VM, view the VMnet1 subnet address, and manually change it to 11.11.11.0
Start Linux and log in with root.
Modify eth0 configuration file
# vim / etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0HWADDR=00:0C:29:97:06:BCTYPE=EthernetUUID=24e72ebf-5682-4a8f-87a4-6b53b39a5e0bONBOOT=yes # Boot enable the network card NM_CONTROLLED=yesBOOTPROTO=dhcp # ensure that the DHCP service is enabled to automatically obtain IP
Modify eth2 configuration file
# vim / etc/sysconfig/network-scripts/ifcfg-eth2DEVICE=eth2 # Note that HWADDR (MAC address) and UUID (universal unique identification number Universally Unique Identifier) cannot be repeated with other network cards TYPE=EthernetONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=static # static IP is used for xshell remote login IPADDR=11.11.11.68 # VMnet1 subnet is 30 segments NETMASK=255.255.255.0 # GATEWAY=11.11.11.1 my mistake: network card eth2 cannot add gateway
Restart the network service after the configuration is completed, and check the connection
# service network restart#ping www.qq.com
Ping has proved that it can be connected to the external network, and this scheme is feasible.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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.