What should I do if the network card cannot be bound to an IP address after the Linux backup ifcfg-eth0 file?

  

When Linux backs up the ifcfg-eth0 configuration file, the network fails and the network card cannot be bound to the IP address. This is a special case of network failure, but it is difficult to avoid it. The following is Oracle Linux Server release 5.7. For example, let me introduce the solution for the network card unable to bind the IP address after the Linux backup ifcfg-eth0 file.

When the system is installed, the network is not configured. After the system is installed, the network administrator knows the IP, subnet mask, and gateway information before configuring the network. Before modifying the ifcfg-eth0 NIC configuration file, back up a configuration file to avoid being restored to the original configuration due to improper modification. This is also the cause of the problem

[root@localhost ~]# cd /etc/sysconfig/network-scripts/

[root@localhost network-scripts]# cp ifcfg-eth0 ifcfg-eth0_bak

[root@localhost network-scripts]# more ifcfg-eth0_bak

# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

DEVICE=eth0

BOOTPROTO=dhcp

HWADDR=00:50:56:92:56:05

ONBOOT=yes

Next add IP address, subnet mask, etc.

[root@localhost network-scripts]# vi ifcfg-eth0

# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

DEVICE=eth0

BOOTPROTO= Static

#BROADCAST=192.168.7.255

HWADDR=00:50:56:92:56:05

IPADDR=192.168.7.222

NETMASK =255.255.255.0

ONBOOT=yes

TYPE=Ethernet
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved