Discussion Locked

How to set Persistent Route on Solaris

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi there,

Just a simple question.
My company have a Solaris machine and I need to configure a persistent route. I can't seem to figure out how to do it. I only manage to figure out how to do a normal route add. But whenever the server is restarted, .....

Anyone can assist? Thanks in advance.

Regards,
Ervin.

5 replies

by ulf c

This is one way to do it...
Create the file /etc/init.d/routes with your static routes.
Example 'routes' file:

#!/bin/sh
#
route add net 192.168.2.0 192.168.1.1 1
route add net 192.168.5.0 192.168.1.1 1

Then create a softlink in /etc/rc3.d to the routes file:

cd /etc/rc3.d
ln -s ../init.d/routes S99routes

The routes will then be activated when the machine is rebooted.

by ken.cunningham

Ensure your router is listed in /etc/defaultrouter and (if using hostname in /etc/defaultrouter)in /etc/hosts. This should then be picked up by /etc/rc2.d/S69inet when the machine reboots. HTH.

This discussion is closed to new replies.