[Email protected] ~]# vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Type=ethernet
Onboot=yes
Uuid=cb2546d2-05fa-44a2-ac1e-c8fa0a9c1c00
Nm_controlled=yes
Bootproto=none
Userctl=no
Ipv4_failure_fatal=yes
Ipv6init=no
Name= "Eth0"
Hwaddr=00:0c:29:c1:30:2a
Peerdns=yes
Peerdns=yes
ipaddr=192.168.208.104
netmask=255.255.255.0
dns2=221.11.1.68
gateway=192.168.208.2
dns1=221.11.1.67
Save
Service Network restart
If it appears
[[email protected] ~]# service network Restart
Shutting down interface Eth0:device eth0 have MAC address 00:0c:29:c1:30:2a, instead of configured address 00:0c:29:f6:52 : E4. Ignoring.
[FAILED]
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface Eth0:device eth0 have different MAC address than expected, ignoring.
[FAILED]
View MAC address cat/sys/class/net/eth0/address
To edit the network card configuration file Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Modify The results of hwaddr to perform cat/sys/class/net/eth0/address
Save and restart the NIC service network restart
[Email protected] ~]# service Network Restart
Shutting down interface eth0: [OK]
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
Bringing up interface eth0:determining if IP address 192.168.208.104 are already in use for device eth0 ... [OK]
CentOS set static IP and problem resolution