Linux set Static IP

Source: Internet
Author: User

  1. Modify static IP under Ubuntu

    Open a./etc/network/interfaces file and modify it to the following

    Auto Eth0

    Iface eth0 inet Static

    Address 172.30.1.xxx

    Network 255.255.0.0

    Gateway 172.30.1.1


    Add the DNS address, open the/etc/resolvconf/resolv.conf.d/base file, and add DNS as follows

    NameServer 180.76.76.76

    NameServer 8.8.8.8


  2. Modify static IP under CentOS

    Open a./etc/sysconfig/network-scripts/ifcfg-eth0 file and modify it to the following

    Auto Eth0

    Iface eth0 inet Static

    Address 172.30.1.xxx

    Network 255.255.0.0

    Gateway 172.30.1.1


    Add the DNS address, open the/etc/resolv.conf file, and add DNS as follows

    NameServer 180.76.76.76

    NameServer 8.8.8.8

This article is from the "bit Growth" blog, please make sure to keep this source http://xdataplus.blog.51cto.com/3614757/1875087

Linux set Static IP

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.