免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2467 | 回复: 7
打印 上一主题 下一主题

solaris里的路由配置文件是哪个? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-12 13:47 |只看该作者 |倒序浏览
我需要在sun主机上另外指一条路由,用route add 命令加了,但是这个好像只是临时的,机器重启后还需要重新加。我希望写入配置文件里,麻烦大家告诉一下。谢谢了!

论坛徽章:
0
2 [报告]
发表于 2007-01-12 13:51 |只看该作者
关注中。。。。
俺也不知道,是采用将route写到启动脚本里面解决的。

论坛徽章:
0
3 [报告]
发表于 2007-01-12 13:58 |只看该作者
写一个到/etc/rc3.d目录下,如/etc/rc3.d/S90RouteAdd,里面加上route add命令
#chmod u+x /etc/rc3.d/S90RouteAdd
就可以了;

论坛徽章:
0
4 [报告]
发表于 2007-01-12 14:00 |只看该作者
找到了。应该是修改这个文件:/etc/defaultrouter。
自力更生好啊。

论坛徽章:
0
5 [报告]
发表于 2007-01-12 14:03 |只看该作者
这个只是默认路由。

论坛徽章:
0
6 [报告]
发表于 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

#

-----
一般只在这个文件里加网关

论坛徽章:
0
7 [报告]
发表于 2007-01-12 14:24 |只看该作者
好象没有一个全面的路由配置文件,如果有,哪位高人知道?

论坛徽章:
0
8 [报告]
发表于 2007-01-12 14:47 |只看该作者
原帖由 Lainhearter 于 2007-1-12 14:24 发表
好象没有一个全面的路由配置文件,如果有,哪位高人知道?

没有什么所谓的全面的路由配置文件,我都在/etc/rc3.d里加启动文件
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP