|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
本帖最后由 zooyo 于 2011-2-9 20:26 编辑
刚刚客人要求做了个双动态电信ADSL在ros3.30上做PCC+叠加
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB max-udp-packet-size=512 primary-dns=\
202.96.128.166 secondary-dns=202.96.134.133
/ip firewall mangle
add action=change-mss chain=forward comment="" disabled=no new-mss=1440 protocol=tcp tcp-flags=syn
add action=mark-connection chain=prerouting comment="" disabled=no new-connection-mark=1 passthrough=yes \
per-connection-classifier=both-addresses:2/0 src-address=28.88.168.0/24
add action=mark-connection chain=prerouting comment="" disabled=no new-connection-mark=2 passthrough=yes \
per-connection-classifier=both-addresses:2/1 src-address=28.88.168.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=1 disabled=no new-routing-mark=1 \
passthrough=yes src-address=28.88.168.0/24
add action=mark-routing chain=prerouting comment="" connection-mark=2 disabled=no new-routing-mark=2 \
passthrough=yes src-address=28.88.168.0/24
add action=mark-routing chain=prerouting comment="" disabled=no dst-port=443,8443 new-routing-mark=\
"\CD\F8\D2\F8" passthrough=no protocol=tcp src-address=28.88.168.0/24
/ip firewall nat
add action=src-nat chain=srcnat comment=1 connection-mark=1 disabled=no out-interface=pppoe-out1 src-address=\
28.88.168.0/24 to-addresses=121.32.144.8
add action=src-nat chain=srcnat comment=2 connection-mark=2 disabled=no out-interface=pppoe-out2 src-address=\
28.88.168.0/24 to-addresses=113.64.57.46
/ip route
add comment=1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=218.19.168.1 routing-mark=1 scope=30 \
target-scope=10
add comment=2 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=113.64.56.1 routing-mark=2 scope=30 \
target-scope=10
add comment=3 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=113.64.56.1 routing-mark="\CD\F8\D2\F8" \
scope=30 target-scope=10
/system scheduler
add comment="" disabled=no interval=30s name=AUTO-IP on-event="/ip route set [/ip route find comment=1] gateway=\
[/ip address get [/ip address find dynamic=yes interface=pppoe-out1] network]\r\
\n/ip route set [/ip route find comment=2] gateway=[/ip address get [/ip address find dynamic=yes interface=\
pppoe-out2] network]\r\
\n/ip route set [/ip route find comment=3] gateway=[/ip address get [/ip address find dynamic=yes interface=\
pppoe-out2] network]" policy=reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/1970 \
start-time=00:00:00
add comment="" disabled=no interval=30s name=NET-IP on-event=":local ADSLIP1 0 \r\
\n:local NATIP1 0 \r\
\n:local ADSLIP2 0 \r\
\n:local NATIP2 0 \r\
\n:set ADSLIP1 [/ip address get [/ip address find interface=pppoe-out1] address] \r\
\n:set ADSLIP1 [:pick \$ADSLIP1 0 [:find \$ADSLIP1 \"/\"]]\r\
\n:set ADSLIP2 [/ip address get [/ip address find interface=pppoe-out2] address] \r\
\n:set ADSLIP2 [:pick \$ADSLIP2 0 [:find \$ADSLIP2 \"/\"]]\r\
\n:set NATIP1 [/ip firewall nat get [/ip firewall nat find comment=1] to-addresses]\r\
\n:set NATIP2 [/ip firewall nat get [/ip firewall nat find comment=2] to-addresses]\r\
\n:if (\$ADSLIP1 != \$NATIP1) do={/ip firewall nat set [/ip firewall nat find comment=1] to-addresses=\$ADSL\
IP1}\r\
\n:if (\$ADSLIP2 != \$NATIP2) do={/ip firewall nat set [/ip firewall nat find comment=2] to-addresses=\$ADSL\
IP2}" policy=reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/1970 start-time=\
00:00:00
ROS3.30上做PPC 叠加.rar
(1008 Bytes, 下载次数: 639)
|
|