How can i Configure TCP Keepalive on sun solaris 9 machine?

I've installed sun solaris 9 and i need to know how can i enable TCP Keepalive to ping socket connections every 300 seconds?

Thanks,
Mohammed Amin

Assuming you use ksh:

ndd -set /dev/tcp tcp_keepalive_interval $((300 * 1000))

See "man ndd" and Solaris 2.x - Tuning Your TCP/IP Stack and More for more info.