Hmm...I hadn't tried that before, but it does work if I also delete the
interface route i.e. route delete 192.168.1.0/24 192.168.1.2.  However, I
don't know how to make this latter change persistent across reboots since
it's an automatic route definition as a result of an interface.

Another option is to leave the interface route in place, but:
route add 192.168.2.0/25 192.168.1.1
route add 192.168.2.128/25 192.168.1.1
is able to achieve the effect I want since smaller subnets are prioritized
in the routing table.  But does anyone know of a cleaner way to do achieve
this goal?  This feels hacky, even if it does work.  I guess I could add an
rc script to remove the interface route using the first method, but that
feels even hackier than adding two /25 routes.

TIA,
William Yang

> -----Original Message-----
> From: sysadmin-discuss-boun...@opensolaris.org [mailto:sysadmin-discuss-
> boun...@opensolaris.org] On Behalf Of Gopi Desaboyina
> Sent: Thursday, December 03, 2009 12:04 PM
> To: sysadmin-discuss@opensolaris.org
> Subject: Re: [sysadmin-discuss] routing question
> 
> Did you give try with static route ? I think by default it might ignore
> routes if it have network is reachable through any of the interface.
> 
> netstat -nr
> route add 192.168.2.0/24 192.168.1.1
> netstat -nr # any diff here with above o/p ?
> --
> This message posted from opensolaris.org
> _______________________________________________
> sysadmin-discuss mailing list
> sysadmin-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/sysadmin-discuss

_______________________________________________
sysadmin-discuss mailing list
sysadmin-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/sysadmin-discuss

Reply via email to