[Linux-1] Centos network profile

Source: Internet
Author: User
1. modify the IP address configuration file path: etcsysconfignetwork-scriptsifcfg-ethx if the computer has only one network port, x is 0. if there are multiple network ports, modify the corresponding file according to the actual situation. The file content is as follows: DEVICE = & quot; eth1 & quot; NM_CONTRO

1. modify the IP address

Configuration file path:/etc/sysconfig/network-scripts/ifcfg-ethx

If the computer has only one network port, x is 0. if there are multiple network ports, modify the corresponding files according to the actual situation.

The file content is as follows:
DEVICE = "eth1"
NM_CONTROLLED = "yes"
ONBOOT = "yes" # yes indicates that the network port is automatically activated when the system starts.
HWADDR = 00: 23: F4: D5: 9A: 00
TYPE = Ethernet
BOOTPROTO = none
IPADDR = 10.15.20.180 # This is the address
PREFIX = 24 # This is the number of mask digits
GATEWAY = 10.5.0.254 # GATEWAY
DNS1 = 8.8.8.8 # This is a DNS, you do not need to write
DEFROUTE = yes
20174_failure_fatal = yes
IPV6INIT = no
NAME = "System eth1"
UUID = 9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04

II. modify DNS

Configuration file path:/etc/resolv. conf

The file content is as follows:
Nameserver 8.8.8.8

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.