reply-to VS route-to

在OpenBSD环境下搭建各种服务器的相关讨论。

版主: lionuxchenjun天地乾坤

回复
chenjun
铁 Fe
帖子: 56
注册时间: 2010-08-31 17:38

reply-to VS route-to

帖子 chenjun » 2011-02-25 18:17

请教一下,reply-to和route-to的区别在哪?在OB的pf.conf手册中有如下介绍
[HTML] reply-to
The reply-to option is similar to route-to, but routes packets that
pass in the opposite direction (replies) to the specified
interface. Opposite direction is only defined in the context of a
state entry, and reply-to is useful only in rules that create
state. It can be used on systems with multiple external
connections to route all outgoing packets of a connection through
the interface the incoming connection arrived through (symmetric
routing enforcement).

route-to
The route-to option routes the packet to the specified interface
with an optional address for the next hop. When a route-to rule
creates state, only packets that pass in the same direction as the
filter rule specifies will be routed in this way. Packets passing
in the opposite direction (replies) are not affected and are routed
normally.[/HTML]
英文水平不好,理解的不是太清楚,望高手指点一下

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

帖子 leo » 2011-02-25 23:03

大家全一样,英语是母语的也不来这,具体是哪里不明白?
很久不碰PF了,但愿没有理解错误:
reply-to
[INDENT]reply-to选项与route-to类似, 不过反向路由数据包时(发送应答数据包时)
发送到指定的网络接口。这里所谓的反向只是相对于一个状态项而言, 而且
reply-to仅在产生状态的规则里才有用处。它可以在具有多个外部连接的系
统上路由抵达至某个特定接口的进站连接的所有出站数据包
(symmetric routing enforcement).
[/INDENT]route-to
[INDENT]route-to选项将数据包路由到带有目标地址的指定接口。当一个route-to规
产生了状态, 只对那些符合规则指定的 pass in 的同向数据库以该方式路由。
而那些 pass in 的反向数据包(replies)则不受影响并被正常的路由。
[/INDENT]

探讨:因为数据包含有包头信息,默认情况下应该是从哪(个接口)来回哪(个接口)去,而reply-to则可以为回程数据包指定不同的接口。

chenjun
铁 Fe
帖子: 56
注册时间: 2010-08-31 17:38

帖子 chenjun » 2011-02-26 8:33

leo 写了:
探讨:因为数据包含有包头信息,默认情况下应该是从哪(个接口)来回哪(个接口)去,而reply-to则可以为回程数据包指定不同的接口。
如果不使用reply-to策略路由的话,在公网双链路的情况下,网络会形成环路,达不到从哪(个接口)来回哪(个接口)去的效果

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

帖子 leo » 2011-02-26 12:10

woops!没有用过双线路还真没有想到这层,多谢提供信息。

chenjun
铁 Fe
帖子: 56
注册时间: 2010-08-31 17:38

帖子 chenjun » 2011-02-26 13:55

呵呵,我还要多谢你的翻译呢

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

帖子 leo » 2011-02-26 15:07

:D,那全是纸上谈兵,惭愧惭愧!!

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 25 访客