Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question: How to change an IP address on a SCO server? 2

Status
Not open for further replies.

jamba

MIS
Apr 5, 2001
6
0
0
US
Hi all. Before I start into the question I just want to say thanks for all of the help that people have given me in this newsgroup and with emails. It is all really appriciated.

I have asked this question before here and have gotten good information. I am just a little confused about what is happening.

I have a SCO Open Server 5. I want to change its IP address. Right now it is at a 198 scheme. I am able to ping the loop back address, the server's ip address, the gateway ip address and any pc on the network. When I type netstat -rn to see the local routing table this is what I see:

Destination Gateway Flags Refs Use Interface
default 198.x.x.1 UGS 0 8116 net0
127.0.0.1 127.0.0.1 UH 2 12 lo0
198.x.x.0 198.x.x.4 UC 1 0 net0
198.x.x.4 127.0.0.1 UGHS 4 46 lo0
224 198.x.x.4 UCS 0 0 net0

Everything works fine with this ip scheme. I go into the gui interface to change the IP address of the NIC. It automatically changes the /etc/tcp file. I have changed the /etc/hosts file to have the new ip addresses of the network in it. I then manually change to the /etc/default/tcp file so that it has the correct netmask and broadcast address. When I reboot I get an error message from the portmapper at the 198 ip address. When I type the netstat -rn I get everything except the default route. I add the default address as 10.10.1.1 which is the gateway for the new ip scheme. The problem is that I can't ping the machine's ip address. I can ping 127.0.0.1 and 10.10.1.1, but not 10.10.1.4 or the name of the machine. I have gotten information on all of the files that are responcible for ip addresses and have checked them all and it is still not acting right. Is there a script somewhere in SCO that creates the default ip route? How can I make sure that the new ip address becomes the default route?

I am getting extremely frustrated with this whole process. I must be missing something because I can't imagine that it should be this tough to change an IP address of this server. I would really appriciate any help.


Thank you in advance,

Andy Richards

arichards@bccz.com
 
Andy,

don't know if this will help, but I've placed my default route in /etc/rc2.d/S99route so that it's picked up as one of the last events at boot time. Seems to work OK here.

Good luck.
 
I got the same problem when changing ip-adress through Scoadmin.
I won´t do that again. I always do it manually like this...

Localhost seems to function all right but try these commands anyway.

ifconfig lo0 127.0.0.1 perf 57344 57344 1

ifconfig -p net0 [ip of server] netmask [your netmask] broadcast [broadcast ip] perf 24576 24576 1

/etc/route add 224.0.0.0 [ip of server] 0 > /dev/null 2>&1
(I don´t know if you use multicast but since you have it already...)

/etc/route add 0.0.0.0 [default gateway] 1 > /dev/null 2>&1
(this is the setting that scoadmin lost in my case)

Make sure that netmasks and ip-adresses are correct.
The next time you boot up SCO will read this file, assuming you use runlevel 2, /etc/rc2.d/S85tcp
Look into this file and make the above changes in the section...
#
# Interface configuration -- edit as appropriate.
#

ifconfig lo0 127.0.0.1 perf 57344 57344 1
ifconfig -p net0 [ip of server] netmask [your netmask] broadcast [broadcast ip] perf 24576 24576 1
/etc/route add 224.0.0.0 [ip of server] 0 > /dev/null 2>&1
/etc/route add 0.0.0.0 [default gateway] 1 > /dev/null 2>&1

since you have configured /etc/hosts and /etc/default/tcp I suggest a restart of the server and some wishthinking. /Sören
 
Check out this link. It pretty much sums up your problem.

URL: TA #: 107569
Problem
I have manually run the 'route add default' command to add a default route to the route table. This route works successfully, but I also want this route to be added to the route table automatically whenever the system is rebooted.

Solution
The 'route add default' statement should be added in the /etc/rc2.d directory. In SCO Open Server 3.0, the route add statement was included in /etc/tcp or /etc/rc.d/8/userdef. However, in SCO OpenServer 5.0, some of the startup scripts are executed in parallel which cause some timing issues. Therefore it is recommended that a new file named S99route be created in /etc/rc2.d which includes the route add statement.

# cd /etc/rc2.d
# vi S99route
echo "Setting default route"
/etc/route add default <IP#>

(where <IP#> is the 'gateway' IP address)


# chown root S99route
# chgrp sys S99route
# chmod 744 S99route





-Danny
 
Andy,

All you have to do to keep it each time you re-boot is put the default gateway in /etc/tcp, there is a line in this file that says # Add My Static Route Here, this is what you type in /etc/route add default (gateway is your ip address).

It's important the you ad this after the routed and gated daemons have been started.

I did this and now every time I reboot, everything gets pointed in the right direction.

Hope this helps you.

Treecody
 
to get rid of the portmapper error for your old address make sure there are no entries for it in your /etc/hosts file

HTH
stan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top