Files to be modified often have/etc/sysconfig/network-scripts/ifcfg-eth0/etc/resolv. conf/etc/hosts/etc/sysconfig/network this mainly specifies the Gateway NETWORKING = yesNETWORKING_IPV6 = noG files to be modified.
/Etc/sysconfig/network
/Etc/sysconfig/network-scripts/ifcfg-eth0
/Etc/resolv. conf
/Etc/hosts
/Etc/sysconfig/network
The gateway is specified here.
NETWORKING = yes
NETWORKING_IPV6 = no
GATEWAY = 192.168.1.1
HOSTNAME = localhost. localdomain
/Etc/sysconfig/network-scripts/ifcfg-eth0
Here, we mainly specify the IP address acquisition method (static), IP address, subnet mask, and network type.
# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE = eth0
BOOTPROTO = static
IPADDR = 192.168.1.21
NETMASK = 255.255.255.0
TYPE = EthernetGATEWAY = 192.168.1.1
HWADDR = XX: XX
ONBOOT = yes
/Etc/resolv. conf
Specify DNS
Search localdomain
Nameserver 192.168.1.1 /Etc/hosts
Not set. it is used to define the host name.
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