CentOS7 static IP configuration

Source: Internet
Author: User
Vi/etc/sysconfig/network-scripts/ifcfg-eno16777736HWADDR = 00: 0C: 29: 8D: 24: 73 TYPE = EthernetBOOTPROTO = static # enable static IP address DEFROUTE = yesPEERDNS = yesPEERROUTES = yes

Vi/etc/sysconfig/network-scripts/ifcfg-eno16777736

 

HWADDR = 00: 0C: 29: 8D: 24: 73

TYPE = Ethernet

BOOTPROTO = static # enable static IP addresses

DEFROUTE = yes

PEERDNS = yes

PEERROUTES = yes

20174_failure_fatal = no

IPV6INIT = yes

IPV6_AUTOCONF = yes

Required 6_defroute = yes

IPV6_PEERDNS = yes

20176_peerroutes = yes

20176_failure_fatal = no

NAME = eth0

UUID = ae0965e7-22b9-45aa-8ec9-3f0a20a85d11

DEVICE = eth0

ONBOOT = yes # enable network connection automatically

IPADDR = 192.168.21.128 # set the IP address

PREFIX = 24 # set the subnet mask

GATEWAY = 192.168.21.2 # set the GATEWAY

DNS1 = 8.8.8.8 # set the primary DNS

 
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.