Web Hosting Talk







View Full Version : How to change server allocated IPs


choon
11-30-2002, 08:39 AM
Dear everyone,

I need someone advice on this... I have two servers with a provider. They emailed me that due to the blocks of IPs being blacklisted (the IPs which are allocated to me also get blacklisted)... they are going to reallocate a new set of IPs to both of my servers. Both servers OS are RedHat 7.3.

Yes, I have received both new set of IPs for each of my server. Now, the question here is:

How do I change the allocated IPs on each of my server? Do I follow the following:

1. Change to the configuration directory
# cd /etc/sysconfig
2. Edit the file network to add/change the GATEWAY.
NETWORKING=yes
HOSTNAME=myserverhostname
GATEWAY=123.456.789.12 (example for old IP)
Can I add a new GATEWAY right below the old one? like:
GATEWAY=987.654.321.12 (example of new IP GATEWAY provided by my provider)
3. Change to the network-scripts directory
# /etc/sysconfig/network-scripts
4. Edit the appropiate ifcfg-<interface> file. An example file:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=123.456.789.255 (example for old IP)
IPADDR=123.456.789.123 (example of allocated old IP)
NETMASK=255.255.255.0
NETWORK=123.456.789.0 (example)
ONBOOT=yes
Can I simple add those new allocated IPs instead of changing my current allocated old IPs in those ifcfg-<interface> files?
5. If necessary change /etc/hosts to reflect any change in IP address
6. If necessary, change /etc/resolv.conf to reflect any change in DNS servers.
7. Restart the networking
# service network restart
or
#/etc/init.d/network restart

My intention is to setup the new set of allocated IPs on both of my servers then update my domain registrar about the change of my domain name servers IPs... then wait for them to propagate througout the internet... maybe a week then do a remove of my old allocated IPs including the old GATEWAY... etc...

Can these be done without any downtime for those sites hosted on my servers as both my servers also run its own DNS server for those domains hosted on the same server.

Many thanks in advance ;)

Kindest regards,
Choon

nozol
11-30-2002, 08:56 AM
You need the following set of information

1- new gateway address
2- new IP address
3- new subnet mask address
4- new broadcast address
5- new network address

If you only got a new IP without the other information, then most likely they are still the same, in that case you only need to change the IP address. If you post them here we can help you.


host record changes should take 24 hours to several days, depending on the registrar.

Down time will depend on your ISP.

choon
11-30-2002, 09:24 AM
Hi nozol,

I have followed the steps which I posted earlier on... all are fine/working for reaching those new allocated IPs... I just add in a new GATEWAY in /etc/sysconfig/network file.

Then add in each new IP as usual. I only get the new GATEWAY IP, new allocated IPs and the new NETWORK IP. However with those information, I can guess the new broadcast address, new subnet address ;)

Thanks.

Kindest regards,
Choon