Nic issues caused by vmwarevm cloning Linux
1. Manual Static NIC address configuration does not take effect
2. The NIC name is changed to eth1
[Root @ localhost network-scripts] # ls | grep ifcfg
Ifcfg-eth0
Ifcfg-lo
[Root @ localhost network-scripts] # ifconfig
Eth1 Link encap: Ethernet HWaddr 00: 0C: 29: 3A: 8B: 02
Inet addr: 192.168.1.134 Bcast: 192.168.1.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: fe3a: 8b02/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 5154 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 299 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 529420 (517.0 KiB) TX bytes: 32319 (31.5 KiB)
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Inet6 addr: 1/128 Scope: Host
Up loopback running mtu: 16436 Metric: 1
RX packets: 0 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 0 (0.0 B) TX bytes: 0 (0.0 B)
[Root @ localhost network-scripts] # vim ifcfg-eth0.
DEVICE = eth0
HWADDR = 00: 0C: 29: 52: 39: 18
TYPE = Ethernet
UUID = d12572cd-6808-4cae-b7b6-5480982206e8
ONBOOT = yes
NM_CONTROLLED = yes
BOOTPROTO = static
IPADDR = 192.168.1.119
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
Manually set the static IP address and gateway, save and exit, and then restart the network. An error occurs.
[Root @ localhost network-scripts] # service network restart
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0 '.
[FAILED]
[Root @ localhost network-scripts] #
English-Chinese Translation
No suitable device found: no device found for connection 'System eth0 '.
No suitable device found: No system eth0 connected to the device ".
Summarized the following solutions
Change the eth1 Nic name eth0 displayed in ifconfig and set the static IP Address
Edit/etc/udev/rules. in the d/70-persistent-net.rules file, comment out or delete the configuration line of NAME = "eth0" and change NAME = "eth1" to NAME = "eth0". The modification is as follows:
[Root @ localhost network-scripts] # vim/etc/udev/rules. d/70-persistent-net.rules
# This file was automatically generated by the/lib/udev/write_net_rules
# Program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# Line, and change only the value of the NAME = key.
# PCI device 0x8086: 0x100f (e1000)
# SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 52: 39: 18 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
# PCI device 0x8086: 0x100f (e1000)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 0c: 29: 3a: 8b: 02 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth0"
View the following information
[Root @ localhost network-scripts] # ls | grep ifcfg-
Ifcfg-eth0
Ifcfg-lo
[Root @ localhost network-scripts] # vim ifcfg-eth0.
DEVICE = eth0
HWADDR = 00: 0c: 29: 3a: 8b: 02
TYPE = Ethernet
UUID = d12572cd-6808-4cae-b7b6-5480982206e8
ONBOOT = yes
NM_CONTROLLED = yes
BOOTPROTO = static
IPADDR = 192.168.1.119
NETMASK = 255.255.255.0
GATEWAY = 192.168.1.1
Restart the NIC service.
[Root @ localhost network-scripts] # service network restart
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface eth0: Active connection state: activating
Active connection path:/org/freedesktop/NetworkManager/ActiveConnection/2
State: activated
Connection activated
[OK]
[Root @ localhost network-scripts] # ifconfig
Eth1 Link encap: Ethernet HWaddr 00: 0C: 29: 3A: 8B: 02
Inet addr: 192.168.1.119 Bcast: 192.168.1.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: fe3a: 8b02/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 3833 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 273 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 380984 (372.0 KiB) TX bytes: 45223 (44.1 KiB)
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Inet6 addr: 1/128 Scope: Host
Up loopback running mtu: 16436 Metric: 1
RX packets: 0 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 0 (0.0 B) TX bytes: 0 (0.0 B)