cixihpf
发表于 2011-2-24 16:59:56
不错,是好东西
lanely
发表于 2011-2-24 19:31:48
如果是6条AD,一条光纤的呢?又怎么做啊?
wangqiang
发表于 2011-2-24 20:07:22
很需要,不错,顶一下,我经常遇到这样的问题
leehomv
发表于 2011-2-25 01:08:02
ros 4.10测试 无效??
sum41
发表于 2011-2-25 11:38:35
这东西一定要学习一下..以后用的着..mark一下.
baobao87
发表于 2011-2-25 13:12:17
哈哈。。公布出来啦。。。。。
2980315
发表于 2011-2-25 13:18:29
支持@!!!!!!!!!
ryh2510
发表于 2011-2-25 16:54:34
又学到东西了!!
superlone
发表于 2011-2-26 11:11:51
标记下。有时间多学习!!
ls365
发表于 2011-2-26 11:28:48
做个标记..
bsmqu
发表于 2011-2-26 21:40:17
呵呵,这是个好东西
注册马
发表于 2011-2-27 10:09:47
本帖最后由 注册马 于 2011-2-27 10:11 编辑
变量太多了~看得头晕~能说下每个变量的定义吗
dalookda88
发表于 2011-2-27 12:03:28
ddddddd
dddddddddddddd
tonykong
发表于 2011-2-27 13:15:09
我的是3。30的为什么我看不到per connection Classifier这一项,还有是不是我的PCC有问题放上去后ROS没感觉到.
/ip firewall mangle
add action=change-mss chain=forward comment="" disabled=no new-mss=1400 protocol=tcp tcp-flags=syn
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out1 new-connection-mark=pppoe-out1_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out2 new-connection-mark=pppoe-out2_conn passthrough=yes
add action=mark-connection chain=input comment="" disabled=no in-interface=pppoe-out3 new-connection-mark=pppoe-out3_conn passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=pppoe-out3_conn disabled=no new-routing-mark=to_pppoe-out3 passthrough=yes
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local new-connection-mark=pppoe-out1_conn passthrough=yes per-connection-classifier=both-addresses:3/0 src-address=192.168.2.0/24
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local new-connection-mark=pppoe-out2_conn passthrough=yes per-connection-classifier=both-addresses:3/1 src-address=192.168.2.0/24
add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local new-connection-mark=pppoe-out3_conn passthrough=yes per-connection-classifier=both-addresses:3/2 src-address=192.168.2.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out1_conn disabled=no new-routing-mark=to_pppoe-out1 passthrough=yes src-address=192.168.2.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out2_conn disabled=no new-routing-mark=to_pppoe-out2 passthrough=yes src-address=192.168.2.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=pppoe-out3_conn disabled=no new-routing-mark=to_pppoe-out3 passthrough=yes src-address=192.168.2.0/24
/ip route
add comment=adsl1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_pppoe-out1
add comment=adsl2 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_pppoe-out2
add comment=adsl3 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_pppoe-out3
add check-gateway=ping comment=adsl1 disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out1
add check-gateway=ping comment=adsl2 disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out2
add check-gateway=ping comment=adsl3 disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out3
/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out2
add action=masquerade chain=srcnat comment="" disabled=no out-interface=pppoe-out3
tonykong
发表于 2011-2-27 13:16:57
我是三条ADSL的,这样改不知有没有问题
{
:local status
:local i "3"
:local x "0"
:local y "0"
:local z "0"
:for ii from=1 to=$i do={
:set status runing]
:if ($status=true) do={:set x ($x+1)}}
:if ($x>0 && $x<$i) do={
:for ii from=1 to=$i do={
:set status runing]
:if ($status=true) do={
/ip fir man set per-connection-classifier=("both-addresses:"."$x"."/"."$y") disable=no;:set y ($y+1)}
:if ($starus!=true) do={/ip fir man set disable=yes}}}
:if ($x=$i) do={
:for ii from=1 to=$i do={
:set status disable]
:if ($z>0) do={
:for ii from=1 to=$i do={
/ip fir man set per-connection-classifier=(both-addresses:"."$i"."/"."$y") disable=no;:set y ($y+1)}}}
:if ($x=0) do={
:for ii from=1 to=$i do={/ip fir man set [ find new-connection-mark=$ii] disable=yes}}}