Linux02:centos7 Configuring static IP

Source: Internet
Author: User
Tags nameserver

Words don't say more directly on the steps

1. Use Ifconfig to view the network card name, IP address, subnet mask

2. Configure DNS
Step:    vi/etc/resolv.conf write the following content nameserver 192.168.0.1 nameserver 8.8.8.8 nameserver 8.8.4.4    
3. Configure the Gateway
Step:    Vi/etc/sysconfig/network write the following:    Networking=yes
Hostname=localhost.localdomain #HOSTNAME的内容通过cat/etc/hostname View
gateway=192.168.0.1
4. Configure static IP
Steps:
Cd/etc/sysconfig/network-scripts
Vim Ifcfg-ens33
Modify the following to read:
Type=ethernet proxy_method=none browser_only=no bootproto= "static" defroute= "yes" ipv4_ Failure_fatal= "No" ipv6init= "no" ipv6_autoconf= "no" ipv6_defroute= "yes" ipv6_failure_fatal= "no " ipv6_addr_gen_mode=stable-privacy name=" ens33 " uuid=" d536b74f-a67c-43f8-946a-156ab4065899 " device= "Ens33" onboot= "yes" ipaddr= "192.168.1.111" gateway= "192.168.0.1" netmask= "255.255.255.0" dns1= 8.8.8.8 dns2=8.8.4.4
5. Restart Network
    Systemctl Restart Network

Configuration complete

Reference Documentation:

Http://www.jb51.net/os/RedHat/189963.html

Linux02:centos7 Configuring 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.