BigAdmin System Administration Portal
Community-Submitted Tech Tip
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

Implementing Persistent IP Forwarding on Solaris Systems

By Michael Peters

This Tech Tip provides straightforward instructions on how to enable persistent IP forwarding on a Solaris system, for routing purposes.
Persistent IP forwarding is necessary if your system is performing network routing to alternate segments that reside on your private network.


System Requirements
  • Hardware: At least two Ethernet interfaces installed on a system running the Solaris Operating System (SPARC or x86 Platform Edition)
  • Software: Solaris Operating System (installed and networked)

Network Example
The following image represents the network topology for this example.
Network Example

Configuration

The following example can be implemented on all Solaris OS Platform Editions:

HOST A

Create a start script in the /etc/rc2.d directory called S99ipforwarding (or any name you choose). Add the following text to the name, depending on your routing requirements, using this syntax format:

ndd  -set  /dev/ip  ip_forwarding  [ 1 or 2 ]

Option number 1 is used if you want IP forwarding turned on regardless of whether the Ethernet interfaces are online or not.

Option number 2 is used if you want IP forwarding turned on only if all the Ethernet interfaces are online.

Add the following entry to /etc/rc2.d/S99ipforwarding:

ndd -set /dev/ip ip_forwarding 1

Change the permissions on the /etc/rc2.d/S99ipforwarding file to 744, with root being the owner and sys being the group.

# chmod 744 /etc/rc2.d/S99ipforwarding.
# chown root /etc/rc2.d/S99ipforwarding.
# chgrp sys /etc/rc2.d/S99ipforwarding.

Basic Usage

You can verify the configuration status by issuing the command ndd ñget /dev/ip ip_forwarding on the command line as root.

The resulting output will be the current state of ip_forwarding 1, 2, or 0.


Questions?
Contact michael.peters@Lazarusalliance.com.

 


The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.


BigAdmin