Solaris 10 route add on specific interface

routesolaris-10

I have 2 interfaces on Solaris box

# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.41 netmask ffffff00 broadcast 192.168.1.255
        ether x:x:x:x:x:x
hme1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.1.42 netmask ffffff00 broadcast 192.168.1.255
        ether x:x:x:x:x:x 

# netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0          192.168.1.41         U         1     91  hme0
192.168.1.0          192.168.1.42         U         1      0  hme1
224.0.0.0            192.168.1.41         U         1      0  hme0
default              192.168.1.1          UG        1     91  
127.0.0.1            127.0.0.1            UH        1      0  lo0

hme0 the default interface but i want to specify host 192.168.1.32 to use interface hme1.
i try to use

route add 192.168.1.32 192.168.1.42 -interface hme1

but return

hme1: bad value

any idea how can i solve it?

Best Answer

It seem all giving replies only applicable on Linux platform.

However on Solaris 10, the command which I found it to be work:

route -p <add/delete> <hostname> <gateway> -ifp <interface>