#route add -net 204.12.16.0 204.12.17.1 -netmask 255.255.255.0
3.缺省路由将寻找一条路由的任务传送到一台路由器。RIP 和RDISC守护进程都可以使用缺省路由。
command format:
route add default hostname -interface interface
eg:增加一条到本地路由器(204.54.56.1)的缺省路由,通常用在添加网关并马上生效
#route add default 204.54.56.1 -interface hme1
动态路由
Solaris 支持路由信息协议(RIP),路由发现协议(RDISC)两种TCP/IP网络标准路由协议 ,RIP是通过in.routed守护进程来实现的,通常
在多用户启动时配置启动。路由守护进程总是建立一个可到达每个网络的路由表。
主机使用RDISC守护进程(in.rdisc)来搜集来自路由器的可用路由信息。in.rdisc通常为响应请求的每一个路由器建立一个缺省路由。
注意:如果要使动态路由启用,前提必须是文件/etc/defaultrouter为空。
in.routed进程通过启动/etc/rc2.d/S69inet中的一行,在使用如下命令的多用户启动时启动。
#/usr/sbin/in.routed -q 初始化后,路由守护进程检查文件/etc/gateways中指定的网关.
#/usr/sbin/in.routed -S
也可以使用-S参数处始化in.routed来实现节省模式,这种方式可以节省并更新的活动路由的数目。但这种方式可能受到网络中路由器故障的困绕。
如果你要想每次重启动后要用,你就把route add.....写到里面去
# cat /etc/rc2.d/S69inet
#!/sbin/sh
#
# Copyright (c) 1995, 1997-1999 by Sun Microsystems, Inc.
# All rights reserved.
#
#pragma ident "@(#)inetinit 1.44 99/10/04 SMI"
#
# This is the second phase of TCP/IP configuration. The first part,
# run in the "/etc/rcS.d/S30rootusr.sh" script, does all configuration
# necessary to mount the "/usr" filesystem via NFS. This includes configuring
# the interfaces and setting the machine's hostname. The second part,
# run in this script, does all configuration that can be done before
# NIS or NIS+ is started. This includes configuring IP routing,
# setting the NIS domainname and setting any tunable parameters. The
# third part, run in a subsequent startup script, does all
# configuration that may be dependent on NIS/NIS+ maps. This includes
# a final re-configuration of the interfaces and starting all internet
| 论坛热门帖子: | [lch203] 写得蛮好的linux学习笔记(10-21) [黑马制造] 学习java的30个目标(10-19) [笑傲股林] 做测试半年了,有点迷茫,应该再学些什么提高自己的测试水平和测试能力呢?(10-19) [udp8589] 大家用google的来吱一声? 用百度的~~也来报道下?(10-18) [沂偌掳兆] 本人总结的一些认为C++比较经典的书籍,希望对大家有用(10-18) |
| TAG标签: | 永久 路由 增加 如何 #59 then fi if amp quot 回复 文件 |
注册
个人空间
