Implementation of CentOS8.0 network configuration

Implementation of CentOS8.0 network configuration

1. Differences in network configuration between CentOS 7 and CentOS 8:

CentOS 8.0.1905 is installed in VMware Workstation 15 Pro, but when configuring the IP address, it is found that the network.service is missing and there are no script files in the /etc/sysconfig/network-scripts directory. CentOS 7 supports both network.service and NetworkManager.service (NM for short) to configure the network, while in CentOS 8, network.service has been abandoned and the network must be configured through NetworkManager.service.

image.png

image.png

2. Simple instructions for using the NetworkManager command line tool nmcli:

1. Check IP (similar to ifconfig, ip a): # nmcli

image.png

2. Three ways to activate the network card (equivalent to ifup):

(1)# nmcli c up ens33

image.png

Note: nmcli c | connection, connection, can be understood as a configuration file, equivalent to ifcfg-ethX or ifcfg-ensX

(2)# nmcli d connect ens33

image.png

Note: nmcli d | device, device, can be understood as the actual network card (including physical network card and virtual network card)

(3)# nmcli d reapply ens33

image.png

3. Disable the network card (equivalent to ifdown): # nmcli c down ens33

4. View the connection list: # nmcli c show

image.png

5. View connection details: # nmcli c show ens33

6. Reload all ifcfg or route to connection (will not take effect immediately): # nmcli c reload

7. View the device list: # nmcli d

image.png

Note: device has 4 states

(1) connected: managed by the NM and currently has an active connection

(2) disconnected: managed by NM, but currently has no active connection

(3) unmanaged: not managed by NM

(4) unavailable: unavailable, NM cannot manage, usually occurs when the network card link is down (such as: ip link set ethX down)

8. View all device details: # nmcli d show

9. View the detailed information of the specified device: # nmcli d show ens33

image.png

10. Check the NM management status: # nmcli n

image.png

11. Enable NM management: # nmcli n on

12. Check whether NM is available online: # nm-online

image.png

Note: For detailed instructions on the use of the nmcli command, refer to # man nmcli or # nmcli -h . For the usage of specific objects such as device , refer to # man nmcli d or # nmcli d -h.

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:
  • CentOS7 network configuration under VMware virtual machine (host wireless Internet access)
  • Tutorial on how to modify the IP address of a Linux virtual machine, check the gateway, and configure the network environment
  • VMWare virtual machine 15.X LAN network configuration tutorial diagram
  • Detailed explanation of the steps for configuring the Centos7 bridge network under VMware
  • Linux beginners in virtual machines configure IP and restart the network
  • Detailed explanation of NAT configuration in Linux network
  • How to configure DNS in Docker's default bridge network
  • Analysis of the process of configuring a simple network environment based on Tcl language

<<:  Real-time refresh of long connection on Vue+WebSocket page

>>:  MySQL database migration quickly exports and imports large amounts of data

Recommend

How are Vue components parsed and rendered?

Preface This article will explain how Vue compone...

Modify the boot time of grub in ubuntu

The online search to modify the grub startup time...

JavaScript timer to achieve limited time flash sale function

This article shares the specific code of JavaScri...

(MariaDB) Comprehensive explanation of MySQL data types and storage mechanisms

1.1 Data Type Overview The data type is a field c...

Introduction and examples of hidden fields in HTML

Basic syntax: <input type="hidden" na...

The implementation process of ECharts multi-chart linkage function

When there is a lot of data to be displayed, the ...

Detailed explanation of Linux kernel macro Container_Of

Table of contents 1. How are structures stored in...

Sample code of uniapp vue and nvue carousel components

The vue part is as follows: <template> <...

How MySQL uses transactions

Basics A transaction is an atomic operation on a ...

How to use async await elegantly in JS

Table of contents jQuery's $.ajax The beginni...

Example of how to import nginx logs into elasticsearch

The nginx logs are collected by filebeat and pass...

Introduction to the use of HTML element noscript

noscript definition and usage The noscript elemen...

Solve the cross-domain problem of get and post requests of vue $http

Vue $http get and post request cross-domain probl...

MySQL Optimization Summary - Total Number of Query Entries

1. COUNT(*) and COUNT(COL) COUNT(*) usually perfo...