免费注册 查看新帖 |

Chinaunix

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

solaris 路由表问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-04-05 12:29 |只看该作者 |倒序浏览
Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
172.21.100.0         172.16.236.253        UG       1      7


以上是使用route add命令加入的。

现在想做成静态路由。。

应该在gateways文件里面怎么写,?

或者用别的什么方法搞定?

论坛徽章:
0
2 [报告]
发表于 2004-04-05 12:53 |只看该作者

solaris 路由表问题

/etc/defaultrouter

论坛徽章:
0
3 [报告]
发表于 2004-04-05 13:04 |只看该作者

solaris 路由表问题

vi /etc/defaultrouter
172.16.236.253

论坛徽章:
0
4 [报告]
发表于 2004-04-05 14:50 |只看该作者

solaris 路由表问题

这样是单一路由的。。我这台主机是做路由器的。

上面的路由不单单就是我贴出来的这个。。

另外,想问一下有没有知道/etc/gateways文件写法的xd?

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
5 [报告]
发表于 2004-04-05 15:04 |只看该作者

solaris 路由表问题

/etc/gateways文件,每行格式,<>;中为参数:
net <net-name>; [/net-mask] gateway <router-address>; [<metric cost>;] [active | passive]

host <host-name>; gateway <router-address>;  [<metric cost>;] [active | passive]

此文件由routed使用,它只能支持到RIP I.

论坛徽章:
0
6 [报告]
发表于 2004-04-05 15:05 |只看该作者

solaris 路由表问题

u can't add this route info into /etc/defaultrouter
i am sorry i don't know to edit /etc/gateways. but u can try to edit some files such as /etc/profile ; /etc/init.d/inetsvc
u can add the route info in it . i had tried in this way and it realy works.

论坛徽章:
0
7 [报告]
发表于 2004-04-05 15:29 |只看该作者

solaris 路由表问题

我试验过/etc/gateways好像是配合动态路由使用的,静态路由下好像不能生效,我后来是通过
自己增加一个启动文件
/etc/rc2.d/S69routeadd
内容如下
route add x.x.x.x/y z
....

论坛徽章:
0
8 [报告]
发表于 2004-04-05 15:30 |只看该作者

solaris 路由表问题

I can use the "route add" command to do this. but is dynamicly.

And now I wanna be a static route table.

PS:
to Philmoon      
     Would you like give me an example for /etc/gateways file? thks.

论坛徽章:
0
9 [报告]
发表于 2004-04-05 15:34 |只看该作者

solaris 路由表问题

是的呀,我
/etc/rc2.d/S69routeadd
这个文件是我新建的呀,每次开机都会执行的
不就等于 永久静态路由吗,满足你的要求了呀

论坛徽章:
0
10 [报告]
发表于 2004-04-05 15:38 |只看该作者

solaris 路由表问题

昏倒。。。我在sun的网站上面看到可以实现静态多路由的。。
就是上面说的那个gateways文件。
但是现在对gateways文件的具体格式和使用方法不是很清楚。
写脚本是万般无奈的时候才做的。或者说为了省时省力才用的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP