wbyz20 发表于 2009-3-27 10:57:57

求助.做了负载后.用队列树限速不起作用.

本帖最后由 wbyz20 于 2009-3-27 11:02 编辑

做了负载后.用队列树限速不起作用.

这张图是网络环境:外网三条ADSL内网:两张网卡.分别:LAN 网段:192.168.0.0/24 另一张接宿舍网段:192.168.8.0/27
bridge1是网桥...桥接的是:公司加宿舍网卡.
WIFI是无线网卡

这张图:443 3389 web82 分别标记网上银行 远程桌面 和我们的分销系统
          Random1 2 3 是负载   用Random做的
         http 是标记web80端口
         udp   是标记所有UDP端口
         all connent 是标记所有的连接...现在没有打开它...打开它后.负载就用不了了.但是限速就正常
         lan packet 是标记内部两张网卡的数据包.接口选的是桥:bridge1
         pppoe-telpppoe-cnc2   pppoe-cnc 分别标记ADSL的数据包




这张图: http 是做web优先
         UDP是做UDP限速
         all-up 是限制所有上传数据   接口用的是:global-out
          lan是下载限速接口用的是:bridge1

      这张是PCQ规则   


这张图:路由列表

wbyz20 发表于 2009-3-27 11:08:42

按照官网wiki里面说的做了伪装以后 必需要先标记所有外出的连接.然后在连接里面提取数据包 这样限速就正常   
可是我标记了所有的连接后....负载就不正常了.有的线就没有数据了..限速就正常了..   关了标记所有连接后.负载就正常了..

likeme 发表于 2009-3-27 11:15:35

看不懂。义务帮顶。

zhjchina 发表于 2009-3-27 11:41:33

很乱。不知所云

wbyz20 发表于 2009-3-27 12:58:49

汗...我发脚本出来

wbyz20 发表于 2009-3-27 13:00:34

# mar/27/2009 12:59:16 by RouterOS 3.22
# software id = NNFT-86N
#
/interface ethernet
set 0 arp=enabled auto-negotiation=yes cable-settings=default comment="" \
    disable-running-check=yes disabled=no full-duplex=yes mac-address=\
    00:D0:B7:84:A4:54 mtu=1500 name=Lan1 speed=100Mbps
set 1 arp=enabled auto-negotiation=yes cable-settings=default comment="" \
    disable-running-check=yes disabled=no full-duplex=yes mac-address=\
    00:02:B3:C8:0C:DD mtu=1500 name=Lan speed=100Mbps
set 2 arp=enabled auto-negotiation=yes cable-settings=default comment="" \
    disable-running-check=yes disabled=no full-duplex=yes mac-address=\
    00:02:B3:C8:0C:DE mtu=1500 name=CNC-2M speed=100Mbps
set 3 arp=enabled auto-negotiation=yes cable-settings=default comment="" \
    disable-running-check=yes disabled=no full-duplex=yes mac-address=\
    00:50:8B:F9:B6:0E mtu=1500 name=Tel speed=100Mbps
set 4 arp=enabled auto-negotiation=yes cable-settings=default comment="" \
    disable-running-check=yes disabled=no full-duplex=yes mac-address=\
    00:50:8B:F9:B6:0F mtu=1500 name=CNC-6M speed=100Mbps
/interface bridge
add admin-mac=00:00:00:00:00:00 ageing-time=5m arp=enabled auto-mac=yes \
    comment="" disabled=no forward-delay=15s max-message-age=20s mtu=1500 \
    name=bridge1 priority=0x8000 protocol-mode=none transmit-hold-count=6
/interface wireless security-profiles
set default authentication-types="" eap-methods=passthrough group-ciphers="" \
    group-key-update=5m interim-update=0s mode=none name=default \
    radius-eap-accounting=no radius-mac-accounting=no \
    radius-mac-authentication=no radius-mac-caching=disabled \
    radius-mac-format=XX:XX:XX:XX:XX:XX radius-mac-mode=as-username \
    static-algo-0=none static-algo-1=none static-algo-2=none static-algo-3=\
    none static-key-0="" static-key-1="" static-key-2="" static-key-3="" \
    static-sta-private-algo=none static-sta-private-key="" \
    static-transmit-key=key-0 supplicant-identity=MikroTik tls-certificate=\
    none tls-mode=no-certificates unicast-ciphers="" wpa-pre-shared-key="" \
    wpa2-pre-shared-key=""
/interface wireless
set 0 ack-timeout=dynamic adaptive-noise-immunity=none allow-sharedkey=no \
    antenna-gain=50000 antenna-mode=ant-a area="" arp=enabled band=2.4ghz-b/g \
    basic-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps \
    basic-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps burst-time=disabled comment=WIFI \
    compression=no country=china default-ap-tx-limit=0 \
    default-authentication=yes default-client-tx-limit=0 default-forwarding=\
    yes dfs-mode=none disable-running-check=no disabled=no \
    disconnect-timeout=3s frame-lifetime=0 frequency=2452 frequency-mode=\
    manual-txpower hide-ssid=no hw-retries=4 mac-address=00:1D:0F:30:DD:96 \
    max-station-count=2007 mode=ap-bridge mtu=1500 name=WiFi \
    noise-floor-threshold=default on-fail-retry-time=100ms \
    periodic-calibration=default periodic-calibration-interval=60 \
    preamble-mode=both proprietary-extensions=post-2.9.25 radio-name=\
    001D0F30DD96 rate-set=configured scan-list=default security-profile=\
    default ssid=WiFi-Xhy station-bridge-clone-mac=00:00:00:00:00:00 \
    supported-rates-a/g=6Mbps,9Mbps,12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps \
    supported-rates-b=1Mbps,2Mbps,5.5Mbps,11Mbps tx-power-mode=manual-table \
    update-stats-interval=disabled wds-cost-range=50-150 wds-default-bridge=\
    none wds-default-cost=100 wds-ignore-ssid=yes wds-mode=dynamic \
    wmm-support=enabled
/interface wireless manual-tx-power-table
set WiFi comment=WIFI manual-tx-powers="1Mbps:25,2Mbps:24,5.5Mbps:23,11Mbps:22\
    ,6Mbps:23,9Mbps:20,12Mbps:20,18Mbps:19,24Mbps:19,36Mbps:16,48Mbps:16,54Mbp\
    s:16,HT20-1:0,HT20-2:0,HT20-3:0,HT20-4:0,HT20-5:0,HT20-6:0,HT20-7:0,HT20-8\
    :0,HT40-1:0,HT40-2:0,HT40-3:0,HT40-4:0,HT40-5:0,HT40-6:0,HT40-7:0,HT40-8:0\
    "
/interface wireless nstreme
set WiFi comment=WIFI disable-csma=no enable-nstreme=no enable-polling=yes \
    framer-limit=3200 framer-policy=none

wbyz20 发表于 2009-3-27 13:01:09

/queue type
set default kind=pfifo name=default pfifo-limit=50
set ethernet-default kind=pfifo name=ethernet-default pfifo-limit=50
set wireless-default kind=sfq name=wireless-default sfq-allot=1514 \
    sfq-perturb=5
set synchronous-default kind=red name=synchronous-default red-avg-packet=1000 \
    red-burst=20 red-limit=60 red-max-threshold=50 red-min-threshold=10
set hotspot-default kind=sfq name=hotspot-default sfq-allot=1514 sfq-perturb=\
    5
add kind=pcq name=down pcq-classifier=dst-address pcq-limit=500 pcq-rate=0 \
    pcq-total-limit=20000
add kind=pcq name=up pcq-classifier=src-address pcq-limit=300 pcq-rate=0 \
    pcq-total-limit=5000
add kind=pcq name=pqc_http_down pcq-classifier=dst-address pcq-limit=1000 \
    pcq-rate=6000000 pcq-total-limit=200000
add kind=pcq name=pcq_up pcq-classifier=src-address pcq-limit=300 pcq-rate=\
    750000 pcq-total-limit=20000
set default-small kind=pfifo name=default-small pfifo-limit=10

