Linux add a NIC address configuration and problems

Source: Internet
Author: User

How to restart slow network adapter service

Turn it off


Service NetworkManager Stop

chkconfig NetworkManager off 
 

about NetworkManager
outer chain: http://www.linuxidc.com/Linux/2013-08/88809.htm


View

Cat/etc/udev/rules.d/70-persistent-net.rules
If the NIC name is duplicated

After installing the CentOS6.5 system in VMware virtual machines, the purified system clones several out to facilitate the later test. Cloning step is very simple, the problem after cloning is the cloned Nic MAC address and the original system MAC address, there will be a conflict in the LAN, you need to change the cloned MAC address.

Explain: In fact, after the clone system has two Nic Eth0 and eth1, the actual effect is Eth1,eth0 is cloned. The clone system will regenerate a MAC address because the system will become eth1 in eth0 plus 1.

Here's how it works:
Software Environment: VMware Workstation 10.0 Virtual Machine CentOS 6.5 physical Machine Windows7

1, first enter the original system, use the command to view the network card information
#ifconfig

Default system boot does not load network card, see eth0 information

650) this.width=650; "alt=" VMware Virtual machine cloning CentOS 6.5 after network card modification method "Src=" http://ugc.qpic.cn/adapt/0/ 81b271c7-0544-33c7-7acf-e2091ed55b67/800?pt=0&ek=1&kp=1&sce=0-12-12 "style=" margin:0px;padding:0px; border:0px;vertical-align:top; "/>

Run command
# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

View the MAC address of the ETH0 network card

Device=eth0
Hwaddr=00:0c:29:16:f4:f0
Type=ethernet
uuid=0b1f4512-cefa-4a9e-ae85-adb2ac2a9903
Onboot=no
Nm_controlled=yes
Bootproto=dhcp

Modifying this onboot=yes setting will load the NIC information
Edit complete, Esc key exit, enter: Wq save exit.

2, the same steps into the clone system, check the network card address, found the same MAC address
Perform
#/etc/init.d/network Restart

Restart Network Service

Hint failed failed

650) this.width=650; "alt=" VMware Virtual machine cloning CentOS 6.5 after network card modification method "Src=" http://ugc.qpic.cn/adapt/0/ F29002ed-035e-1939-1fca-e3563de132b4/800?pt=0&ek=1&kp=1&sce=0-12-12 "vspace=" 5 "width=" 581 "style=" margin:0px;padding:0px;border:0px;vertical-align:top; "/>

3. Edit the network card device
# Vi/etc/udev/rules.d/70-persistent-net.rules

When the following appears, you will see that there are 2 NICs eth0 and Eth1,eth0 for the clone system, eth1 for regeneration
# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:16:f4:f0", attr{type}== "1", kernel== "eth*" , name= "Eth0"

# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:45:97", attr{type}== "1", kernel== "eth*" , name= "Eth1"

Before adding # comment out the first network card, change the 2nd NIC to eth0, record the MAC address.
# PCI device0x1022:0x2000 (Pcnet32)
#SUBSYSTEM = = "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:16:f4:f0", attr{type}== "1", kernel== "eth* ", name=" eth0 "

# PCI device0x1022:0x2000 (Pcnet32)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:45:97", attr{type}== "1", kernel== "eth*" , name= "Eth0"
Edit complete, Esc key exit, enter: Wq save exit.

4. Implementation
#/etc/init.d/network restart

Restart Network Service

Or the hint failed,
#reboot

The problem with rebooting the system is solved.

5. After rebooting the system, run the command
1 #vi/etc/sysconfig/network-scripts/ifcfg-eth0

Modify the MAC Address "00:0c:29:16:f4:f0" to "00:0c:29:52:45:97" to save the exit.
Perform
1 #/etc/init.d/network Restart

Restart Network Service

It's not going to fail now.
650) this.width=650; "alt=" VMware Virtual machine cloning CentOS 6.5 after network card modification method "Src=" http://ugc.qpic.cn/adapt/0/ 3328c63c-5198-55f9-feb2-572428a14ca0/800?pt=0&ek=1&kp=1&sce=0-12-12 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "/>


This article is from the "A New Start" blog, so be sure to keep this source http://anewstart.blog.51cto.com/5591045/1675611

Linux add a NIC address configuration and problems

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.