我需要添加几个静态路由到一个solaris 10框。 在Solaris 9上,我总是通过添加一个初始化脚本来重新应用路由,从而在重新启动时保持这些状态。 随着solaris 10,向SMF添加服务似乎有点矫枉过正。 什么是最好的做法,如何添加一个路线,坚持跨越重启?
route命令在OpenSolaris中有-p选项,我也相信Solaris 10。 从man route :
-p Make changes to the network route tables per- sistent across system restarts. The operation is applied to the network routing tables first and, if successful, is then applied to the list of saved routes used at system startup. In determining whether an operation was successful, a failure to add a route that already exists or to delete a route that is not in the routing table is ignored. Particu- lar care should be taken when using host or network names in persistent routes, as network-based name resolution services are not available at the time routes are added at startup.
我相信它将它们写入到/etc/inet/static_routes文件中,如果它们被成功应用的话。