wbyz20 发表于 2009-3-27 13:01:44

/queue tree
add burst-limit=7000000 burst-threshold=5000000 burst-time=30s disabled=no \
    limit-at=0 max-limit=6000000 name=lan packet-mark=Lan-down parent=bridge1 \
    priority=5 queue=down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=\
    256000 max-limit=384000 name=xl packet-mark=1480 parent=Lan priority=8 \
    queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=0 name=Http packet-mark=http parent=global-out priority=1 \
    queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=yes limit-at=0 \
    max-limit=400000 name=PPS packet-mark=1089 parent=global-out priority=8 \
    queue=default
add burst-limit=1000000 burst-threshold=800000 burst-time=30s disabled=no \
    limit-at=0 max-limit=900000 name=all-up packet-mark="" parent=global-out \
    priority=7 queue=up
add burst-limit=7000000 burst-threshold=5000000 burst-time=30s disabled=yes \
    limit-at=0 max-limit=6000000 name=lan1 packet-mark=Lan1-down parent=Lan1 \
    priority=6 queue=down
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=4000000 name=UDP packet-mark=UDP parent=global-out priority=8 \
    queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=300000 name=tel packet-mark=tel-up parent=all-up priority=3 \
    queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=350000 name=cnc2 packet-mark=cnc2-up parent=all-up priority=1 \
    queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 \
    max-limit=350000 name=cnc3 packet-mark=cnc3-up parent=all-up priority=2 \
    queue=default

wbyz20 发表于 2009-3-27 13:02:59

/ip firewall mangle
add action=change-ttl chain=prerouting comment=ttl-mss disabled=no new-ttl=\
    decrement:1
add action=change-mss chain=forward comment="" disabled=no new-mss=1440 \
    protocol=tcp tcp-flags=syn
add action=change-mss chain=postrouting comment="" disabled=no new-mss=1440 \
    protocol=tcp tcp-flags=syn
add action=mark-routing chain=prerouting comment=443 disabled=no dst-port=443 \
    new-routing-mark=443 passthrough=no protocol=tcp
add action=mark-routing chain=prerouting comment=Web82 disabled=no dst-port=\
    82 new-routing-mark=Web82 passthrough=no protocol=tcp src-address=\
    192.168.0.0/24
add action=mark-routing chain=prerouting comment=3389 disabled=no dst-port=\
    22222 new-routing-mark=3389 passthrough=no protocol=tcp src-address=\
    192.168.0.0/24
add action=mark-connection chain=prerouting comment=Random-1 \
    connection-state=new disabled=no in-interface=bridge1 \
    new-connection-mark=Tel_con passthrough=yes random=20
add action=mark-routing chain=prerouting comment="" connection-mark=Tel_con \
    disabled=no in-interface=bridge1 new-routing-mark=Tel_rou passthrough=no
add action=mark-connection chain=prerouting comment=Random-2 \
    connection-state=new disabled=no in-interface=bridge1 \
    new-connection-mark=odd_com passthrough=yes random=20
add action=mark-routing chain=prerouting comment="" connection-mark=odd_com \
    disabled=no in-interface=bridge1 new-routing-mark=odd_rou passthrough=no
add action=mark-connection chain=prerouting comment=Random-3 \
    connection-state=new disabled=no in-interface=bridge1 \
    new-connection-mark=even_con passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=even_con \
    disabled=no in-interface=bridge1 new-routing-mark=even_rou passthrough=no
add action=mark-packet chain=forward comment=Http disabled=no dst-port=80 \
    new-packet-mark=http passthrough=no protocol=tcp src-address=\
    192.168.0.0/20
add action=mark-packet chain=postrouting comment=UDP disabled=no \
    new-packet-mark=UDP passthrough=no protocol=udp
add action=mark-connection chain=forward comment="all connent" disabled=yes \
    new-connection-mark=all_con passthrough=yes src-address=192.168.0.0/20
add action=mark-packet chain=forward comment="Lan packet" disabled=no \
    new-packet-mark=Lan-down out-interface=bridge1 passthrough=no
