Article title: describes network settings in Linux. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open source, and other basic categories/etc/sysconfig/network
The main function of this archive is to set "host name (HOSTNAME) and whether to start the Network 」! In general, if you have changed the host name in this file, please be sure to restart (reboot ), this will make all the programs on the system use the latest host name! (On SuSEL, the host name is recorded in/etc/HOSTNAME !)
/Etc/sysconfig/network-scrips/ifcfg-eth0
The content of this file is the file that sets the network card parameters! You can set "network, IP, netmask, broadcast, gateway, IP address acquisition method (DHCP, static) when starting the instance", and whether to start the instance when starting the instance. The ifcfg-eth0 refers to the first network card, and the second network card is the ifcfg-eth1 and so on. (Use/etc/sysconfig/network/ifcfg-eth0 on SuSE ).
/Etc/sysconfig/network
The main function of this archive is to set "host name (HOSTNAME) and whether to start the Network 」! In general, if you have changed the host name in this file, please be sure to restart (reboot ), this will make all the programs on the system use the latest host name! (On SuSEL, the host name is recorded in/etc/HOSTNAME !)
/Etc/resolv. conf
The host name corresponds to the IP address (DNS )! Resolv. conf is the file that sets the dns ip address (name resolution server). it is often mentioned that "I have been able to ping the public IP address of an external computer. why cannot I connect after I enter the website address ?」 The common error is that the settings in this file are incorrect! Please note!
/Etc/hosts
This file records the host name or host alias corresponding to the computer IP address! Note that some services in the regional network need to check the identity of the Client. in this case, the host name corresponds to the IP address. However, because the private reserved IP address is used in the region network, the corresponding IP address of the Hostname cannot be used. in this case, the service will wait for 30 ~ 60 seconds ~ If you can avoid this lookup, or directly tell the host Hostname to correspond to the IP address, you can save the time for this Lookup! Therefore, the line speed in the LAN can be improved without the need for reverse lookup! This hosts is used to set the IP address of the Hostname!
/Etc/hosts
This file records the host name or host alias corresponding to the computer IP address! Note that some services in the regional network need to check the identity of the Client. in this case, the host name corresponds to the IP address. However, because the private reserved IP address is used in the region network, the corresponding IP address of the Hostname cannot be used. in this case, the service will wait for 30 ~ 60 seconds ~ If you can avoid this lookup, or directly tell the host Hostname to correspond to the IP address, you can save the time for this Lookup! Therefore, the line speed in the LAN can be improved without the need for reverse lookup! This hosts is used to set the IP address of the Hostname!
/Etc/protocols
This file defines the relevant information of the IP packet protocol, including the definition of the packet protocol for ICMP, TCP, and UDP.
/Etc/init. d/network restart
This script is the most important! Because you can restart the parameters of the entire network in one breath! He will actively read all network settings, so he can quickly restore the system's preset parameter values.
Ifup eth0 (ifdown eth0)
Start or close a network interface. You can use this simple script to process it! These two scripts will take the initiative to go to the/etc/sysconfig/network-scripts/directory and read the appropriate configuration file for processing! (For example, ifcfg-eth0 ).
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