[Linux] -- configure IP, linux -- ip
Preface
After the previous Virtual Machine installation is complete, you need to configure the corresponding IP address. There are several methods to configure IP addresses. I will not introduce them here for different application scenarios. I would like to give you a recommendation: how to configure ip addresses in CentOS under a virtual machine is different.
As a cainiao, I know the importance of summarization. It takes only a week or two to clearly remember the operation process. Here I will show my learning process, as well as difficulties, mutual learning and mutual improvement!
Tool Installation Process
1. First go to this page
-Edit
-Virtual Network Editor
2. Enable the change settings. Select the NAT mode here. Remember the subnet IP address and subnet mask. Do not modify this part.
3. Open the network and sharing center and check whether the IP configuration of Internet Protocol version 4 of VMnet8 is in the IP segment of the previous step.
4. Confirm the selected mode in VM settings
5. log on to the VM and enter the command: ip addr show to view the Mac address.
6. input the command: ls-a/etc/sysconfig/network-scripts to view the NIC file (Name: ifcfg-eno16777736 ). Note: l in ls is L in lower case
7. Enter the edit Nic FILE command: vi/etc/sysconfig/network-scripts/ifcfg-eno16777736
HWADDR = 00: 0c: 29: ******* // mac address TYPE = Ethernet BOOTPROTO = static (need to be modified) DEFROUTE = yes PEERDNS = yes PEERROUTES = yes route = no route 6init = yes route 6_autoconf = yes route 6_defroute = yes route 6_peerdns = yes route = no NAME = eno16777736 UUID = reboot ONBOOT = yes (need to modify) IPADDR = 192. 168. **. 100 (required) GATEWAY = 192. 168. **. 2 (required) DNS1 = 114.114.114.114 (required)
8. Save and restart the VM. Command: shutdown-r now.
Ping Baidu to check whether it is successful.
Summary
The process of configuring IP addresses is basically complete. It takes a lot of time in the middle of the process, but it is a valuable experience. This article is just a very basic installation tutorial, there are also some tutorials to help you get started. If you have any questions, please contact me.
View comments