[Linux] -- configure IP, linux -- ip

Source: Internet
Author: User
Tags change settings

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.