Solaris as router between two subnets

I have two networks which is not connected to each other. Each network has its own internet connection. I also have one Solaris machine with two NICs connected to both of the networks.

How do I use the Solaris to connect both network so that hosts from either side of the network can communicate with each other ie. sharing files, telnet etc?

I also wanted the Solaris as an emergency router if one of the internet connection is down, the internet request from host on down connection will be routed automatically to another connection on the other connection, all using the solaris as the router? If it's possible at all. I know there is load balancer / dual wan router available, but those are very expensive.

I have tried setting up the solaris to ip forwarding, but still a ping from host of one network does not reach the host of the other network. I even changed the default gateway on each of the hosts to point to the solaris server.

Please help.

The routed daemon must be running for a Solaris system to become a router.

On Sol10 the svc:/network/routing/route:default must be enabled (svcadm enable ...)

HTH

see if this doc can help you out.
Configuring an IPv4 Router (System Administration Guide: IP Services) - Sun Microsystems

will these hosts be directly connected to the router or will there be a switch involved? if directly connected, i'm wondering if ip multipathing will be the way to go.

If its gonna be DMZ servers, then you will need to open the firewall port specifically to go across to the other subnet. You will also need to place the static route table for the necessary routing:)

Thank you for the response. I will try all the solutions to see which one works best.

As for the response,

The hosts are not directly connected to the router and the they are not in the DMZ. They are within the network and not expose at all.

Please post the version of Solaris. The specifics have changed a lot with Solaris 10.

SunOS solar-server 5.10 Generic_118855-33 i86pc i386 i86pc

You need to enable telnet and ssh within the same subnets.. you can enable sharing of files of remote mounting by using NFS.

Try these:
routeadm -e ipv4-forwarding -u
svcadm enable ipv4-forwarding

Thank you you guys. I'm not in the office to try the suggestion. But I will be doing that when I get back to the office.

Cheers to everyone for all the suggestion.