How to configure multiple IP addresses in Linux and detect IP conflicts

Source: Internet
Author: User

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:

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.