


An example of implementing static IP login for a virtual machine
Environment: laptop + home WIFI + company WIFI + VMware + CentOS6.8 + Xshell
Problem description: When I first learned Linux, I installed a virtual machine (single network card) on my laptop and wanted to implement Linux at home and in the company They can connect to the Internet wirelessly, but they don’t want to manually enter the IP to log in to Xshell every time after the Internet location changes.
Solution: Add a network card (eth1), set eth1 to VMnet1 (host-only mode) for Xshell login, and the original network card eth0 is VMnet8 (NAT mode)
Implementation Method:
Open the VM's "Virtual Network Editor", check the VMnet1 subnet address, and manually change it to 11.11.11.0
Start Linux and log in as root.
Modify the eth0 configuration file
# vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:0C:29:97:06:BC TYPE=Ethernet UUID=24e72ebf-5682-4a8f-87a4-6b53b39a5e0b ONBOOT=yes #开机启用网卡 NM_CONTROLLED=yes BOOTPROTO=dhcp #确保启用DHCP服务来自动获取IP
Modify the eth1 configuration file
# vim /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 #注意HWADDR(MAC地址)和UUID(通用唯一识别码Universally Unique Identifier)不能与其他网卡重复 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static #静态IP用于xshell远程登录 IPADDR=11.11.11.68 #VMnet1的子网是30段 NETMASK=255.255.255.0 #GATEWAY=11.11.11.1 我的错误点:网卡eth1不能加网关
After the configuration is completed, restart the network service and check the network connection Situation
#service network restart #ping www.qq.com
Ping successfully proves that you can connect to the external network, this solution is feasible.
The above is the detailed content of An example of implementing static IP login for a virtual machine. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

If you encounter an error message when using your printer, such as the operation could not be completed (error 0x00000771), it may be because the printer has been disconnected. In this case, you can solve the problem through the following methods. In this article, we will discuss how to fix this issue on Windows 11/10 PC. The entire error message says: The operation could not be completed (error 0x0000771). The specified printer has been deleted. Fix 0x00000771 Printer Error on Windows PC To fix Printer Error the operation could not be completed (Error 0x0000771), the specified printer has been deleted on Windows 11/10 PC, follow this solution: Restart Print Spool

Table of Contents Solution 1 Solution 21. Delete the temporary files of Windows update 2. Repair damaged system files 3. View and modify registry entries 4. Turn off the network card IPv6 5. Run the WindowsUpdateTroubleshooter tool to repair 6. Turn off the firewall and other related anti-virus software. 7. Close the WidowsUpdate service. Solution 3 Solution 4 "0x8024401c" error occurs during Windows update on Huawei computers Symptom Problem Cause Solution Still not solved? Recently, the web server needs to be updated due to system vulnerabilities. After logging in to the server, the update prompts error code 0x8024401c. Solution 1

How to implement dual WeChat login on Huawei mobile phones? With the rise of social media, WeChat has become one of the indispensable communication tools in people's daily lives. However, many people may encounter a problem: logging into multiple WeChat accounts at the same time on the same mobile phone. For Huawei mobile phone users, it is not difficult to achieve dual WeChat login. This article will introduce how to achieve dual WeChat login on Huawei mobile phones. First of all, the EMUI system that comes with Huawei mobile phones provides a very convenient function - dual application opening. Through the application dual opening function, users can simultaneously

The display error is a problem that may occur in the Xiangxiang Fuzhai app. Some users are not sure why the Xiangxiang Fuzhai app displays errors. It may be due to network connection problems, too many background programs, incorrect registration information, etc. Next, This is the editor’s introduction to how to solve app display errors for users. Interested users should come and take a look! Why does the Xiangxiang Fuzhai app display an error answer: network connection problem, too many background programs, incorrect registration information, etc. Details: 1. [Network problem] Solution: Check the device connection network status, reconnect or choose another network connection to use. Can. 2. [Too many background programs] Solution: Close other running programs and release the system, which can speed up the running of the software. 3. [Incorrect registration information

LinuxOops: Detailed explanation of the meaning of this error, need specific code examples What is LinuxOops? In Linux systems, "Oops" refers to a situation where a serious error in the kernel causes the system to crash. Oops is actually a kernel crash mechanism that stops the system when a fatal error occurs and prints out relevant error information so that developers can diagnose and fix the problem. Oops usually occur in kernel space and have nothing to do with user space applications. When the kernel encounters

How to implement the WeChat clone function on Huawei mobile phones With the popularity of social software and people's increasing emphasis on privacy and security, the WeChat clone function has gradually become the focus of people's attention. The WeChat clone function can help users log in to multiple WeChat accounts on the same mobile phone at the same time, making it easier to manage and use. It is not difficult to implement the WeChat clone function on Huawei mobile phones. You only need to follow the following steps. Step 1: Make sure that the mobile phone system version and WeChat version meet the requirements. First, make sure that your Huawei mobile phone system version has been updated to the latest version, as well as the WeChat App.

The programming language PHP is a powerful tool for web development, capable of supporting a variety of different programming logics and algorithms. Among them, implementing the Fibonacci sequence is a common and classic programming problem. In this article, we will introduce how to use the PHP programming language to implement the Fibonacci sequence, and attach specific code examples. The Fibonacci sequence is a mathematical sequence defined as follows: the first and second elements of the sequence are 1, and starting from the third element, the value of each element is equal to the sum of the previous two elements. The first few elements of the sequence
![Streaming server throws error [FIXED]](https://img.php.cn/upload/article/000/465/014/171133083740341.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
Are you getting a streaming server throwing an error on your computer? Stremio is a cross-platform video streaming service that you can use to stream and watch movies, TV shows, live TV, and more. Some users have reported getting this error when trying to launch the application. Errors can occur under a variety of circumstances, including Internet and server issues. This error may also be encountered when using the web version of Stremio. Interference from antivirus software or firewalls can also cause errors to occur. Whatever the case, you can fix the problem with this guide. Streaming Server Throws Error While running Stremio application on Windows, you may encounter “Stremio Streaming Server threw error
