Here's the short answer of how to change hostname and ip address of a DB2 database server.
1. change the file /home/db2inst1/sqllib/db2nodes.cfg with the right hostname. If the server is called sampleserver.ibm.com. The file should have one line with "0 sampleserver.ibm.com 0".2. change your db2 client setting. Execute "db2set -g DB2SYSTEM=sampleserver.ibm.com". Check to see if it was set correctly by executing "db2set -all". If it isn't set, change to root or db2inst1 and try again.3. Execute "db2stop" and "db2start"
Here is a link for details -> FAQ: How do I rename a server that is running DB2?