Linux network settings mainly involves the configuration file: IP-related parameter settings IP-related parameter configuration file for the etcsysconfignetwork-scriptsifcfg-eth0, as shown below: DEVICE = eth0BOOTPROTO = staticBROADCAST = 1010100255 HWADD
Linux network settings mainly involve the following configuration files:
The configuration file for setting IP-related parameters is/etc/sysconfig/network-scripts/ifcfg-eth0, as shown below:
DEVICE = eth0BOOTPROTO = staticBROADCAST = 10.10.100.255HWADDR = 90: B1: 1C: 12: E0: 61 IPADDR = 10.10.100.200NETMASK = 255.255.255.0NETWORK = 10.10.10020.onboot = yes
After the configuration is complete, restart the network service to make it take effect:/etc/init. d/network restartDNS sets the DNS configuration file to:/etc/resolv. conf
Nameserver 8.8.4.4nameserver 8.8.8.8
The configuration file for the host name configuration is/etc/sysconfig/network.
$ Cat/etc/sysconfig/networkNETWORKING = yesNETWORKING_IPV6 = yesHOSTNAME = lx200GATEWAY = 10.10.100.1
To modify the host name, you must restart the server because many system services need to read the file to read the host name. After the host name is modified, you also need to modify the ing between the host name and IP address in the/etc/hosts file.