Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use udev to manage Network Card in CentOS6.5

Shulou Source: shulou.com Published: 2022-06-01 18:33:13 10月03日 Update

This article shows you how to use udev to manage network cards in CentOS6.5. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Use udev to manage the network card

The path to the udev configuration file of the Nic is: etc/udev/rules.d/*net*.rules

Delete the network card

Etc/udev/rules.d/*net*.rules deletes the configuration information of corresponding network card

Command line input: start_udev

Add a network card

Etc/udev/rules.d/*net*.rules adds configuration information of the corresponding network card (mainly naming)

Command line input: start_udev

Configure the network card ifcfg (see next)

Service network restart

If it is not successful, then start_udev

If you don't succeed again, reboot.

Configure the network card

Location of the network card configuration file: / etc/sysconfig/network-scrips/ifcfg-eth* (different numbers are different network cards, and the name is based on the name managed by udev)

Items in the configuration file:

DEVICE=eth0 (network card name key! Used to identify the network card, there must be at least one item with MAC)

BOOTPROTO=none

IPADDR=XXX.XXX.XXX.XXX

PREFIX (number of mask bits) = 24 / MASK=255.255.255.0 is also available here

GATEWAT=XXX.XXX.XXX.XXX

NM_CONTROLLED=no (this explanation is found in the link below, thanks to the original author = =)

ONBOOT=yes

TYPE=Ethernet

IPV6INIT=no

USERCTL=no

You can also enter setup on the command line for graphical configuration

For this configuration to take effect, you need to turn off the graphical software takeover:

Service NetworkManager stop

Chkconfig NetworkManager-- level 35 off (cancel boot)

The above content is how to use udev to manage network cards in CentOS6.5. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Network card configuration management commands files input different success information content name graphics skills knowledge concise concise digits location key no more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia vpn Shulou Tech Info MySQL macOS