ROS PPPOE 双线 PCC (2058人路过)

01:30 , 引用(0) Via 本站原创

# 添加ADSL1的pppoe-out帐户密码并取取消自动添加网关及DNS
/interface pppoe-client add name="pppoe-out1" interface="wan1" user="adsl1name" password="adsl1pass" add-default-route=no disabled=no
/interface pppoe-client add name="pppoe-out2" interface="wan2" user="adsl2name" password="adsl2pass" add-default-route=no disabled=no

# 激活pppoe-out拨号
/interface pppoe-client enable pppoe-out1
/interface pppoe-client enable pppoe-out2

# 添加本地连接配置
/ip address add address=192.168.1.254/255.255.255.0 interface=lan1 comment="LAN1"

# 设置DNS缓存
/ip dns set primary-dns="202.103.224.68" secondary-dns="202.103.225.68" allow-remote-requests=yes

# 设置MSS值为1440
/ip firewall mangle add action="change-mss" chain="forward" comment="change-mss" disabled=no new-mss="1440" protocol="tcp" tcp-flags="syn"

# 设置input
/ip firewall mangle add action="mark-connection" chain="input" comment="" disabled=no in-interface="pppoe-out1" new-connection-mark="pppoe-out1_conn" passthrough=yes
/ip firewall mangle add action="mark-connection" chain="input" comment="" disabled=no in-interface="pppoe-out2" new-connection-mark="pppoe-out2_conn" passthrough=yes

# 设置output
/ip firewall mangle add action="mark-routing" chain="output" comment="" connection-mark="pppoe-out1_conn" disabled=no new-routing-mark="to_pppoe-out1" passthrough=yes
/ip firewall mangle add action="mark-routing" chain="output" comment="" connection-mark="pppoe-out2_conn" disabled=no new-routing-mark="to_pppoe-out2" passthrough=yes

# PCC设置
/ip firewall mangle add action="mark-connection" chain="prerouting" comment="" disabled=no dst-address-type="!local" in-interface="lan1" new-connection-mark="pppoe-out1_conn" passthrough=yes per-connection-classifier="both-addresses:2/0" src-address="192.168.1.0/24"
/ip firewall mangle add action="mark-connection" chain="prerouting" comment="" disabled=no dst-address-type="!local" in-interface="lan1" new-connection-mark="pppoe-out2_conn" passthrough=yes per-connection-classifier="both-addresses:2/1" src-address="192.168.1.0/24"

/ip firewall mangle add action="mark-routing" chain=prerouting comment="" connection-mark="pppoe-out1_conn" disabled=no in-interface="lan1" new-routing-mark="to_pppoe-out1" passthrough=yes src-address="192.168.1.0/24"
/ip firewall mangle add action="mark-routing" chain=prerouting comment="" connection-mark="pppoe-out2_conn" disabled=no in-interface="lan1" new-routing-mark="to_pppoe-out2" passthrough=yes src-address="192.168.1.0/24"

/ip route add comment=1 disabled=no distance=1 dst-address="0.0.0.0/0" gateway="pppoe-out1" routing-mark="to_pppoe-out1" check-gateway="ping"
/ip route add comment=2 disabled=no distance=1 dst-address="0.0.0.0/0" gateway="pppoe-out2" routing-mark="to_pppoe-out2" check-gateway="ping"

/ip route add check-gateway="ping" comment="pppoe-out1" disabled=no distance="10" dst-address="0.0.0.0/0" gateway="pppoe-out1"
/ip route add check-gateway="ping" comment="pppoe-out2" disabled=no distance="10" dst-address="0.0.0.0/0" gateway="pppoe-out2"

# 配置pppoe-out数据转发共享及标记
/ip firewall nat add action="masquerade" chain="srcnat" comment="1" disabled=no out-interface="pppoe-out1"
/ip firewall nat add action="masquerade" chain="srcnat" comment="2" disabled=no out-interface="pppoe-out2"


作者:77run@齐齐奔跑 -- 骑士威科技
地址:http://blog.77run.com/ROS-PPPOE-PCC/
版权所有©转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: 77run 编辑于2011/09/15 23:50
, , ,
| |
0 Responses to "A Sample Post with Links"
发表评论
  • 昵称 [注册]
  • 密码 游客无需密码
  • 网址
  • 电邮
打开HTML 打开UBB 打开表情 隐藏 记住我