Detailed examples of Centos6 network configuration

Detailed examples of Centos6 network configuration

**Foreword: **

To achieve permanent custom IP or change DNS, you need to modify the configuration file, mainly modify the following configuration files
/etc/sysconfig/network-scripts/ifcfg-ethX, where X in ifcfg-ethX represents the number of network cards, usually the first one, which is ifcfg-eth0

The following is an explanation of the configuration items, here is the configuration file of custom IP and DNS

DEVICE=eth0#Network card device name
TYPE=Ethernet#Network card type
UUID=06c04617-25d9-4a88-aab0-d8f0028f80ca#Device UUID number
ONBOOT=yes#Whether to start automatically
NM_CONTROLLED=yes#Is it managed by NetworkManager
BOOTPROTO=none#Type of startup{none|dhcp} 
DEFROUTE=yes 
IPV4_FAILURE_FATAL=yes  
IPV6INIT=no 
NAME="System eth0" #Network name
HWADDR=08:00:27:E5:F9:B4 #MAC address
IPADDR=192.168.1.140#Custom ip
PREFIX=24#Subnet mask
GATEWAY=192.168.1.1#Gateway
DNS1=192.168.1.1#Primary DNS
DOMAIN=114.114.114.114 
LAST_CONNECT=1430925668 #Last connection time

When using DHCP to automatically assign IP, just change

BOOTPROTO=none  

To

BOOTPROTO=dhcp 

That's it

After modification, run the following command to restart the network service

[ root@git network-scripts]# /etc/init.d/network restart 

If you have any questions, please leave a message or go to the community of this site to discuss, thank you for reading, hope to help you, thank you for your support to this site!

Recommended Posts

Detailed examples of Centos6 network configuration
Implementation of CentOS8.0 Network Configuration
CentOS 7.0 network configuration
CentOS8 network card configuration file
Detailed explanation of CentOS7 network setting tutorial in vmware
Centos7 installation and configuration of Jenkins
CentOS 8 installation of MariaDB detailed tutorial
Detailed use of nmcli in CentOS8
Detailed explanation of Spark installation and configuration tutorial under centOS7
Centos 7 RAID 5 detailed explanation and configuration
Installation and configuration of redis under centos7
CentOS8 yum/dnf configuration method of domestic sources
Centos7 installation and deployment of Airflow detailed
CentOS6.5 network settings
CentOS7 basic configuration
Centos MySQL8 configuration
Installation and configuration of JDK in CentOS 7 system
CentOS 6.5 system installation and configuration graphic tutorial (detailed graphic)
Centos7 installation of PHP and Nginx tutorial detailed
Centos7.6 dual network card configuration and switching test
Installation and configuration of rsync server under CentOS 6.5
Installation and configuration of CentOS 7 in VMware Workstation
Detailed explanation of building Hadoop environment on CentOS 6.5
Explain the implementation of Centos8 static IP configuration
Detailed tutorial of installing nginx on centos8 (graphic)
IP and network settings of CentOS Linux 7 VMware
Detailed examples of using Python to calculate KS
Distributed deployment of Apollo configuration center under CentOS8
Detailed explanation of static DNS configuration method in Ubuntu
Linux Network Foundation (CentOS7)
Detailed explanation of Centos 7 system virtual machine bridging mode
Xfs configuration on centos7
Ubuntu 18.04 network card configuration
Detailed explanation of static DNS configuration under Ubuntu system
Detailed explanation of Python web page parser usage examples
Network configuration under Ubuntu
Graphical installation of CentOS8
Mysql8.0.15 installation configuration (centos7)
Detailed installation steps of CentOS6.4 system in virtual machine
Tencent cloud centos 8.0 single network card configuration multiple IP
Environment configuration of JDK, mysql and tomcat under Centos7
Equal Insurance Evaluation: Detailed Explanation of Centos Timeout Exit
CentOS 7 network settings --- connectivity
Basic usage and examples of yum under Liunx (centos8) (recommended)
Detailed method of installing Kernel 5.x kernel version on CentOS 8 system
Centos8 minimal deployment and installation of OpenStack Ussuri detailed tutorial
Centos7 installation and configuration prometheus
CentOS 7 installation and configuration PPTP
Deployment of graphite on centos7
Centos6.5 desktop version network settings
CentOS installation and configuration cmake
Graphical centos installation detailed process
Centos7.5 installation and configuration MongoDB4.0.4
CentOS 7 installation and configuration PPTP
Centos7 silent installation of Oracle11g
CentOS mysql configuration master-slave replication
vmware install CentOS 7 detailed tutorial
CentOS 7 Redis 5.0.8 sentinel mode configuration
CentOS environment installation of Docker
Centos network settings in virtualbox
Detailed explanation of quick installation and configuration of Subversion (SVN) under Ubuntu