Chinaunix

标题: solaris里的路由配置文件是哪个? [打印本页]

作者: whyljf    时间: 2007-01-12 13:47
标题: solaris里的路由配置文件是哪个?
我需要在sun主机上另外指一条路由,用route add 命令加了,但是这个好像只是临时的,机器重启后还需要重新加。我希望写入配置文件里,麻烦大家告诉一下。谢谢了!
作者: tychj    时间: 2007-01-12 13:51
关注中。。。。
俺也不知道,是采用将route写到启动脚本里面解决的。
作者: deeperpurple    时间: 2007-01-12 13:58
写一个到/etc/rc3.d目录下,如/etc/rc3.d/S90RouteAdd,里面加上route add命令
#chmod u+x /etc/rc3.d/S90RouteAdd
就可以了;
作者: whyljf    时间: 2007-01-12 14:00
找到了。应该是修改这个文件:/etc/defaultrouter。
自力更生好啊。
作者: tychj    时间: 2007-01-12 14:03
这个只是默认路由。
作者: deeperpurple    时间: 2007-01-12 14:05
# man defaultrouter
正在重新格式化页面。请等待... 完成

File Formats                                     defaultrouter(4)

NAME
     defaultrouter - configuration file for default router(s)

SYNOPSIS
     /etc/defaultrouter

DESCRIPTION
     The  /etc/defaultrouter file defines the default routers the
     system will use.

     The format of the file is as follows:

     The  /etc/defaultrouter file can contain the hostnames or IP
     addresses  of  one  or  more  default  routers, separated by
     white space.  If you use hostnames, each hostname  must also
     be  listed  in  the  local  /etc/hosts file, because no name
     services are running at the time that this script is run.

     Lines beginning with the ``#'' character are treated as com-
     ments.

     The default routes listed in this file replace  those  added
     by   the   kernel    during   diskless  booting.   An  empty
     /etc/defaultrouter file will cause the default  route  added
     by the kernel to be deleted.

FILES
     /etc/defaultrouter
           Configuration file  containing  the  hostnames  or  IP
           addresses of one or more default routers.

SEE ALSO
     hosts(4)

SunOS 5.8            Last change: 7 Mar 1997                    1

#

-----
一般只在这个文件里加网关
作者: Lainhearter    时间: 2007-01-12 14:24
好象没有一个全面的路由配置文件,如果有,哪位高人知道?
作者: deeperpurple    时间: 2007-01-12 14:47
原帖由 Lainhearter 于 2007-1-12 14:24 发表
好象没有一个全面的路由配置文件,如果有,哪位高人知道?

没有什么所谓的全面的路由配置文件,我都在/etc/rc3.d里加启动文件




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2