The/etc/sysconfig/network-scripts/ifcfg-ethx command is used for network management in linux systems. we often use powerful ifconfig commands. However, the NIC information configured by the ifconfig command does not exist after the machine restarts after the NIC is restarted. To manage the network of the above configuration information... configure the/etc/sysconfig/network-scripts/ifcfg-ethx command in linux, we often use the powerful ifconfig command. However, the NIC information configured by the ifconfig command does not exist after the machine restarts after the NIC is restarted. To save the above configuration information to your computer forever, you need to modify the Nic configuration file. The configuration file has a very important member:/etc/sysconfig/network-scripts/ifcfg-ethx (note: echx refers to the device name, such as eth0 ). The network information in the ifcfg-ethx file configuration still takes effect after restart and is quite useful in network management. now I will briefly describe how to configure the IPV4 network in the ifcfg-ethx file.
According to the file ifcfg-eth0 open the Command and the information is as follows: [root @ localhost ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0DEVICE = eth0 # Nic device name www.2cto.com ONBOOT = yes # enable yes at startup | noBOOTPROTO = static # protocol type dhcp bootp noneIPADDR = 192.168.1.90 # network IP address NETMASK = 255.255.255.0 # network subnet address GATEWAY = 192.168.1.1 # GATEWAY address BROADCAST = 192.168.1.255 # BROADCAST address HWADDR = 00: 0C: 29: FE: 1A: 09 # Nic MAC address TYPE = Ethernet # Nic TYPE is Ethernet
Note: after modifying the ifcfg-ethx file, you must re-import the file to take effect. the specific command is as follows: [root @ localhost ~] #/Etc/init. d/network reload # start | restart | stop | reload author julius819
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