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
Prompt support, on New Years Eve of all days. Fixed issue within 10 minutes of submitting.
You can trust your business with AYKsolutions After a horrible experience with my prior host that left me with over 14 hours of downtime, AYKSolutions came in, took care of the transfer completely and made my life easier. When they say their servers are semi-managed, it means they take care of more then most managed server hosting companies. Average ticket response time? 2-5 minutes. One time i n the middle of the night it took 30 minutes. Problems that I create are fixed immediately and they take care of their customers. Artyom is the owner, who is somehow capable of not sleeping. He's always there to take care of everything with a personal touch. 3 AM on a Saturday? Not an issue for AYKSolutions. Trust me, I'm very thorough in researching a company. When it comes to business, you can never be too careful. I trust my business with AYKSolutions
Hi Guys and Gals, I'll just say you all are top notch and go above and behind with support. I've tested many other companies none compare to the expertise you all. Previously I would just get a ticked bumped up to a higher level of tier support etc. with AYK everyone is knowledgeable and prompt. Thank you for offering a premium hosting solution. Warm Regards, Johnny