linux configure a range of IP

In linux, configure multiple IP, usually eth0.0 .. eth0.1 ..eth0.x and so on, so if you want to configure a large number of IP does, so configuration is also possible, but cumbersome, although this situation very little. To add a lot of IP, there are certain provisions, RHCE / CentOS system provides a binding way for fast IP range that we no longer need to create a large number of files, saving time. Such as:
# vim /etc/sysconfig/network-scripts/ifcfg-eth0-range0
IPADDR_START=10.1.0.100
IPADDR_END=10.1.0.200
CLONENUM_START=0
NETMASK=255.255.255.0
IPADDR_START is the first IP, IPADDR_END is the last IP. CLONENUM_START is to be allocated to a set of interfaces start number (in this example are from eth0: 0 start). Activate the card:
# ifdown eth0 && ifup eth0
Reproduced, please indicate the survival time from the operation and maintenance: http://www.ttlsa.com/html/4286.html

Reproduced in: https: //my.oschina.net/766/blog/210936

Guess you like

Origin blog.csdn.net/weixin_33806509/article/details/91492910