Linux OS IP address modification

Source: Internet
Author: User
Article title: modify the IP address of a Linux operating system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Linux ip address modification code

Modify/etc/sysconfig/network-scripts/ifcfg-eth0

> DEVICE = name, where name is the name of the physical DEVICE.

> IPADDR = addr, where addr is an IP address.

> NETMASK = mask, where mask is the network mask value.

> NETWORK = addr, where addr is the NETWORK address.

> BROADCAST = addr, where addr is the BROADCAST address.

> GATEWAY = addr, where addr is the GATEWAY address.

> ONBOOT = answer, where answer is yes (the device is activated during boot) or no (the device is not activated during boot)

> USERCTL = answer, where answer is yes (non-root users can control this device) or no

> BOOTPROTO = proto, where, proto takes one of the following values: none, no protocol used for guidance; static allocation address; bootp, use BOOTP protocol, or dhcp, use DHCP protocol.

The most important thing is to restart the NIC.

/Sbin/service network restart

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.