book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!







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 Desktop or Openserver.

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.

TCP/IP and NFS FAQ

How do I add a default route?



route add default 10.1.36.1



Hate these ads?

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.





Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


LOD Communications, Inc.

Views for this page
Today This Week This Month This Year  Overall
38209277277 32,417

/SCOFAQ/FAQ_scotec4defaultroute.html copyright 1997-2003 (various) All Rights Reserved

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. We appreciate comments and article submissions.

Publishing your articles here

More:
       - FAQ




Unix/Linux Consultants


http://www.schewanick.com SCO Unix, Solaris, Linx (various), PHP, MySQL, Apache, uniBasic, dL4, Perl, System Administration and more....


http://thatitguy.com Business networking servers, Linux and Unix experts. In business since 1997! Windows and Exchange to Samba and Scalix migration experts.


larryi@ccamedical.com SCO OS5, Debian Linux, RedHat Linux, MySQL, Apache, AJAX development using dXport/dL4/Unibasic, Windows Connectivity, Sharing Resouces, Automation, Shell Scripting



Twitter
o We have this grabber - oversized tongs used to reach high things - my wife dropped it behind the washing machine. A grabber could get it. 7:23 AM Feb 20th 2008








Change Congress