Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Implementation of CentOS8.0 Network configuration

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. The difference between CentOS 7 and CentOS 8 network configuration:

CentOS 8.0.1905 is installed in VMware Workstation 15 Pro, but it is found that there is no network.service in the process of configuring IP address, and there are no script files in / etc/sysconfig/network-scripts directory. Both network.service and NetworkManager.service (NM) are supported in CentOS 7, while network.service has been abandoned in CentOS 8, and the network must be configured through NetworkManager.service.

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

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

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

(1) # nmcli c up ens33

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

(2) # nmcli d connect ens33

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

(3) # nmcli d reapply ens33

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

4. View the connection list: # nmcli c show

5. View connection details: # nmcli c show ens33

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

7. View the device list: # nmcli d

Note: device has 4 statuses

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

(2) disconnected: it has been managed by NM, but currently there is no active connection

(3) unmanaged: not managed by NM

(4) unavailable: unavailable, NM cannot be managed, usually occurs when the Nic link is down (e.g. ip link set ethX down)

8. View all device details: # nmcli d show

9. View the specified device details: # nmcli d show ens33

10. View NM management status: # nmcli n

11. Enable NM management: # nmcli n on

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

Note: for more information on the use of the nmcli command, please refer to # man nmcli or # nmcli-h. For specific object usage such as device, please refer to # man nmcli d or # nmcli d-h.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report