免费注册 查看新帖 |

Chinaunix

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

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

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

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

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

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

论坛徽章:
0
5 [报告]
发表于 2007-01-12 14:05 |只看该作者
# man defaultrouter\r\n正在重新格式化页面。请等待... 完成\r\n\r\nFile Formats                                     defaultrouter(4)\r\n\r\nNAME\r\n     defaultrouter - configuration file for default router(s)\r\n\r\nSYNOPSIS\r\n     /etc/defaultrouter\r\n\r\nDESCRIPTION\r\n     The  /etc/defaultrouter file defines the default routers the\r\n     system will use.\r\n\r\n     The format of the file is as follows:\r\n\r\n     The  /etc/defaultrouter file can contain the hostnames or IP\r\n     addresses  of  one  or  more  default  routers, separated by\r\n     white space.  If you use hostnames, each hostname  must also\r\n     be  listed  in  the  local  /etc/hosts file, because no name\r\n     services are running at the time that this script is run.\r\n\r\n     Lines beginning with the ``#\'\' character are treated as com-\r\n     ments.\r\n\r\n     The default routes listed in this file replace  those  added\r\n     by   the   kernel    during   diskless  booting.   An  empty\r\n     /etc/defaultrouter file will cause the default  route  added\r\n     by the kernel to be deleted.\r\n\r\nFILES\r\n     /etc/defaultrouter\r\n           Configuration file  containing  the  hostnames  or  IP\r\n           addresses of one or more default routers.\r\n\r\nSEE ALSO\r\n     hosts(4)\r\n\r\nSunOS 5.8            Last change: 7 Mar 1997                    1\r\n\r\n#\r\n\r\n-----\r\n一般只在这个文件里加网关

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

论坛徽章:
0
7 [报告]
发表于 2007-01-12 14:47 |只看该作者
原帖由 Lainhearter 于 2007-1-12 14:24 发表\r\n好象没有一个全面的路由配置文件,如果有,哪位高人知道?
\r\n没有什么所谓的全面的路由配置文件,我都在/etc/rc3.d里加启动文件
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP