Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Need to create static routes in HP-UX 10.x

Posted on 2004-10-22
Medium Priority
Last Modified: 2013-12-06
I am trying to create static routes in HP-UX 10.x. I can create the routes however they will not survive a restart (route add net 10.0.x.0 10.0.x.1 1). Any advice on a file I can edit to restore these routes on restart? TIA
Question by:mothman999
LVL 21

Accepted Solution

tfewster earned 500 total points
ID: 12383997
You can use SAM to add the route, which will make it permanent,

Or you can do the same thing manually:

Set the route temporarily with, e.g
route add net netmask 1

Edit /etc/rc.config.d/netconf and add the details in the form:

(Where [1] is a unique number for each route you want to add) so that when the netconf file is read at boot time, the route gets added.

Expert Comment

ID: 12387833
An alternative would be to create a shell script in /sbin/rc3.d/S99static_routes that contains something like:


/sbin/route add net netmask 1
/sbin/route add net netmask 1

P.S. Don't forget to make it executable
LVL 21

Expert Comment

ID: 12387974
True, that would work - But it's not the standard way under HP-UX, and will cause confusion for anyone else trying to support the system ;-)
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 38

Expert Comment

ID: 12396736
agreed with tfewster.

the standard way to do it in HP-UX is to use SAM.

If you manually edit /etc/rc.config.d/netconf  (as http#12383997)  (static routing),
you also need to run:
    /sbin/rc2.d/S340net stop
    /sbin/rc2.d/S340net start

Expert Comment

ID: 12400206
hmmm... You are right it is not the "right" way, not even in Solaris (my orientation). However i have seen this in so many enviroments that it is somehow standard to me :-)

LVL 21

Expert Comment

ID: 12401381
I saw a similar problem on a Sun box last night - A colleague had added swap slices manually and edited /etc/init.d/swapadd to make them permanent - But someone else had created /etc/rc3.d/S99swapadd as a file, _not_ a link to /etc/init.d/swapadd - So when the box rebooted and started Oracle, it immediately ran out of swap & crashed...

Of course, it only took a few minutes to find what the problem was once we booted to single-user. But as the system took 20+ minutes to reboot each time it crashed, a lot of time was wasted overall.  So forgive me if I'm rude about "non-standard" solutions ;-)

Author Comment

ID: 12438532
Thanks muchly!

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

577 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