Solve the problem that the NIC cannot be used after the complete clone of centos is created

Source: Internet
Author: User
Tags nameserver

Solve the problem that the NIC cannot be used after the complete clone of centos is created

1. log on to the cloned Virtual Machine

2. Confirm the gateway address

Command: more/etc/resolv. conf

; Generated by/sbin/dhclient-script
Search localdomain
Nameserver 192.168.246.2 # gateway address

3. modify the configuration file: 70-persistent-net.rules

Command: vi/etc/udev/rules. d/70-persistent-net.rules

Use # To comment out the eth0 Configuration

Change the last eth1 to eth0 and remember the address in ATTR {address} = "00: 0C: 29: 83: 37: 96 ".

After modification, save and release

4. Modify Nic configuration information

Command: vi/etc/sysconfig/network-scripts/ifcfg-eth0

Edit configuration file

DEVICE = eth0
HWADDR = 00: 0C: 29: 83: 37: 96 # ATTR {address }={ 00: 0C: 29: 83: 37: 96}
TYPE = Ethernet
UUID = 7b3debca-6efe-49a1-9d84-4642b8ed883e
ONBOOT = yes
NM_CONTROLLED = yes
BOOTPROTO = static
HOSTNAME = caixen2
BROADCOST = 192.168.246.255
NETWORK = 192.168.246.0
IPADDR = 192.168.246.132
NETMASK = 255.255.255.0

GATEWAY = 192.168.246.2 # nameserver 192.168.246.2

Save and exit

5. Command: reboot is restarted and configuration is complete.

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.