Home > Operation and Maintenance > CentOS > The centos7 system cannot find the network card

The centos7 system cannot find the network card

王林
Release: 2020-03-16 16:07:26
Original
9567 people have browsed it

The centos7 system cannot find the network card

Question:

After installing the CentOS7 virtual machine, after adding the network card, CentOS 7 has no network card configuration file. After adding the second network card, enter the CentOS 7 system After that, the network card configuration file cannot be seen.

After entering the CentOS7 system, use ip addr to check and find that both enp2s0 and eno1 have IP addresses and can be used normally. eno1 uses a manually configured IP, and ens37 uses an IP address automatically obtained by dhcp, but The ifcfg-enp2s0 configuration file cannot be found in the /etc/sysconfig/network-scripts/ directory.

(Recommended tutorial: centos usage tutorial)

Solution:

1. Use the nmcli con show command to view the UUID information of the network card , write down the UUID value

[root@compute2 ~]# nmcli con show
NAME    UUID                                  TYPE      DEVICE 
eno1    637339a0-5444-46a7-b852-4fb4821955b4  ethernet  eno1   
enp2s0  3d80f469-318c-3864-942e-8d601abb4549  ethernet  --
Copy after login

2. Use the ip addr command to view the network card information, and note down the MAC address of the enp2s0 network card

enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether e8:4e:06:71:99:eb brd ff:ff:ff:ff:ff:ff
Copy after login

3. Change /etc/sysconfig/network-scripts/ Copy the ifcfg-eno1 file in the directory and name it ifcfg-enp2s0. Modify the configuration file again, paying attention to modifying the necessary hardware information.

[root@compute2 network-scripts]# cat ifcfg-enp2s0 
BOOTPROTO=dhcp
NAME=enp2s0
UUID=3d80f469-318c-3864-942e-8d601abb4549
DEVICE=enp2s0
ONBOOT=yes
HWADDR=e8:4e:06:71:99:eb
Copy after login

4. Finally, restart the network card.

service network restart
Copy after login

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of The centos7 system cannot find the network card. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template