论坛是交流的 只有交流大家才会共同进步啊
要是人人都像你们这样那就完蛋了
看看中国功夫就是这样 做师傅的喜欢保留
现在跑别的地方开武馆 经常有人踢馆
各位老大们啊 技术不能在保留啊
在这样下去 :L 没教程,发再多的图也是没用。。。
各位也不用起哄了。。。
还是要靠我们自己。。。。。:victory: :lol
回复 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: NicaraguaHello,
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: 67As 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: Nicaraguathank 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: 67Are 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: 31Hmm, 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: 67Code:
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: 67You 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: 67One 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. 我是南宁的,真正的20wan口负载均衡一直正常使用,真正感兴趣的朋友可现场观摩。QQ:236053168 nnmtan@163.com 做个标记~~~~~~~~~~` 说了老半天,有本事把过程贴出来,让大家考验一下! 提供多个WAN口(1至48个WAN口)可以实现光纤、LAN、ADSL等方式的自由组合。具备实时备份功能,能实现自动ip平衡,智能负载均衡(游戏不掉线),真正感兴趣的朋友可现场观摩。QQ:236053168 nnmtan@163.com :@ :@ :@ 共享啊。。。。 N年前的帖子了,还在炒!
论坛上已经出了好多个教程提供学习和参考了
论坛是交流学习的地方,双向的!不是技术保留,而是要自己多动手、动脑
我也是从空白开始学习的,论坛里面有关的技术帖我都看过,还去网上看了关于IPTABLE的文章,NTH就是在那里获得信息的,做好了负载后才看到官方有这个教程,但多ADSL相同网关的难点其实是在相同网关和脚本,至于负载本身就有很多种方法,每个方法也不同的优缺点,NTH仅仅是其中的一种!
至于说我技术保留的人,我也只能坦然了,只能说让希望不劳而获的人继续守株待兔吧,我还要忙其他的事情,我并不比别人多1分钟的时间,我还有很多东西要学!希望论坛多一些潜心研究的人,少一些开口就要教程的人!
PS:就算给教程,因为教程针对的环境不一定和你自己的相同,所以可能还得修改,ROS是一个非常灵活的软件,只有明白了原理才是真正的自己的知识! 提供多个WAN口(1至48个WAN口)可以实现光纤、LAN、ADSL等方式的自由组合。具备实时备份功能,能实现自动ip平衡,智能负载均衡(游戏不掉线),真正感兴趣的朋友可现场观摩。QQ:236053168 nnmtan@163.com 就顶一句话
只有明白了原理才是真正的自己的知识! 已成功商用多WAN口线路聚合方案,详细介绍:http://router.cn.blog.163.com/
没什么稀奇的,我也会!! 想学习