Static IP configuration process and problem analysis of CentOS virtual machine

Source: Internet
Author: User

The error that occurred:

1. Secure CRT is not connected after securing the IP

2.ping Gateway, but Ping does not pass outside the network, such as www.baidu.com, hint unknown ....

Write in front:

1. Use bridged network to secure IP

2. Use NAT network only DHCP, cannot fixed IP

Solution: 1.vim/etc/sysconfig/network-scripts/ifcfg-eth0

Add the following content

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/70/37/wKioL1W0fA2wkq-sAAGoG0D94Ro097.jpg "Ti tle= "Picture 1.png" alt= "Wkiol1w0fa2wkq-saagog0d94ro097.jpg"/>

2. Add Gateway to/etc/sysconfig/network

650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/70/3A/wKiom1W0ejSi40tSAAB2KfYutbI252.jpg " title= "Picture 2.png" alt= "Wkiom1w0ejsi40tsaab2kfyutbi252.jpg"/>

3. Configure DNS

Vim/etc/resolv.conf

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/37/wKioL1W0fCjgfqGiAADWSizIkwE642.jpg "tit le= "Picture 3.png" alt= "Wkiol1w0fcjgfqgiaadwsizikwe642.jpg"/>

Problems that can occur: After the modification, restart the network service, write the data to the clear Sky

Resolution: Service Networkmanger Stop this service, so it's OK

4. Restart the NIC service

/etc/init.d/network restart

5.ping Gateways and external networks

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/70/37/wKioL1W0fDPgKK8_AAF9d5WMVFE884.jpg "title=" Picture 4.png "alt=" wkiol1w0fdpgkk8_aaf9d5wmvfe884.jpg "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/70/3A/wKiom1W0elWTMQtgAAFlJ2AiXbE667.jpg "title=" Picture 5.png "alt=" wkiom1w0elwtmqtgaaflj2aixbe667.jpg "/>

All right, it's done!!


If there is a problem, please treatise, above only personal opinion!!!


This article is from "Linux rookie" blog, please be sure to keep this source http://asura1992.blog.51cto.com/8159058/1678463

Static IP configuration process and problem analysis of CentOS virtual machine

Related Article

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.