System version: Linux Red Hat 6.3
1. Open Ifcfg-eth0
# cd/etc./sysconfig/network-scripts
# Vim Ifcfg-eth0
2. Modify Ifcfg-eth0
PS: The configuration file associated with the Ethernet card is located in the/etc/sysconfig/network-scripts directory, such as Ifcfg-etho, IFCFG-ETHL, and so on.
3. Check that the network configuration is correct
# ifconfig
Ps:ifconfig is a tool that can be used to temporarily configure the IP address, mask, gateway, physical address, etc. of the network interface, which is very common.
the Ifconfig tool configures the network interface through the parameters of the directive. Ifconfig does not accept any parameters, it outputs the current network interface (i.e. the configuration information in the Ifcfg-eth0 file we modified, such as the first NIC information) .
4. Restart the NIC
#/etc/init.d/networkrestart
5. Stop NetworkManager Service
If the ping does not connect to the LAN, the service will be shut down and the service will be in conflict with network startup.
# Servicenetworkmanager Strop
6. See if the LAN is connected successfully
Linux LAN Setup