CentOS set static IP and problem resolution

Source: Internet
Author: User

[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

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.