add action=mark-packet chain=forward comment=pppoe-tel disabled=no \
    new-packet-mark=tel-up out-interface=pppoe-out1 passthrough=no
add action=mark-packet chain=forward comment=pppoe-cnc2 disabled=no \
    new-packet-mark=cnc2-up out-interface=pppoe-out2 passthrough=no
add action=mark-packet chain=forward comment=pppoe-cnc3 disabled=no \
    new-packet-mark=cnc3-up out-interface=pppoe-out3 passthrough=no
add action=mark-packet chain=forward comment="Lan1 packet" disabled=yes \
    new-packet-mark=Lan1-down out-interface=Lan1 passthrough=no
add action=accept chain=prerouting comment=\
    "\B7\D6\C1\F7\BA\F3\CD\F8\B6\CE\BB\A5\B7\C3" disabled=yes dst-address=\
    192.168.0.254-192.168.3.1 src-address=192.168.0.254-192.168.3.1
add action=mark-routing chain=prerouting comment=CS disabled=yes \
    new-routing-mark=CS passthrough=no src-address=192.168.8.2
add action=mark-packet chain=forward comment=PPS disabled=yes dst-address=\
    192.168.0.0/20 new-packet-mark=1089 packet-size=1089 passthrough=no
add action=mark-packet chain=forward comment="\D1\B8\C0\D7" disabled=yes \
    in-interface=Lan1 new-packet-mark=1480 packet-size=1480 passthrough=no
add action=mark-packet chain=forward comment="\BF\E1\B9\B7" disabled=yes \
    new-packet-mark=1084 packet-size=1084 passthrough=no time=\
    8h-17h30m,sun,mon,tue,wed,thu,fri
add action=change-ttl chain=prerouting comment=\
    "\B7\C0\D6\B9\B6\FE\BC\B6\B4\FA\C0\ED" disabled=yes dst-address=\
    192.168.0.0/20 new-ttl=set:0

wbyz20 发表于 2009-3-27 13:03:38

/ip route
add check-gateway=ping comment=443 disabled=no distance=1 dst-address=\
    0.0.0.0/0 gateway=pppoe-out1 routing-mark=443
add check-gateway=ping comment=3389 disabled=no distance=1 dst-address=\
    0.0.0.0/0 gateway=pppoe-out1 routing-mark=3389
add check-gateway=ping comment=82 disabled=no distance=1 dst-address=\
    0.0.0.0/0 gateway=pppoe-out1 routing-mark=Web82
add check-gateway=ping comment="Tel mark" disabled=no distance=1 dst-address=\
    0.0.0.0/0 gateway=pppoe-out1 routing-mark=Tel_rou
add check-gateway=ping comment="CNC-6M mark" disabled=no distance=1 \
    dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=even_rou
add check-gateway=ping comment="CNC-2M mark" disabled=no distance=1 \
    dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=odd_rou
add check-gateway=ping comment="\B5\E7\D0\C5\C2\B7\D3\C9\B2\DF\C2\D4" \
    disabled=no distance=2 dst-address=0.0.0.0/0 gateway=pppoe-out1
add comment=CS disabled=yes distance=1 dst-address=0.0.0.0/0 gateway=\
    pppoe-out1 routing-mark=CS
add check-gateway=ping comment="\C4\AC\C8\CFCNC\CD\F8\B9\D8" disabled=no \
    distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2
add check-gateway=ping comment="\C4\AC\C8\CFTel\CD\F8\B9\D8" disabled=no \
    distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=telecom

zhjchina 发表于 2009-3-27 13:44:39

出钱叫人解决好了。。
这么多的代码,估计没几个人耐心看

likeme 发表于 2009-3-27 20:23:29

高手不愿意看,低手看不懂。

47771885 发表于 2009-3-30 22:48:52

我怎么都是乱码

fillmore 发表于 2009-3-31 00:29:34

高手不愿意看,低手看不懂。说得对~~~~~~~~~~~~~~
页: [1]
查看完整版本: 求助.做了负载后.用队列树限速不起作用.