Solved

Sco Unix - Add a permanent route

Posted on 2008-06-19
11
5,955 Views
Last Modified: 2013-12-05
I using an old version SCO Unix and would like to create a route that will not disappear after a reboot.
Is there a 'permanent' flag I can use?
(i.e. 192.168.100.0 192.168.0.1 -p)

Thanks!
0
Comment
Question by:edalzell
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 21826209
you need to add

route add 192.168.100.0 192.168.0.1

to one of the startup scripts in /etc/rc3.d


or run

scoadmin

and go to network setup
0
 
LVL 16

Accepted Solution

by:
Hanno Schröder earned 125 total points
ID: 21829063
No, there is no such option for the route command available (as
with nearly all unix variants). You will have to put your command
into some rc-file.
Either take en existing one and add the line or (better) create a
new file
  /etc/init.d/staticroutes
and (hard) link it to
  /etc/rc2.d/Sxystaticroutes
and
  /etc/rc0.d/Kxystaticroutes
with xy being some number to get it sorted into order with the
files that do already exist on your system.
0
 

Author Comment

by:edalzell
ID: 21830480
Great, I will give that a shot.
Along the same lines... how can I check the gateway?
I suspect the gateway has not been set as the proper route is already configed on the gateway.

Thanks!
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 21831113
what do you mean by "check" the gateway

If you want to see the routes, use
   netstat -rn
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 21831119
if you mean the 'defaultrouter',  you should see the entry "default" in output from
   netstat -rn
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:edalzell
ID: 21833154
Ok, so there's no 'default gateway' then... only routes?
After doing a 'netstat -rn', I see no 'default'... only the various routers to other subnets.

Thanks!
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 21838645
To set the default router, use
    route add default 192.168.0.1
Change the IP address to that of your router.
0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 21851255
Just a small thing:

Most SCO versions do not have an /etc/init.d directory and the default run level is 2 so the startup file would go into /etc/rc2.d

There is a file /etc/default/tcp that has a line for the gateway (sample attached)  If you put the gateway into this file you don't need any startup scripts.  You would use the startup script to add non-default routes however.

# cat /etc/default/tcp


#      @(#)tcp.dfl,v 6.4 1994/10/22 14:49:58 prem Exp - STREAMware TCP/IP  sourc

e

#

# Copyrighted as an unpublished work.

# (c) Copyright 1987-1994 Legent Corporation

# All rights reserved.

#

#      SCCS IDENTIFICATION

#

# DEFAULT TCP parameters

#

# These parameters are read by the TCP startup script as

# default values.

#

# The ROUTER_DAEMON keyword can be used to start your choice of router daemon.

# For example, to use routed, set ROUTER_DAEMON=/etc/routed. You can also

# pass argument to the daemon, using the ROUTER_DAEMON_ARGS keyword. Note

# that is you set ROUTER_DAEMON, it must point to an executable file, which

# is executed by /etc/tcp. Usually, if you set a default GATEWAY, you do not

# set a routing daemon.

#
 

DOMAIN=whoamiwhoareyou.com

NETMASK=255.255.255.0

BROADCAST=192.168.10.255

ROUTER_DAEMON=

ROUTER_DAEMON_ARGS=

GATEWAY=192.168.10.5

DFLTMETRIC=

Open in new window

0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 21851391
Look here for 5.0.6 (about halfway down the page):
http://www.sco.com/support/docs/openserver/506/latenews.html
0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 21851596
Clarification:

Openserver 6 does have /etc/init.d
Up to 5.0.7 it does not (5.0.7 is the latest that I have access to).

uname -a to see the level.
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 21853656
If you create a file in /etc/init.d you must link it to /etc/rc2.d or /etc/rc3.d
to get executed:
  ln  /etc/init.d/myscript  /etc/rc2.d/S45myscript
Change the number (75) and the script's name according to your setup.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now