How to add multiple IP addresses to configure IP addresses in centos

Source: Internet
Author: User
This article describes how to add multiple IP addresses to centos. For more information, see CentOS.

Log on to SSH as follows:

Copy codeThe code is as follows:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0: 0

The second IP address is

Copy codeThe code is as follows:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0: 1

The third IP address is
Ifcfg-eth0: 2 (and so on)


Copy codeThe code is as follows:
DEVICE = eth0: 0 Nic DEVICE name
Onboot = YES random start
BOOTPROTO = static IP address allocation
IPADDR = *. * The IP address to be added
NETMASK = 255.255.255.0 subnet mask (subject to actual conditions)
GATEWAY = *. * route

If the IP address is continuous, you can use the following method.


Copy codeThe code is as follows:
Vi/etc/sysconfig/network-scripts/ifcfg-eth0-range
DEVICE = eth0
BOOTPROTO = static
IPADDR_START = start IP address
IPADDR_END = end IP address
CLONENUM_START = start number of the NIC
NETMASK = subnet mask
ONBOOT = yes

Save the file and restart the network service.

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.