CentOS single NIC batch add different IP segments

Source: Internet
Author: User

Single NIC bulk add different IP segments
70.39.112.194 adding ip:70.39.112.195-222/70.39.83.226-254

Vi/etc/sysconfig/network-scripts/ifcfg-eth0-range0
Device=eth0
Onboot=yes
Bootproto=static
ipaddr_start=70.39.112.195
ipaddr_end=70.39.112.222
Clonenum_start=0
gateway=70.39.112.193
netmask=255.255.255.224
No_aliasrouting=yes

Service Network restart

ifconfig see ip:70.39.112.195-222 corresponding network card number: eth0:0-eth0:27,
So then batch add IP, Nic from eth0:28 onwards,
Nic Eth0 unchanged, create new file: Ifcfg-eth0-range1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Vi/etc/sysconfig/network-scripts/ifcfg-eth0-range1 #注意这个第二次要变

Device=eth0
Onboot=yes
Bootproto=static
ipaddr_start=70.39.83.226
ipaddr_end=70.39.83.254
Clonenum_start=28 #注意这个第二次要变
gateway=70.39.83.225
netmask=255.255.255.224
No_aliasrouting=yes


This article is from the "Thai Sea Technology" blog, please be sure to keep this source http://taihaikj.blog.51cto.com/3571955/1660567

CentOS single NIC batch add different IP segments

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.