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

Example Analysis of Network configuration in Centos7

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article will explain in detail the example analysis of network configuration in Centos7. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Detailed introduction of Centos7 network configuration

1. View the current Nic information

[root@localhost] # nmcli connection showNAME UUID TYPE DEVICEenp0s3 5d58d8cc-8caf-458b-a672-ed0cdf58292e 802-3-ethernet--

The online naming rules have been changed in CentOS7. The specific rules are as follows:

Eno1: represents the network card built by the motherboard BIOS ens1: represents the PCI-E interface built by the motherboard BIOS enp2s0: represents the PCI-E interface of the independent network card, there may be multiple network card interfaces, so there will be S0, S1. Eth0: if none of the above names are applicable, return to the original default network card number

Because the network card is not enabled and the relevant configuration file has not been established, the "-" is displayed in the DEVICE field.

2. Manually configure the network card using the nmcli command

Network information that needs to be configured:

IP address: 192.168.1.98 Gateway: 192.168.1.98DNS:202.96.69.38

Command:

[root@localhost ~] # nmcli connection modify eno1\ > connection.autoconnect yes\ > ipv4.method manual\ > ipv4.address 192.168.1.98\ > ipv4.gateway 192.168.1.1\ > ipv4.dns 202.96.64.68

Autoconnect is to set the auto connection on boot.

Ipv4.method is set to manually configure the IPV4 address

Restart network services

[root@localhost ~] # systemctl restart network

3. View the configured Nic configuration information

This is the end of the article [root@localhost ~] # nmcli connection show eno1 on "sample Analysis of Network configuration in Centos7". I hope the above content can be helpful to you so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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