VirtualBox installation CentOS network configuration image: After the CentOS-6.4-i386-minimal.iso is installed, enter the system (is to configure the CentOS in the virtual machine can be connected to the host, but also can be connected to the Internet ), ping error: network is unreachableservice network restart error: Device eth0 does not seem to be present. at the beginning, we also encountered these error prompts. ------------------ record the error myself... 1. configure Host-only and Nat first, as shown in figure
2. view the cat/etc/udev/rules file. d/70-persistent-net.rules 01 [root @ localhost network-scripts] # cat/etc/udev/rules. d/70-persistent-net.rules02 # This file was automatically generated by the/lib/udev/write_net_rules03 # program, run by the persistent-net-generator.rules rules file.04 #05 # You can modify it, as long as you keep each rule on a single06 # line, and change only the value of the NAME = key.07 08 09 # PCI device 0x8086: 0x100e (e1000) 10 SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 08: 00: 27: e2: c7: 25 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth1" 11 12 13 # PCI device 0x8086: 0x100e (e1000) 14 SUBSYSTEM = "net ", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 08: 00: 27: bb: f0: 79 ", ATTR {type} =" 1 ", KERNEL = "eth *", NAME = "eth2" 3. go to the cd/etc/sysconfig/network-scripts directory 3.1 and modify the ifcfg-eth0 file under this file's DEVICE. HWADDR should work with/etc/udev/rule. the eth1 values in d/70-persistent-net.rules are consistent. my ifcfg-eth0 file, modified to: 1 [root @ localhost network-scripts] # cat/etc/sysconfig/network-scripts/ifcfg-eth02DEVICE = eth13HWADDR = 08: 00: 27: e2: C7: 254 TYPE = Ethernet5UUID = Nobody = yes7NM_CONTROLLED = yes8BOOTPROTO = dhcp 3.2 modify the DEVICE of the file in the ifcfg-eth1 file under the directory (created if no, HWADDR and/etc/udev/rule. the eth2 values in d/70-persistent-net.rules are consistent. my ifcfg-eth1 file, modified to: 1 [root @ localhost network-scripts] # cat/etc/sysconfig/network-scripts/ifcfg-eth12DEVICE = eth23HWADDR = 08: 00: 27: BB: F0: 794 TYPE = Ethernet5UUID = 459bb09f-ce67-4276-a510-371dc8b8a12e6ONBOOT = yes7NM_CONTROLLED = yes8BOOTPROTO = dhcp 4. restart the service. Run the ifconfig command and output 01 [root @ localhost network-scripts] # ifconfig02eth1 Link encap: Ethernet HWaddr 08: 00: 27: E2: C7: 2503 inet addr: 192.168.56.103 Bcast: 192.168.56.255 Mask: 0000000000000000004 inet6 addr: fe80: a00: 27ff: fee2: c725/64 Scope: Link05 up broadcast running multicast mtu: 1500 Metric: 106 RX packets: 924 errors: 0 dropped: 0 overruns: 0 frame: 007 TX packets: 500 errors: 0 dropped: 0 overruns: 0 carrier: 008 collisions: 0 txqueuelen: 100009 RX bytes: 90940 (88.8 KiB) TX bytes: 80641 (78.7 KiB) 10 11 12eth2 Link encap: Ethernet HWaddr 08: 00: 27: BB: F0: 7913 inet addr: 10.0.3.15 Bcast: 10.0.3.255 Mask: 255.255.255.014 inet6 addr: fe80: a00: 27ff: febb: f079/64 Scope: Link15 up broadcast running multicast mtu: 1500 Metric: 116 RX packets: 5 errors: 0 dropped: 0 overruns: 0 frame: 017 TX packets: 13 errors: 0 dropped: 0 overruns: 0 carrier: 018 collisions: 0 txqueuelen: 100019 RX bytes: 1066 (1.0 KiB) TX bytes: 1145 (1.1 KiB) 20 21 22lo Link encap: Local Loopback23 inet addr: 127.0.0.1 Mask: 255.0.0.024 inet6 addr: 1/128 Scope: host25 up loopback running mtu: 16436 Metric: 126 RX packets: 0 errors: 0 dropped: 0 overruns: 0 frame: 027 TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 028 collisions: 0 txqueuelen: 029 RX bytes: 0 (0.0 B) TX bytes: 0 (0.0 B)