hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : CentOS 4 Adding a 2nd IP
Reply

Forum Jump

CentOS 4 Adding a 2nd IP

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-18-2007, 10:51 PM
-[OnTarget]- -[OnTarget]- is offline
WHT Addict
 
Join Date: Jun 2006
Posts: 114

CentOS 4 Adding a 2nd IP


Heres the setup:

BoxA has 123.123.123.123 as its main IP

Request another IP allocation from provider, they grant it, how do I add 124.124.124.124 to the box (preferrably without a reboot required) so it is pingable/loadable etc?

Thanks



Sponsored Links
  #2  
Old 02-18-2007, 10:58 PM
DPI DPI is offline
Aspiring Evangelist
 
Join Date: Dec 2002
Location: Chicago
Posts: 369
cd over to /etc/sysconfig/network-scripts

make a file called ifcfg-eth0-range.0 containing:
IPADDR_START=1.2.3.4
IPADDR_END=1.2.3.6
CLONENUM_START=0

save, and restart networking, service network restart The file will create the aliases for you and it's pretty fast and easy.

__________________
-DPI
Chicago's #1 Datacenter Technician

  #3  
Old 02-18-2007, 11:50 PM
-[OnTarget]- -[OnTarget]- is offline
WHT Addict
 
Join Date: Jun 2006
Posts: 114
What if its not a range?
Liek one IP is 12.12.13.148
2nd IP is 12.12.13.154

Dont have the rangers 149-153

Thanks in advance

Sponsored Links
  #4  
Old 02-18-2007, 11:54 PM
spaethco spaethco is offline
Community Guide
 
Join Date: Nov 2005
Location: Minneapolis, MN
Posts: 1,644
In the /etc/sysconfig/network-scripts directory

cp ifcfg-eth0 ifcfg-eth0:1

edit ifcfg-eth0:1, and remove "HWADDR" if present, and adjust the IP address settings to match the IP you want to add, add "ONPARENT=yes".

Then just issue a:

service network restart

and you should be set.

__________________
Eric Spaeth
Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
"The really cool thing about facts is they remain true regardless of who states them." -SpaethCo


Last edited by spaethco; 02-19-2007 at 12:09 AM.
  #5  
Old 02-19-2007, 12:06 AM
-[OnTarget]- -[OnTarget]- is offline
WHT Addict
 
Join Date: Jun 2006
Posts: 114
Its only accepting connections now on the second IP.... ?


Last edited by -[OnTarget]-; 02-19-2007 at 12:11 AM.
  #6  
Old 02-19-2007, 12:13 AM
spaethco spaethco is offline
Community Guide
 
Join Date: Nov 2005
Location: Minneapolis, MN
Posts: 1,644
Quote:
Originally Posted by -[OnTarget]-
Its only accepting connections now on the second IP.... ?
Is "ONPARENT=yes" listed in the eth0:1 config file?

__________________
Eric Spaeth
Enterprise Network Engineer :: Hosting Hobbyist :: Master of Procrastination
"The really cool thing about facts is they remain true regardless of who states them." -SpaethCo

  #7  
Old 02-19-2007, 12:15 AM
-[OnTarget]- -[OnTarget]- is offline
WHT Addict
 
Join Date: Jun 2006
Posts: 114
Nervermind, forgot to add a :1 after eth0

Thanks

Reply

Related posts from TheWhir.com
Title Type Date Posted
Red Hat Takes Active Role in CentOS Project to Drive New Technology Adoption Web Hosting News 2014-01-08 12:00:22
Solar VPS Becomes Official Mirror for Centos and Ubuntu Web Hosting News 2013-04-16 11:03:34
Inerol Solutions Launches XEN VPS Hosting Service Web Hosting News 2013-04-08 12:32:06
Web Host Rackspace Adds FreeBSD 9, CentOS 6.3 Support to Cloud Servers Web Hosting News 2012-07-30 12:47:10
Web Host ServerPronto Donates Hosting Resources to CentOS Web Hosting News 2012-07-05 14:06:27


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?