Configuration/etc/sysconfig/network-scripts/ifcfg-ethx [IPV4 article]

Source: Internet
Author: User

For network management in Linux systems, we often use powerful ifconfig commands.

However, the ifconfig command configuration of the network card information, after the network card reboot after the machine restart, the configuration does not exist. In order to keep the above configuration information forever in the computer, it is necessary to modify the network card configuration file. There is a very important member in the configuration file:/etc/sysconfig/network-scripts/ifcfg-ethx (Note: Echx refers to the device name, such as eth0, etc.).

The network information in the Ifcfg-ethx file configuration is still in effect after reboot, it is very useful in network management, now I ifcfg-ethx file IPV4 Network configuration method for simple explanation.

According to the file Ifcfg-eth0 open the command and the following information:

[Root@localhost ~]# Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0#网卡设备名称

Onboot=yes#启动时是否激活 yes | no

Bootproto=static#协议类型 DHCP BOOTP none

ipaddr=192.168.1.90#网络IP地址

netmask=255.255.255.0#网络子网地址

gateway=192.168.1.1#网关地址

broadcast=192.168.1.255#广播地址

hwaddr=00:0c:29:fe:1a:09#网卡MAC地址

Type=ethernet#网卡类型为以太网

Note: After modifying the file Ifcfg-ethx, you will need to re-import the file to take effect, as follows:

[Root@localhost ~]#/etc/init.d/network Reload #命令有start | Restart | Stop | Reload


Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.