Linux IP address failure

Source: Internet
Author: User

Linux IP address failure problems in Linux often use the ifconfig command to set the IP address, but after each setting is complete, the IP address will be cleared after the server is restarted. The specific reason is that the ifconfig configuration only takes effect temporarily and is not written to the system configuration file. If you want the IP address to be persistent, you need to modify the network configuration file. In this article, CentOS 6.3 is used as an example. Different Linux releases may vary. 1. Check the NIC information of the server. The current Nic name and MAC address are displayed. the MAC address is the HWaddr. 2, set the NIC configuration file to enter the/etc/sysconfig/network-scripts directory, view the current directory file, you will find a ifcfg-eth9 file, eth9 corresponds to the network Card Name, if no, a file is created. Add the following information to the corresponding Nic configuration file: DEVICE = "eth9" TYPE = "Ethernet" BOOTPROTO = static HWADDR = "08: 00: 27: CF: 36: f0 "IPADDR = 192.168.56.101 NETMASK = 255.255.255.0 BROADCAST = 192.168.56.255 255.6init = no 255.6_autoconf = no ONBOOT =" yes "Description: whether to activate the nic broadcast address NETMASK subnet mask BOOTPROTO when the ONBOOT system starts, and set static to set dhcp dynamic acquisition. 3. The ifconfig command briefly introduces how to set the IP address ifconfig Nic name IP address netmask subnet mask enable the NIC ifconfig Nic name up disable the NIC ifconfig Nic name down

Related Article

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.