找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: 心想事成

双adsl链路冗余互备及流量分担的实现

[复制链接]
 楼主| 发表于 2004-11-28 14:01:57 | 显示全部楼层
BSD在进行平衡的时候采用的方法有:

QUOTE
bitmask - grafts the network portion of the pool address over top of the address that is being modified (source address for nat rules, destination address for rdr rules). Example: if the address pool is 192.0.2.1/24 and the address being modified is 10.0.0.50, then the resulting address will be 192.0.2.50. If the address pool is 192.0.2.1/25 and the address being modified is 10.0.0.130, then the resulting address will be 192.0.2.2. random - randomly selects an address from the pool. source-hash - uses a hash of the source address to determine which address to use from the pool. This method ensures that a given source address is always mapped to the same pool address. The key that is fed to the hashing algorithm can optionally be specified after the source-hash keyword in hex format or as a string. By default, pfctl(8) will generate a random key every time the ruleset is loaded. round-robin - loops through the address pool in sequence. This is the default method.
routeros
回复

使用道具 举报

 楼主| 发表于 2004-11-28 14:03:23 | 显示全部楼层
而这种平衡只能做到出去的流量平衡,而不能做到进来的流量平衡。
routeros
回复

使用道具 举报

发表于 2004-11-28 14:10:52 | 显示全部楼层
这样才是可以实用的负载均衡啊,mono不知道能不能改?
routeros
回复

使用道具 举报

 楼主| 发表于 2004-11-28 14:12:43 | 显示全部楼层
m0n0不行的。它使用的是ipfilter, 而这种负载均衡只能由PF支持。
routeros
回复

使用道具 举报

发表于 2004-11-28 14:31:04 | 显示全部楼层
老文章,不过很有用!
routeros
回复

使用道具 举报

发表于 2004-12-19 15:59:00 | 显示全部楼层
QUOTE (wsgtrsys @ Nov 28 2004, 01:37 PM)
如图:
  图中BSD  用 RouterOS可以代替?
routeros
回复

使用道具 举报

发表于 2004-12-22 14:05:20 | 显示全部楼层
阿  固顶啦 , R_OS  能代替 BSD ?   1  请楼主给个答复啦, 如不行  BSD 的server要怎么配置(我没经验),   2  还有 “openbsd的Packet Filter”是什么咚咚?要怎么设
routeros
回复

使用道具 举报

发表于 2004-12-28 15:43:43 | 显示全部楼层
很多天,没会的。。。。。。。。。。
routeros
回复

使用道具 举报

发表于 2005-1-2 22:16:18 | 显示全部楼层
这种方法能够实现两条链路的冗余吗?即是链路1中断,所有负荷会全部自动走链路2,链路1恢复时,负荷又会在两条链路之间均衡,对链路2也是相同的情况。为什么提这个问题是我公司原来从联通出口,光纤城域IP网接入,最近又增加了一条电信的出口,也是光纤IP网接入,希望实现两链路的冗余和负载均衡,最近研究了很长时间,目前知道可以实现的方法有linux下使用iptables+iproute2策略路由可以实现,另外一种是直接使用NAT+动态路由的方式,但是两种方法都不是十分完善,第一种方法如何实现链路检测是一个问题,第二种方法是只能实现单NAT,即NAT出口IP要么用联通的,要么用电信的,对BSD的使用还不是十分的熟练,知道PF有负载均衡的功能,但PF相关的资源太少,包括英文的都不太多,一直不清楚其具体的细节,所以诚心的请教楼上的大侠,能够在这个问题上教我一下,
routeros
回复

使用道具 举报

发表于 2005-1-4 09:26:13 | 显示全部楼层
可是一条线断了还是会影响啊
routeros
回复

使用道具 举报

发表于 2005-1-31 14:05:30 | 显示全部楼层
想知道一下。。两个ADSL是否为同一家。。
routeros
回复

使用道具 举报

发表于 2005-3-17 18:52:45 | 显示全部楼层
你的这种做法还是没有实现真正的流量均衡,除非BSD用的是公网的ip地址。当你的一台客户机去访问因特网时,BSD的路由缓存中记录了这条路由,以后的这个ip的访问都是这条路由,同理其它的也是这样。如果一个ip地址分别由两个coyote +adsl 交叉出去。这样效率比不过一个adsl了,因为接收的电脑发现是由不同的ip联接的而包都是错误包。真正解决问题的是用公网的ip。你的coyote +adsl 对于BSD相当于专线。我认为coyote +adsl  是浪费了,用一台机器可以了。我2003年的时候就实现了两条adsl,一条电信光缆,一条网通光缆,四条线合在一起了,用floppyfw做的。当时找资料找了很多时间。其实,用多条线的时候可以用路由了,真正的路由如Zebra,用路由协议来决定路由走向。
routeros
回复

使用道具 举报

发表于 2005-4-8 20:18:08 | 显示全部楼层
楼主的办法我没认真看,不知是如何检测链路坏掉的.似乎是在pppoe掉了时.这个不好吧.我最近也要研究下,哪个大大来
routeros
回复

使用道具 举报

发表于 2005-4-10 01:42:03 | 显示全部楼层
我觉得还是用Zebra好。
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-9-19 09:22 , Processed in 0.079261 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表