SCO Unix TCP/IP and NFS FAQ

This article is from a FAQ concerning SCO operating systems. While some of the information may be applicable to any OS, or any Unix or Linux OS, it may be specific to SCO Xenix, Open There is lots of Linux, Mac OS X and general Unix info elsewhere on this site: Search this site is the best way to find anything.

How do I add a default route? (SCO Unix)


route add default 10.1.36.1
 

would set the default route to 10.1.36.1, but that would not survive a reboot.

Prior to 5.0.6, there was no certain place to add this.

Beginning with 5.0.6, you can add the default route in /etc/default/tcp. Just modify the GATEWAY= line, and /etc/tcp will read that. DON'T DO THIS ON PRIOR RELEASES; /etc/tcp doesn't look for that until 5.0.6

Prior to 5.0.6, you have choices. You could add the commands to a start-up file (/etc/rc2.d/S99route, for example: it doesn't exist, but you can create it) or modify the /etc/gateways file (see 'man routed'for the syntax of that file). The disadvantage of /etc/gateways is that it is used by routed, so if you are not running routed, that won't work.

You could also modify /etc/tcp and add your routes after it sets up its default routes. That has the disadvantage of modifying a system file: an upgrade will overwrite that.

SCO OpenServer 5.0.4 adds a /etc/rc2.d/S90iproute script that reads /usr/internet/etc/sco_ip/routes. It's the Internet Manager that can add info to that file, but there's no reason you can't do it manually. The format is simple:

# comments are ok
# simple form
net default 10.1.1.3
# it's smart enough to delete the previous default
net default 192.168.1.2 
# routes to specific hosts
host 192.168.1.8 10.1.1.7
# netmasks optional
net 192.168.1.0 10.1.1.3 255.255.255.0
# if field 1 isn't host or net, it's ignored
happiness 172.16.80.10 10.1.1.1
sanjose 172.16.80.10 10.1.1.1
 

Another advantage of this script is that when called with "stop" (/etc/rc2.d/S90iproute stop), it will delete the routes listed in the file.

The "routed" daemon can reset your routes- disable it (edit /etc/tcp) if you are not using it.

"routed" appears in several places. You want the line between if/fi that actually runs it:

    routed &
    echo "routed \c"
 

I usually make it:

    # routed &
    echo "not starting routed \c"
 

Note:

I have been known to complain when someone responds to a request regarding setting a default route and only mentions the rc2.d method. My reason is that incomplete explanations will only cause problems for someone else.

I think it is particularly important to mention the changes in 5.0.6. Not being aware of that will just cause confusion and trouble for someone who reads that post and implements that advice on a 5.0.6 system. It may not cause trouble for them, but it will for someone who comes along later and is aware of the 5.0.6 method but ignorant of the rc2.d file.

The same is true for someone with 5.0.4 where Internet Manager had been used previously or will be used subsequently - not having the full picture will just cause frustration.

That's why I complain about this type of post: it WILL cause problems for some people, particularly people who lack the general experience and knowledge to figure this out for themselves.

It is truly unfortunate that SCO never addressed the standardization of this much earlier.





(OLDER) <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> How do I add a default route? (SCO Unix)




Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us