找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: dyong_

[其它] 真正的负载均衡终于实现,花了我一年多时间。

[复制链接]
发表于 2007-12-29 09:09:56 | 显示全部楼层
把你做的过程发出来。我们帮你测一下。这样子让人不能全理解
routeros
回复

使用道具 举报

发表于 2007-12-29 10:25:41 | 显示全部楼层
咳! 技术就是金钱啊 就是饭碗啊
论坛是交流的 只有交流大家才会共同进步啊
要是人人都像你们这样那就完蛋了
看看中国功夫就是这样 做师傅的喜欢保留
现在跑别的地方开武馆 经常有人踢馆
各位老大们啊 技术不能在保留啊
在这样下去
routeros
回复

使用道具 举报

发表于 2007-12-30 19:48:51 | 显示全部楼层
没教程,发再多的图也是没用。。。

各位也不用起哄了。。。

还是要靠我们自己。。。。。
routeros
回复

使用道具 举报

发表于 2008-2-3 07:06:35 | 显示全部楼层

回复 16# 的帖子

专卖精品的,还不是来自这里,大家多看看官网的论坛吧。肯定有收获。。


dannyboy   Post subject: WHAT IS WRONG WITH THIS CODE~~Posted: Mon Sep 11, 2006 3:43 am  


Frequent Visitor


Joined: Fri Sep 16, 2005 3:21 am
Posts: 90
Location: Nicaragua  Hello,

I copy and paste the code to do load balance from the wiki. I than changed ip address with mine. I have problems!!

First problem I have is that in src-nat I only see the nat rule for "Odd" having traffic, the "even" stays in 0 traffic.

Second problem I have is that once I setup my pppoe server, pppoe pool, Clients, ect, and connect, I cant surf at all.

Here is the code:

ip firewall mangle add chain=prerouting src-address-list=odd in-interface=Local action=mark-connection new-connection-mark=odd passthrough=yes

add chain=prerouting src-address-list=odd in-interface=Local action=mark-routing new-routing-mark=odd


add chain=prerouting src-address-list=even in-interface=Local action=mark-connection new-connection-mark=even passthrough=yes

add chain=prerouting src-address-list=even in-interface=Local action=mark-routing new-routing-mark=even

add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=odd passthrough=yes

add chain=prerouting in-interface=Local action=add-src-to-address-list address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes

add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing new-routing-mark=odd passthrough=no

add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=even passthrough=yes

add chain=prerouting in-interface=Local action=add-src-to-address-list address-list=even address-list-timeout=1d connection-mark=even passthrough=yes

add chain=prerouting in-interface=Local connection-mark=even action=mark-routing new-routing-mark=even passthrough=no

ip firewall nat add chain=srcnat connection-mark=odd action=src-nat to-addresses=165.98.168.4 to-ports=0-65535

ip firewall nat add chain=srcnat connection-mark=even action=src-nat to-addresses=165.98.144.47 to-ports=0-65535

ip route add dst-address=0.0.0.0/0 gateway=165.98.168.1 scope=255 target-scope=10 routing-mark=odd

ip route add dst-address=0.0.0.0/0 gateway=165.98.144.1 scope=255 target-scope=10 routing-mark=even

ip route add dst-address=0.0.0.0/0 gateway=165.98.144.1 scope=255 target-scope=10


Thanks





Top      

Stryker777   Post subject: Posted: Mon Sep 11, 2006 3:54 am  


Frequent Visitor


Joined: Fri Jul 07, 2006 10:40 pm
Posts: 67  As soon as you turn on PPPoE your "in interface" no longer is valid because your users are coming in via their dynamic interface that PPPoE creates.





Top      

dannyboy   Post subject: Posted: Mon Sep 11, 2006 4:01 am  


Frequent Visitor


Joined: Fri Sep 16, 2005 3:21 am
Posts: 90
Location: Nicaragua  thank you for your prompt response, so I cant use load balance using PPPOE? Also did you take a lool at the code, did I do something wrong? Why the srcnat only works with the odd packets not the even?

thanks again





Top      

Stryker777   Post subject: Posted: Mon Sep 11, 2006 4:17 am  


Frequent Visitor


Joined: Fri Jul 07, 2006 10:40 pm
Posts: 67  Are both address lists populating?
Are they populating with the same ips?





Top      

inncom   Post subject: Posted: Mon Sep 11, 2006 4:23 am  


newbie

Joined: Wed Oct 12, 2005 12:17 pm
Posts: 31  Hmm, one thing i didnt find in this thread is the fact that you must not set default route, when using dhcp or such other meathods, kind of strange dont you think to have 2 default routes ?





Top      

Stryker777   Post subject: Posted: Mon Sep 11, 2006 4:27 am  


Frequent Visitor


Joined: Fri Jul 07, 2006 10:40 pm
Posts: 67  Code:
add chain=prerouting in-interface=Local action=add-src-to-address-list address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes


Everyone is being added to the odd address list.
Should look like this (needs to be changed on the even also):


Code:
add chain=prerouting in-interface=Local connection-mark=odd action=add-src-to-address-list address-list=odd address-list-timeout=1d passthrough=yes



That is all I see at this moment, Im very tired though lol.





Top      

Stryker777   Post subject: Posted: Mon Sep 11, 2006 4:29 am  


Frequent Visitor


Joined: Fri Jul 07, 2006 10:40 pm
Posts: 67  You set routes based on routing mark.
SInce everything should be marked even or odd those are the only 2 routes needed. They catch everything.





Top      

Stryker777   Post subject: Posted: Mon Sep 11, 2006 4:32 am  


Frequent Visitor


Joined: Fri Jul 07, 2006 10:40 pm
Posts: 67  One moe thing, you can still load balance with pppoe. You just cant use in interface. Instead use your address range (src address=) so it only deals with your local addresses.
Good night.
routeros
回复

使用道具 举报

发表于 2008-2-11 23:15:07 | 显示全部楼层
我是南宁的,真正的20wan口负载均衡一直正常使用,真正感兴趣的朋友可现场观摩。QQ:236053168   nnmtan@163.com
routeros
回复

使用道具 举报

发表于 2008-2-13 14:47:02 | 显示全部楼层
做个标记~~~~~~~~~~`
routeros
回复

使用道具 举报

发表于 2008-3-20 23:26:11 | 显示全部楼层
说了老半天,有本事把过程贴出来,让大家考验一下!
routeros
回复

使用道具 举报

发表于 2008-3-30 00:49:34 | 显示全部楼层
提供多个WAN口(1至48个WAN口)可以实现光纤、LAN、ADSL等方式的自由组合。具备实时备份功能,能实现自动ip平衡,智能负载均衡(游戏不掉线),真正感兴趣的朋友可现场观摩。QQ:236053168   nnmtan@163.com
routeros
回复

使用道具 举报

发表于 2008-4-1 03:07:57 | 显示全部楼层
共享啊。。。。
routeros
回复

使用道具 举报

发表于 2008-4-1 08:22:35 | 显示全部楼层
N年前的帖子了,还在炒!

论坛上已经出了好多个教程提供学习和参考了

论坛是交流学习的地方,双向的!不是技术保留,而是要自己多动手、动脑

我也是从空白开始学习的,论坛里面有关的技术帖我都看过,还去网上看了关于IPTABLE的文章,NTH就是在那里获得信息的,做好了负载后才看到官方有这个教程,但多ADSL相同网关的难点其实是在相同网关和脚本,至于负载本身就有很多种方法,每个方法也不同的优缺点,NTH仅仅是其中的一种!

至于说我技术保留的人,我也只能坦然了,只能说让希望不劳而获的人继续守株待兔吧,我还要忙其他的事情,我并不比别人多1分钟的时间,我还有很多东西要学!希望论坛多一些潜心研究的人,少一些开口就要教程的人!

PS:就算给教程,因为教程针对的环境不一定和你自己的相同,所以可能还得修改,ROS是一个非常灵活的软件,只有明白了原理才是真正的自己的知识!
routeros
回复

使用道具 举报

发表于 2008-4-1 23:06:50 | 显示全部楼层
提供多个WAN口(1至48个WAN口)可以实现光纤、LAN、ADSL等方式的自由组合。具备实时备份功能,能实现自动ip平衡,智能负载均衡(游戏不掉线),真正感兴趣的朋友可现场观摩。QQ:236053168   nnmtan@163.com
routeros
回复

使用道具 举报

发表于 2008-4-2 00:26:38 | 显示全部楼层
就顶一句话
只有明白了原理才是真正的自己的知识!
routeros
回复

使用道具 举报

发表于 2008-5-21 09:22:14 | 显示全部楼层
已成功商用多WAN口线路聚合方案,详细介绍:http://router.cn.blog.163.com/
routeros
回复

使用道具 举报

发表于 2008-5-21 11:27:57 | 显示全部楼层

汇聚均衡

汇聚均衡


没什么稀奇的,我也会!!
routeros
回复

使用道具 举报

发表于 2008-12-7 20:38:49 | 显示全部楼层
想学习
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 00:25 , Processed in 0.094876 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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