Usage Environment: Centos 5.5
Centos Network Settings-related profiles: file/etc/sysconfig/network: can set the network open state, default interface, default gateway, host name, domain name directory/etc/sysconfig/ Network-scripts: The control scripts of each network interface, such as Ifcfg-eth0, can set the type of interface, IP, Gateway, MAC, boot state and other files/etc/ RESOLV.CONF: Set the DNS information of the local resolution URL, you can set DNS name server address (up to 3), local domain name, search list, and other files/etc/hosts: Set host name to IP mapping, such as this machine localhost, host name, To another machine domain name or host name. Typically, the name is resolved and the DNS file/etc/nsswitch.conf: You can set the name resolution order (hosts section) to specify whether to search/etc/hosts first or search/etc/resolv.conf defined DNS first
Centos Network Settings related commands: service network restart/stop/start/status: Network Service Management Command network parameter changes need to restart the entire network or corresponding network interface and/etc/init.d/ Network restart equivalent, is to the service script program/etc/init.d/network the operation of various parameters Ifconfig: network interface Management, can view and control network interface status, modify interface parameters, etc. ifconfig ETHX: View the status of a network interface ethx. When you do not specify an interface, it represents viewing all ifconfig ethx down/up: Management (on/off) of a network interface ethx ifconfig ethx inet 192.168.1.11 netmask 255.255.255.0: Modify network settings for an interface netstat: View network usage status (statistics) hostname: Displays or modifies the host name (invalid after reboot) Ping-c 4: How to send ICMP packets to the destination address, To determine whether the target host is working or network traceroute: Tracking Routing path
Reference: "Correct CentOS network Settings Network command" and "Brother Bird's Linux private dish-server erection article."