Implementation of IP address configuration in Centos7.5

Implementation of IP address configuration in Centos7.5

1. Before configuring the IP address, first use ifconfig to view the network card information and obtain the name of the network card

insert image description here

2. Enter the network card configuration directory

cd /etc/sysconfig/network-scripts/, find the configuration file ifcfg-em2

insert image description here

3. Modify ifcfg-em2 as follows:

insert image description here

TYPE="Ethernet" # Network type, no need to change, the default is Ethernet, meaning Ethernet PROXY_METHOD="none" # Proxy mode: closed BROWSER_ONLY="no" # Just browser: no BOOTPROTO="none" # Boot protocol for network card: DHCP [Chinese name: Dynamic Host Configuration Protocol]
DEFROUTE="yes" # Default route: yesIPV4_FAILURE_FATAL="yes" # Disable IPV4 fatal error detection: noIPV6INIT="yes" # Whether IPV6 is automatically initialized: yesIPV6_AUTOCONF="yes" # Whether IPV6 is automatically configured: yesIPV6_DEFROUTE="yes" # Can IPV6 be the default route: yesIPV6_FAILURE_FATAL="no" # Disable IPV6 fatal error detection: noIPV6_ADDR_GEN_MODE="stable-privacy" # IPV6 address generation model: stable-privacy
NAME="em2" # Network card physical device name UUID="b9cf0ca7-ddc9-4c55-9cea-ce04919f6514" # Universal unique identifier, each network card will have, can not be repeated, otherwise two Linux only one network card can be used DEVICE="em2" # Network card device name, must be the same as the `NAME` value ONBOOT="yes" # Whether to start the network card at boot, if you want the network card to start at boot or control the network card through `systemctl restart network` IPADDR="172.20.41.96" # IP address PREFIX="24" # Configure subnet mask GATEWAY="172.20.41.65" # Gateway DNS1="202.96.209.133" # DNS
IPV6_PRIVACY="no"

4. Restart the network card after the modification is completed

systemctl restart network

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Centos8 bridge static IP configuration method in VMware virtual machine
  • Centos8 (minimum installation) tutorial on how to install Python3.8+pip
  • Detailed explanation of setting static ip network card for CentOS 8 VMware virtual machine to access the Internet
  • Install CentOS7 in VMware (set static IP address) and install mySql database through docker container (super detailed tutorial)
  • Install zip and unzip command functions under Linux and CentOS (server)
  • Detailed explanation of how to configure static IP in Centos8
  • How to set static IP in centOS7 bridge mode
  • CentOS IP connection network implementation process diagram

<<:  Detailed explanation of the pitfalls of MySQL 8.0

>>:  Detailed explanation of the use of Teleport in Vue3

Recommend

Detailed example of MySQL (5.6 and below) parsing JSON

MySQL (5.6 and below) parses json #json parsing f...

Attributes in vue v-for loop object

Table of contents 1. Values ​​within loop objects...

Solution to the problem that the image name is none after Docker load

Recently, I found that after using the docker loa...

Detailed explanation of the usage of scoped slots in Vue.js slots

Table of contents No slots Vue2.x Slots With slot...

Various ways to modify the background image color using CSS3

CSS3 can change the color of pictures. From now o...

How to use Vue3 to achieve a magnifying glass effect example

Table of contents Preface 1. The significance of ...

7 useful new TypeScript features

Table of contents 1. Optional Chaining 2. Null va...

Use of select, distinct, and limit in MySQL

Table of contents 1. Introduction 2. select 2.1 Q...

How to use linux commands to convert and splice audio formats

Install FFmpeg flac eric@ray:~$ sudo apt install ...

Centos7.5 configuration java environment installation tomcat explanation

Tomcat is a web server software based on Java lan...

JavaScript to achieve custom scroll bar effect

In actual projects, the up and down scroll bars a...

The difference between br and br/ in HTML

answer from stackflow: Simply <br> is suffic...

Tips for viewing History records and adding timestamps in Linux

Tips for viewing History records and adding times...

JavaScript canvas to achieve meteor effects

This article shares the specific code for JavaScr...