Configure a range of IP
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:
# 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:
The code is as follows:
# ifdown eth0 && ifup eth0
Detecting IP conflicts
Having an IP address conflict means that there is more than one network device or computer with the same IP address. When the server is configured with IP, if the early stage does not do a good job IP address planning, IP address use of detail registration, it is possible to use the IP again allocated to another server.
So how to detect IP address conflicts?
You can use the Arp-scan tool. The tool sends ARP packets within the LAN to collect IP and MAC address information. If an IP address corresponds to multiple MAC addresses, the IP conflict is indicated.
1. Installation:
The code is as follows:
# yum Install Arp-scan
To install the Epel source first.
2. Use: