Configure static IP address and dns in mongout

Source: Internet
Author: User
If you have the opportunity to build your own server in your local area network to configure a static ip address and dns, you must modify the ip address so that the ip address remains unchanged for future access convenience. Next, let's talk about how to set such an ip address. 1. open/etc/network/interfaceswww.2cto.com...
If you have the opportunity to build your own server in your local area network to configure a static ip address and dns, you must modify the ip address so that the ip address remains unchanged for future access convenience. The following describes how to set such an ip address. open/etc/network/interfaces www.2cto.com 2. note iface eth0 inet dhcp 3. add, please note, modify iface eth0 inet static address 192.168.1.201 netmask 255.255.255.0 gateway 192.168.1.1 4 according to your actual situation. restart eth0, instead of adding sudoifconfig eth0 down ifconfig eth0 up 5 to root. restart the NIC/etc/init. d/networking restart www.2cto.com. The network configuration is complete. However, in subsequent use, the dns server may not be found. how can I set a static dns server? If you modify/etc/resolv. conf, the modification will expire after the machine is restarted and will be overwritten by the default configuration. A more persistent approach is: 1. add/etc/resolvconf/resolv. conf. d/tail2. add nameserver. I recommend two, 8.8.8.8 8.8.4.43. restart dns resolution,/etc/init. d/resolvconf restart
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.