Under Linux, configuring multiple IPs is usually eth0.0. eth0.1.. eth0.x and so on, then if you want to configure a large number of IP, so configuration is also possible, but cumbersome, although this situation is very small.
For the addition of a large number of IP, there are certain provisions, the Rhce/centos system provides a fast way to bind an IP range so that we no longer need to create a large number of files, save time. Such as:
The code is as follows |
Copy Code |
# 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 the starting number of the interface that will be assigned to a series (starting from eth0:0 in this instance).
To activate the network card:
code is as follows |
copy code |
# Ifdown Eth0 && ifup eth0 |