Liunx CentOS How to add a new NIC

Source: Internet
Author: User

1. Add a new network adapter in the virtual machine according to the following two pictures

Two. See if the NIC is recognized!
Vi/etc/udev/rules.d/70-persistent-net.rules #可以看到有两块网卡!

Copy eth1 Card's MC address, next we want to create ifcfg-eht1 file!! (At the beginning, I just can't find this file and depressed for a long time!!) How did not think up oneself create!! ....)

Three create the IFCFG-EHT1 network card configuration file

    cd/etc/sysconfig/network-scripts/

    cp ifcfg-eht0  ifcfg-eht1

 then modify the network card name/MC address/IP address, etc..!! (Because we copy is eth0 network card configuration, pay attention to the above query MAC address, to be modified in ifcfg-eth1, otherwise it will be an error, the second card, can not start

Save exit

Use Ifconfig to see if the new IP has been added

/etc/init.d/network Reload

If you want to restart the network for IP entry:

Service Network restart

This will add success ...

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.