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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default route fixed 1

Status
Not open for further replies.

telande35

Programmer
Nov 27, 2004
24
BE
hey,

SCO openserver 5.
I set the default route with route change default XXX.X.X.XXX.

Now after a several time (I think a few days). I loose that route. He goes back to the route there was before.

How can I say to SCO that this route is permanent.
Also I think he looses the new route when starting up.

Tkx
Nic
 
Create a file /etc/rc2.d/S99route with execute permission, and containing the following command:

route add default <XXX.X.X.XXX>

That way, the route will be picked up as part of the boot process. HTH.
 
Hey,

That didn't work.

I create a file S99route (in /etc/rc2.d) and put the command
route add default xxx.x.x.xxx
in it

I shutdown and when I look with netstat -rn the default is changed to the old ipadress.

Then I saw a file S99addroute, so I put the command there in, but also no luck.

What did I wrong? Or is there something else to look for?

Thanks in advance
 
Take a lmook at /etc/default/tcp

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
If this machine is not a gateway then make sure that routed is not running.
 
in /etc/default/tcp
DOMAIN=
NETMASK=
BROADCAST=

all empty

How do I know that this machine is a gateway and routed is not running? I am not an exprt in this things.

Thanks
 
Hey,

I don't find in rc2.d the script where my previous college put the default gateway.
I did a grep for that adress in the rc2.d and no-luck.

Could it harm if I do a grep on the whole / directory.
It must be somewhere. It it must be after the execution of the S99route - script (because the default gateway is the old-one)

may I do the following

cd /
find . -a name * -exec grep THEIPADRES {} \;

Our is that not a good way ?

Thanks
 
/etc/default/tcp = blank?

is the machine using dhcp to configure its' nic?
if so then the routes are set by the dhcp server.

what version of sco are you running? uname -X

the find command won't hurt anything, just take a while...

to see if routed is running - type

ps -ef | grep routed
 
>>>Then I saw a file S99addroute, so I put the command there in, but also no luck.

>>>What did I wrong? Or is there something else to look for?

The name of the file is S90iproute
and works off the file below.

# cat /usr/internet/etc/sco_ip/routes
net default nnn.nnn.nnn.nnn

or set up your own Sxxxx routine, pattern it on one of the existing.
 
Unix SCO Openserver release 5

The Unix don't use a dhcp-server.

routed is running

in
/etc/default/tcp

DOMAIN=
NETMASK=
BROADCAST=

Thats all there is in that file.

<<The name of the file is S90iproute
<<and works off the file below.
I see that this file is a script

<<# cat /usr/internet/etc/sco_ip/routes
<<net default nnn.nnn.nnn.nnn

This file I don't find it. There is no subdir sco_ip. I have a file ipal (/usr/internet/etc/ipal)
But this one is not readable.

Otherwise I have also /usr/internet/ip/0.0.0.0
symbolic link httpd-80
symbolic link httpd-443
directory publish
directory sco-mail


 
<<# cat /usr/internet/etc/sco_ip/routes
<<net default nnn.nnn.nnn.nnn

>>>>This file I don't find it. There is no subdir sco_ip. >>>>I have a file ipal (/usr/internet/etc/ipal)
>>>>But this one is not readable.


Take a look at the 1st few lines of the S90iproute, and either make it point to your file with the "net default nnn.nnn.nnn.nnn" or create the directories and file.
Other option is just change the script and force it to take your requirements.
 

LIBDIR=/usr/internet/etc/sco_ip
ROUTEFILE=$LIBDIR/routes

if [ ! -r $ROUTEFILE ]
then
exit 0
fi

that is the beginning of the file, so I can conclude that when he don't find the file routes he exit the script.

And this directory don't exits.
Maybe I can make that directory and the file routes
and put the instruction route add default IPADRES
I think this wil not harm anything (I hope)



 
An little other question.

When previous Post works. That will say that when booting he has my new IP-adress.

But will that also says that when the Unix is up for days (normally we never shutdown), he don't change his IPadres.
Before I changed the IPadres always manually but after a 3 to 4 days IPadres was automatically changed again to the previous one.

Thanks
 
file needs net default nnn.nnn.nnn.nnn

and make directories sco_ip permissions 755
and file routes permissions 644

owned by root and group is sys.


 
Before I changed the IPadres always manually but after a 3 to 4 days IPadres was automatically changed again to the previous one.

Why are you changing the IP address so often? Not really good practice!
 
I know it isn't a good practice. But the reason is that when I did
route change default xxx.xxx.xxx.xxx

after a few days (and there was no shutdown) suddently the IPadres (when I look with netstat) was changed again to the previous one. Nobody did something.

cd /
find . -a name * -exec grep THEIPADRES {} \;

Is that the correct command to find the script with the old IPadres. I like to find him. it is now 10 years I wasn't anymore on this unix machine so I am not sure anymore about that command.

I know tommorow morning if it works what cdlvj wrote.

Thanks.


 
Your find command:
find / -type f | xargs grep "XXX\.X\.X\.XXX"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Let me pput my 2 cents

All computers, from a little PC to a 10 Million $$$ main frame have to be rebooted from time to time.
One way to this automatically in SCO Unix is with this command: shutdown -y -g0 -i6
put this command in crontab and have it running once a week late a nigth.

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top