Allows you to search a variety of questions and answers
To add the IPs in CentOs, RedHat or Fedora Core:
To add IPs in Linux, you need to create a new file for each IP in
1. # cd /etc/sysconfig/network-scripts/
directory. You will find this directory file with a name ifcfg-eth0 or something close to it.
2. # ls ifcfg-*
3. Open the following file in your favorite editor (I will use vi in this example):
# vi ifcfg-eth0
You will quickly notice your main IP address in that file. IMPORTANT: The layout of the file MUST be in this format.
4. To keep the same format, we will simply create a new file with the same content:
# cp ifcfg-eth0 ifcfg-eth0:1
You now have created the file ifcfg-eth0:1 which we will use for your second IP address. IMPORTANT: As with the contents of the file, the names of the file MUST follow that format (i.e. eth0:1, eth0:2, eth0:3, etc..).
5. Using your editor, open up the file we just created
# vi ifcfg-eth0:1
6. Edit the DEVICE line to be:
DEVICE=eth0:1
7. Edit the IPADDR line to the new IP:
IPADDR=*.*.*.* (put in the actual IP instead of the star symbols)
8. To make this IP usable on boot, make sure that the ONBOOT is set to yes:
ONBOOT=yes
9. Reapeat steps {iv} through {viii} for the other IP addresses you have.
10. When you have added all of the new IP addresses, you can issue one of the two following commands:
# service network restart
or
# /etc/rc.d/init.d/network -reload
If you have a whole range to add, there's a shortcut that can be done:
Create a file called ifcfg-eth0-range0 in the /etc/sysconfig/network-scripts directory. This file must contain the following strings:
Code:
ONBOOT=yes IPADDR_START=FirstIP IPADDR_END=LASTIP CLONENUM_START=0 NETMASK=netmaskGOEShere NO_ALIASROUTING=yes
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, if you have 100 IPs to add.
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. Basically it's the number of ips already added to the box + 1.
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
I recently switched to AYK Solutions from Softlayer for my dedicated server requirements. I received a much better specification server at significantly reduced cost from what Softlayer could offer me, with many of the previously 'extra' features at Softlayer included in the base price offered by AYK. The support was second to none, and they were extremely helpful in transferring all of my old server accounts over for no additional fee whatsoever.
Great response time and excellent service. I've been with AYK for nearly a year now and I couldn't be happier. If you're ready to make the step up from budget hosting to someone that can still work with you to spec out a server for your needs at an extremely competitive price, shoot these guys an email and see what they have available. You will not regret it. With datacenters located all ove r the globe they're certain to have something for you.. or they'll just build it
Great servers, Great Service, Awesome uptime! Our company has been working with AYKSolutions for almost 3 years, hosting several servers for mission-critical projects. The network downtime has been way lower than 30 minutes for OVER 3 years and.. one of our Linux servers scored 450 days of uptime! Needless to say, their Ticket Support always responds in a matter of minutes. At any time of the d ay! I would rate them 10/5 if I could! Kudos to a great company! :)