Use udev to manage NICs in CentOS6.5

Source: Internet
Author: User
The udev configuration file path for managing the NIC using udev is: etc/udev/rules. d/* net *. rules deletes the Nic etc/udev/rules. d/* net *. run the command line "start_udev" to delete the corresponding Nic configuration information.

Use udev to manage NICs

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

  • Delete an Eni

  1. Etc/udev/rules. d/* net *. rules delete the corresponding Nic configuration information

  2. Command line input: start_udev

Add Nic

  1. Etc/udev/rules. d/* net *. rules add the corresponding Nic configuration information (mainly named)

  2. Command line input: start_udev

  3. Configure the Nic ifcfg (see the next step)

  4. Service network restart

  5. If not, start_udev

  6. Failed reboot

     

Configure the NIC

  1. Nic configuration file location:/etc/sysconfig/network-scrips/ifcfg-eth)

  2. Items in the configuration file:

    1. DEVICE = eth0 (Nic nameKey! Used to identify Nics. there must be at least one item with MAC)

    2. BOOTPROTO = none

    3. IPADDR = XXX. XXX

    4. PREFIX (MASK number of digits) = 24/here also available MASK = MASK limit 255.0

    5. GATEWAT = XXX. XXX

    6. NM_CONTROLLED = no (this explanation can be found at the following link, thanks to the original author =)

    7. ONBOOT = yes

    8. TYPE = Ethernet

    9. IPV6INIT = no

    10. USERCTL = no

     

 

You can also enter setup in the command line to perform graphical configuration.

 

 

 

To make this configuration take effect, you need to disable graphical software taking over:

 

Service NetworkManager stop

Chkconfig NetworkManager -- level 35 off (cancel startup)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.