Search Perform an advanced search query SOFTPEDIA
 
SOFTPEDIA
Updated one minute ago
HomeSubmit a program for being reviewedAdvertise on our websiteGet help on surfing our websitesSend us your feedbackGet information about our XML/RSS backend and how to use itBrowse the news archiveVisit our discussion forumVizitati forumul in limba romana



KLIP
  1. HOME
  2. SCIENCE
  3. TECHNOLOGY
  4. WEBMASTER
  5. SECURITY
  6. MICROSOFT
  7. LINUX
  8. APPLE
  9. GAMES
  10. TELECOMS
  11. REVIEWS
  12. LIFE & STYLE
  13. EDITORIALS
  14. INTERVIEWS
  15. RSS
Welcome!
Hello, Guest

Login if you have a Softpedia.com account.

Otherwise, register for one.

OTHER TIPS, TRICKS AND TUTORIALS

How to Bind a Range of IPs

- Quickly add a range of IPs on Redhat-based systems.

By: Mihai Marinof, Linux Editor

Together with the Internet growth, service providers also evolved, being able to offer larger bandwidth and higher quality connections to their subscribers. Nowadays, almost anyone can get a high bandwidth connection and a class of IPs for a very low price compared to the costs from a few years ago. If you're one of the many people that turned their personal PCs into small servers that provide various services as a small company, then you know how important it is to have a few classes of IPs available. But then again, you should know how to bind a range of IPs to a Linux server so this guide is more for people that want to start a small business using their Linux systems but don't know which way to go. For instance, if you decide you want to turn your Linux system into a server and offer webhosting, mail, dns, ftp etc services, you'll need to know that each domain that will be hosted on your server will need its own unique IP. Not to mention the subdomains and any eventual custom services your clients will require. So before you start anything, you'll have to get a high bandwidth connection and a class of IPs. An IP address class can either be a Class C (245 addresses), a Class B (65,532 addresses) or a Class A (16,777,214 addresses). You decide what you need.

For a small range of IPs, you can manually add each IP to a file called ifcfg-eth0:x, which resides in /etc/sysconfig/network-scripts/. For instance, if you want to add 10 IP addresses, you'll have to create 10 files in that directory, starting with ifcfg-eth0:0 and ending with ifcfg-eth0:10. Each file will contain:

CODE

DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
TYPE=Ethernet


The IPADDR will increase from 192.168.0.2 to 192.168.0.12.

But what if you have to add 100 IP addresses? It could be physically possible to manually add a file for each of them. But how about 1000 IP addresses? Or 10,000? Fortunately, RedHat based systems offer a quick and easy way to bind a range of IPs, eliminating the need to create a lot of files and saving a lot of your time.

Create a file called ifcfg-eth0-range0 in the /etc/sysconfig/network-scripts directory. This file must contain the following strings:

CODE

IPADDR_START=192.168.0.10
IPADDR_END=192.168.0.110
CLONENUM_START=0


Let's see what each of them does:

IPADDR_START: This is the first IP from the address range you want to bind to your ethernet device.
IPADDR_END: This is, of course, the last IP from that address range.
CLONENUM_START: This is the number that will be assigned to the first IP alias interface. For instance, if your Internet interface is eth0 and CLONENUM_START is 0, then this config file will create 100 interfaces starting with eth0:0 (eth0:0, eth0:1, eth0:2 etc) and ending with eth0:100.

NOTE! Be careful if you need to add more ranges of IPs. You'll have to use a proper value for CLONENUM_START. For instance, if you need to add a second range with 100 IPs besides the one above, create a new file called ifcfg-eth0-range1 and set the CLONENUM_START to 101 so an overwrite will be avoided.

After making any changes to any of the files created in the network-scripts directory, you have to run the following command so the changes are applied and the address range is activated:

# service network restart

Good luck!

MORE RELATED ARTICLES: Screencast Guide: Capure Your Linux Desktop on Video! How to Setup an Encrypted Filesystem FreeNX Installation Guide for Fedora 6 Grant Root Privileges to Regular Users Installing NTFS Write Support on Fedora/Ubuntu Setting Up a SHOUTcast Server DSP Plug-In Resetting a Forgotten Root Password
 
Comments | Link here | Subscribe
Print | Send to friend
Today's News | Yesterday's News

Search:

20th December 2006, 08:35 GMT | Copyright (c) 2006 Softpedia | Contact:
Read by 4,302 user(s) | Rating: | 7 vote(s) so far | Cast your vote:
How to Bind a Range of IPs - USER OPINIONS




We are sorry, there are no opinions available for this article.






SHARE YOUR OPINION ABOUT How to Bind a Range of IPs

Since you are not logged on, your comments will have to be approved before being displayed.
Click here to login, or register.
Your Name:
Your Email:
Type in the result:
Your Opinion:
 


DO YOU WANT TO CONTACT US?  

If you have some comments or you want to send us some information you can send us an email directly to .
You can use the form below for the same purpose.
Your full name: (at least 3 characters)
Your email address: (at least 5 characters)
Message subject: (at least 5 characters)
Message text:
(at least 10 characters)
Type in the result:
 
 



© 2001 - 2008 Softpedia. All rights reserved.
Softpedia™ and Softpedia™ logo are registered trademarks of SoftNews NET SRL.
Copyright Information | Privacy Policy | Terms of Use | Contact Softpedia | Update your software | Archive