
A guide that describes how to configure an IP range.
The following tutorial will describe how to easily configure an IP range on CentOS 6/7 operating systems.
Step 1: Check the network interface and assign an IP
#ifconfig & ip a
By default, all Linux servers are provided with one main IP address, as we can see in the screenshot below using the “ip a” command. Alternatively, you can use the “ifconfig” command to see the output.

The IP range is configured on the main network interface. In this case, it’s called “eth0” , so we’ll bond the IP range with it.

Step 2: Go to the path and create a file
#vi/etc/sysconfig/network-scritps/
In Linux, network configuration is located at /etc/sysconfig/network-scripts/ The main network interface configuration file is called ifcfg-$NET-ADAPTER-NAME In this case, it’s ifcfg-eth0

Step 3: Now we need to create the IP range file.
#vi ifcfg-range0
To make the process easier, we’ll create an IP range configuration CentOS file. This will allow us to configure multiple IP addresses with little work. Using your preferred text editor like “vi or vim” , in the path /etc/sysconfig/network-scripts directory, create a file called ifcfg-eth0-range0
Keypoint – To add the second range, you need to create another file called “ifcfg-eth0-range1” with the CLONENUM_START start with 300 (setting up the number in CLONENUM_START is very important here to avoid the ip overwritten

Using that information, let’s configure the IP range file on our operating system:

Save the changes and exit the text writer. If you’ve done everything correctly, you’ll see a new network configuration file has appeared in /etc/sysconfig/network-scripts/ directory:
Step 4: Check the create file
#ls

Step 5: Let’s restart the network service.
Finally, restart the network service using the command below and check the IP configuration again. The IP range is now fully configured:
#service network restart
#systemctl restart NetworkManager

Step 6: Add IP ranges temporarily.
#for i in {3..252}; do ip addr add 213.209.148.$i/24 dev eth0; done
KEY POINT – There is also one shortcut available to add multiple IP ranges with the help of the script below. Using this script, configure any range in the main network interface of the server; in my case, the main interface is “eth0,” but this configuration is temporary; after the server reboots, it will not be there.
#for i in {3..252}; do ip addr add 213.209.148.$i/24 dev eth0; done
Step 7: Verify the IP Range Configuration
After restarting the network service or adding the IP range temporarily, verify that all IP addresses have been assigned successfully.
Run the following command:
ip addr show eth0or
ifconfig eth0You should see the primary IP address along with the additional IP addresses configured on the eth0 interface. If the IP range is not displayed, review your configuration files for syntax errors and restart the network service again.
Step 8: Test Network Connectivity
Once the IP addresses are configured, verify that they are reachable from the network.
You can test connectivity using the ping command:
ping <IP_Address>For example:
ping 213.209.148.3You can also verify that the server is listening on the configured IP addresses using:
ss -tulnpor
netstat -tulnpSuccessful responses indicate that the IP range has been configured correctly.
Common Issues and Troubleshooting
While configuring an IP range on CentOS 6/7, you may encounter some common problems.
IP Addresses Not Appearing
If the additional IP addresses do not appear after restarting the network service:
- Verify that the configuration file is saved in
/etc/sysconfig/network-scripts/. - Check that the filename follows the correct format (for example,
ifcfg-eth0-range0). - Ensure there are no typing or syntax errors in the configuration file.
- Restart the network service.
Network Service Fails to Restart
If the network service does not restart successfully:
- Review the configuration files for invalid parameters.
- Check system logs using:
journalctl -xeor
systemctl status networkCorrect any reported errors before restarting the service.
Duplicate IP Address Conflict
If another device on the network is already using one of the assigned IP addresses, the server may experience connectivity problems.
Always verify that the IP addresses you assign are available and not already in use on your network.
Best Practices
To ensure a stable and reliable CentOS 6 network configuration, follow these recommendations:
- Always create a backup of your existing network configuration files before making changes.
- Use static IP addresses provided by your hosting provider or network administrator.
- Keep your network configuration files well organized and properly documented.
- Restart the network service only during a maintenance window on production servers.
- Test the configuration after every change to avoid unexpected downtime.
- Avoid assigning overlapping IP ranges that may conflict with other devices on the network.
Conclusion
Configuring an IP range on CentOS 6/7 is a straightforward process when the network configuration files are set up correctly. By creating an IP range configuration file, restarting the network service, and verifying the assigned addresses, you can efficiently manage multiple IP addresses on a single network interface.
Whether you need additional IPs for web hosting, virtualization, mail servers, or other network services, properly configuring IP ranges helps improve flexibility and resource management. Following the troubleshooting tips and best practices outlined in this guide will help ensure a reliable and stable CentOS 7 network configuration on your CentOS server.
Frequently Asked Questions (FAQs)
1. What is an IP range in CentOS 6/7?
An IP range is a group of multiple IP addresses assigned to a single network interface. It allows a server to host multiple websites, applications, or services using different IP addresses.
2. Why would I configure an IP range on CentOS?
Configuring an IP range is useful for web hosting, virtualization, email servers, SSL certificates, and applications that require multiple public or private IP addresses on the same server.
3. Which network interface should I use for an IP range?
You should configure the IP range on your primary network interface, such as eth0 or another active interface identified using the ip a or ifconfig command.
4. Where are network configuration files stored in CentOS 6/7?
Network configuration files are located in:
/etc/sysconfig/network-scripts/The primary interface configuration file is typically named ifcfg-eth0.
5. How do I verify that the IP range has been configured successfully?
You can verify the assigned IP addresses by running:
ip addr showor
ifconfigThese commands display all IP addresses configured on your network interfaces.
6. Can I add multiple IP ranges on the same network interface?
Yes. To add another IP range, create an additional configuration file such as ifcfg-eth0-range1 and assign a different CLONENUM_START Value to prevent IP conflicts.
7. Are temporary IP addresses permanent after a reboot?
No. IP addresses added using the ip addr add command are temporary and will be removed after the server restarts. To make them permanent, configure them in the appropriate network configuration files.
8. Why are my additional IP addresses not working?
This may happen due to incorrect configuration, syntax errors, duplicate Configure Multiple IP addresses CentOS, or failure to restart the network service. Verify your configuration files and restart the network service before testing again.
9. How do I restart the network service after configuring an IP range?
On CentOS 6, use:
service network restartOn CentOS 7, you can use:
systemctl restart NetworkManagerOr restart the network service if applicable.
10. Is configuring an IP range on CentOS 6/7 safe?
Yes, as long as you use valid IP addresses assigned by your hosting provider or network administrator. Always back up your existing network configuration files before making changes and verify the settings after configuration.
Suggestions:
- https://mainvps.net/blog/lifetime-web-hosting-2026/
- https://mainvps.net/blog/windows-reseller-web-hosting/
- https://mainvps.net/blog/best-wordpress-hosting-providers/
- https://mainvps.net/blog/linux-vps-hosting-india/
- https://mainvps.net/blog/low-cost-windows-vps-hosting-in-india/
- https://mainvps.net/blog/cheap-dedicated-server-hosting-providers/
- https://mainvps.net/blog/windows-server-guide-dde-dns-tls-1-2-uptime/
- https://mainvps.net/blog/dedicated-server-hosting-netherlands/
- https://mainvps.net/blog/dedicated-server-low-price/
- https://mainvps.net/blog/vps-hosting-in-los-angeles-us/
- https://mainvps.net/blog/dedicated-server-in-nedzone-nl/
- https://mainvps.net/blog/buy-linux-vps-hosting/
- https://mainvps.net/blog/managed-windows-vps-hosting/
- https://mainvps.net/blog/what-is-wmi-provider-host-complete-guide/
- https://mainvps.net/blog/cloud-hosting-vs-vps-2026/
- https://mainvps.net/blog/vps-hosting-for-ecommerce-guide/
- https://mainvps.net/blog/vps-hosting-for-saas-applications/
- https://mainvps.net/blog/vps-reseller-hosting-in-netherlands/
- https://mainvps.net/blog/dedicated-server-hosting-in-us/
- https://mainvps.net/blog/linux-reseller-hosting/
