Web Hosting Talk







View Full Version : How to use several IPs in 1 dedicated???


Emin
04-16-2004, 04:44 AM
My Hosting gave me 1 main IP which I can ping and also 7 additional IPs...

But when i trying to ping this 7 IPs, ping fail!

May be I need to make something in server - how to?

OS Linux RH 9

Heymish
04-16-2004, 04:47 AM
Ok, first up we need some additional info here.

I assume you are talking about a dedicated server here, rather than a shared hosting. Is this true ? or are you on a VPS.

If this is so, you will need to add this manually via ssh. But please let us know if this the case first

Emin
04-16-2004, 04:52 AM
No, I have full managed dedicated server P4 2.4, RAM 512, 80Gb.

Of course I have ssh, but don`t know which file i need to edit....

I have edited /etc/hosts - but this didn`t help me (this file have IPs which must point to another servers like DNS)...

What I need to make???

RSanders
04-16-2004, 07:23 AM
Redhat

/etc/sysconfig/network-scripts/

The files are ifcfg-eth{0/1}
you need to create the files,
ifcfg-eth{0/1}:0

i.e ifcfg-eth0:0 ifcfg-eth0:1, and so on.

the :{1/2/3/4/5} are called virtual interfaces, and allow you to bind additional IP's to one interface.

ifcfg-eth0 will be your main IP, or ifcfg-eth1 depending on your configuration.

Redhat will reconize these files in this format, and start them on boot with the proper routing. After you create them, you can bring it up for the first time with
ifup eth0:0
ifup eth0:1
and so on.


]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=1.2.3.4
NETMASK=255.255.255.0
GATEWAY=1.2.3.1

RSanders
04-16-2004, 07:24 AM
No, I have full managed dedicated server P4 2.4, RAM 512, 80Gb.

Also, if you have a MANAGED server, why the heck doesn't your host add them for you?

noc32
04-16-2004, 08:16 AM
If you have WHM/CPanel login in WHM with root -> IP Functions -> Add New IP Address and this way you can add all your others 7 IP's.

rsanders solution is ok... but it's a lot more easier through WHM if you have it and ofcourse you're not familiar with Linux.

Emin
04-16-2004, 10:19 AM
Coool :)

It works!!!

Thanks!