Is this a HPUX system?
For many Unix machines, I've seen commands like "netstat -r" to see the routing table and gateways. A gateway will normally have a "G" in its flags.
For the netmask, try commands like "ifconfig net0" (net0 being the first network card).
I don't know if these commands work on a HP system however...