/interface bridge add name=bridge
/interface bridge port add ether1 bridge=bridge
/interface bridge port add ether2 bridge=bridge
I can tell you that I am using a transparent bridge for the main QoS router, but I am running 2.2.28 on it. So to answer your question, it should work. However, I am not seeing the same result on 2.9.18-19. I don't know if the problems are related, but to me they might because of the interaction with a bridge interface.It really looks that I can not shape traffic on a transparent bridge. However it is strange that the guys from MikroTik have posted an article HowTo shape on it! (http://www.mikrotik.com/Documentation/H ... How_shaper)
/ip firewall mangle add chain=forward out-bridge-port=ether2 action=mark-packet new-packet-mark=MyMark
I can confirm that the exact config does not work on my 2.9.22 bridge either.valens,
Would you post a smidgeon of your config so I can try it on my router? I posted my config, and if you run it through (changing your IP), it may not work for you.
I have the exact config on a 2.8.28 router and it works. I have it on a 2.9.22 router and it does not. Same code, just different versions (syntax).
Eric
[valens@BM] interface> pr
Flags: X - disabled, D - dynamic, R - running
# NAME TYPE RX-RATE TX-RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500
[valens@BM] interface bridge port> pr
Flags: X - disabled, I - inactive, D - dynamic
# INTERFACE BRIDGE PRIORITY PATH-COST
0 ether1 bridge1 128 10
1 ether2 bridge1 128 10
[valens@BM] ip firewall mangle> pr
16 ;;; Citraweb Office
chain=forward src-address=202.0.0.0/26 action=mark-connection
new-connection-mark=citraweb-conn passthrough=yes
17 chain=forward connection-mark=citraweb-conn action=mark-packet new-packet-mark=citraweb-flow
passthrough=yes
[valens@BM] queue tree> pr
6 name="Internal-Downlink" parent=ether2 packet-mark="" limit-at=0 queue=default priority=1
max-limit=512000 burst-limit=0 burst-threshold=0 burst-time=0s
7 name="Internal-Uplink" parent=ether1 packet-mark="" limit-at=0 queue=default priority=1
max-limit=384000 burst-limit=0 burst-threshold=0 burst-time=0s
115 name="Citraweb-Downlink" parent=Internal-Downlink packet-mark=citraweb-flow limit-at=0
queue=default priority=4 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0s
116 name="Citraweb-Uplink" parent=Internal-Uplink packet-mark=citraweb-flow limit-at=0
queue=default priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 burst-time=0s
Let me see if I understand this...Code: Select all[valens@BM] interface> pr Flags: X - disabled, D - dynamic, R - running # NAME TYPE RX-RATE TX-RATE MTU 0 R ether1 ether 0 0 1500 1 R ether2 ether 0 0 1500 [valens@BM] interface bridge port> pr Flags: X - disabled, I - inactive, D - dynamic # INTERFACE BRIDGE PRIORITY PATH-COST 0 ether1 bridge1 128 10 1 ether2 bridge1 128 10 [valens@BM] ip firewall mangle> pr 16 ;;; Citraweb Office chain=forward src-address=202.0.0.0/26 action=mark-connection new-connection-mark=citraweb-conn passthrough=yes 17 chain=forward connection-mark=citraweb-conn action=mark-packet new-packet-mark=citraweb-flow passthrough=yes [valens@BM] queue tree> pr 6 name="Internal-Downlink" parent=ether2 packet-mark="" limit-at=0 queue=default priority=1 max-limit=512000 burst-limit=0 burst-threshold=0 burst-time=0s 7 name="Internal-Uplink" parent=ether1 packet-mark="" limit-at=0 queue=default priority=1 max-limit=384000 burst-limit=0 burst-threshold=0 burst-time=0s 115 name="Citraweb-Downlink" parent=Internal-Downlink packet-mark=citraweb-flow limit-at=0 queue=default priority=4 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0s 116 name="Citraweb-Uplink" parent=Internal-Uplink packet-mark=citraweb-flow limit-at=0 queue=default priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 burst-time=0s
Paul,Guys,
Here is a template that I use to create bandwidth management queues. First it creates the marking rules, then it creates the queues. I use this to manage a number of links from a datacentre, and it works fine with 2.9.17 and bridged interfaces. I also have one for 2.8.x as well.
Let me know if this helps or if you have any suggestions on it, it's as simple as following the instructions at the top, and making sure your interface names are right, or just change them to suit, and setting your throttling values.
## - Do find and replace on SITEADDRESS to insert subnet, must be in the format of xx.xx.xx.0/subnet (24) example 10.1.1.0/24 (This does whole document)
## - Do find and replace on SITECODE to insert site code, should be 3 to 5 letters, such as syd or nrgba (This does whole document)
## *********** ALL RULES MUST REMAIN IN THE ORDER PRESENTED IN THIS TEMPLATE OR SHAPING WILL NOT FUNCTION CORRECTLY **************
## - Change comment on first rule to indicate description of the site that the rules are for, such as "Frankfurt Rules Start"
/ ip firewall mangle
## Citrix Traffic to Site
add chain=forward src-port=2598 in-interface=private dst-address=SITEADDRESS protocol=tcp action=mark-connection new-connection-mark=SITECODE-citrix-out-con comment="Frankfurt Rules Start" disabled=no passthrough=yes
## Filesharing Traffic to Site
add chain=forward src-port=445 in-interface=private dst-address=SITEADDRESS protocol=tcp action=mark-connection new-connection-mark=SITECODE-fileshare-out-con comment="" disabled=no passthrough=yes
## Filesharing Traffic from Site
add chain=forward src-address=SITEADDRESS in-interface=public dst-port=445 protocol=tcp action=mark-connection new-connection-mark=SITECODE-fileshare-in-con comment="" disabled=no passthrough=yes
## Telnet Traffic to Site
add chain=forward in-interface=private dst-address=SITEADDRESS dst-port=23 protocol=tcp action=mark-connection new-connection-mark=SITECODE-telnet-out-con comment="" disabled=no passthrough=yes
## Thinprint Traffic to Site
add chain=forward in-interface=private dst-address=SITEADDRESS dst-port=4000 protocol=tcp action=mark-connection new-connection-mark=SITECODE-thinprint-out-con comment="" disabled=no passthrough=yes
## Filesharing Traffic to Site
add chain=forward connection-mark=SITECODE-fileshare-out-con action=mark-packet new-packet-mark=SITECODE-fileshare-out comment="" disabled=no passthrough=no
## Citrix Traffic to Site
add chain=forward connection-mark=SITECODE-citrix-out-con action=mark-packet new-packet-mark=SITECODE-citrix-out comment="" disabled=no passthrough=no
## Filesharing Traffic from Site
add chain=forward connection-mark=SITECODE-fileshare-in-con action=mark-packet new-packet-mark=SITECODE-fileshare-in comment="" disabled=no passthrough=no
## Telnet Traffic to Site
add chain=forward connection-mark=SITECODE-telnet-out-con action=mark-packet new-packet-mark=SITECODE-telnet-out comment="" disabled=no passthrough=no
## Thinprint Traffic to Site
add chain=forward connection-mark=SITECODE-thinprint-out-con action=mark-packet new-packet-mark=SITECODE-thinprint-out comment="" disabled=no passthrough=no
## Other Traffic to Site
add chain=forward in-interface=private dst-address=SITEADDRESS action=mark-connection new-connection-mark=SITECODE-other-out-con comment="" disabled=no passthrough=yes
## Other Traffic from Site
add chain=forward src-address=SITEADDRESS in-interface=public action=mark-connection new-connection-mark=SITECODE-other-in-con comment="" disabled=no passthrough=yes
## Other Traffic to Site
add chain=forward connection-mark=SITECODE-other-out-con action=mark-packet new-packet-mark=SITECODE-other-out comment="" disabled=no passthrough=no
## Other Traffic from Site
add chain=forward connection-mark=SITECODE-other-in-con action=mark-packet new-packet-mark=SITECODE-other-in comment="" disabled=no passthrough=no
## - Set max-limit figures in each line to the maximum allowable tranfer rate or bandwidth allocation for that service
## - Set limit-at figures to be the CIR or guaranteed rates provided for that service
## - Remove lines for any services not needed, but always leave "Other Traffic" queues in place as a catch-all
/ queue tree
add name="SITECODE-UP" parent=private packet-mark="" limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
add name="SITECODE-DOWN" parent=public packet-mark="" limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Citrix Traffic to Site
add name="citrix-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-citrix-out limit-at=942000 queue=pfifo priority=1 max-limit=1024000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Other Traffic to Site
add name="other-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-other-out limit-at=0 queue=red priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Other Traffic from Site
add name="other-from-SITECODE" parent=SITECODE-UP packet-mark=SITECODE-other-in limit-at=128000 queue=pfifo priority=8 max-limit=768000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Thinprint Traffic to Site
add name="thinprint-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-thinprint-out limit-at=128000 queue=pfifo priority=2 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Filesharing Traffic to Site
add name="fileshare-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-fileshare-out limit-at=0 queue=red priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Filesharing traffic from Site
add name="fileshare-from-SITECODE" parent=SITECODE-UP packet-mark=SITECODE-fileshare-in limit-at=128000 queue=pfifo priority=8 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Telnet Traffic to Site
add name="telnet-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-telnet-out limit-at=8000 queue=red priority=2 max-limit=32000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
Regards
Paul
I need to add that PJulian's template absolutely, unequivocally, does NOT work under 2.9.23 with bridged interfaces. I've even tried a completely different MT router box. I'm getting really frustrated that NOTHING I do to limit traffic under 2.9.23 with bridged interfaces works.Paul,Guys,
Here is a template that I use to create bandwidth management queues. First it creates the marking rules, then it creates the queues. I use this to manage a number of links from a datacentre, and it works fine with 2.9.17 and bridged interfaces. I also have one for 2.8.x as well.
Let me know if this helps or if you have any suggestions on it, it's as simple as following the instructions at the top, and making sure your interface names are right, or just change them to suit, and setting your throttling values.
## - Do find and replace on SITEADDRESS to insert subnet, must be in the format of xx.xx.xx.0/subnet (24) example 10.1.1.0/24 (This does whole document)
## - Do find and replace on SITECODE to insert site code, should be 3 to 5 letters, such as syd or nrgba (This does whole document)
## *********** ALL RULES MUST REMAIN IN THE ORDER PRESENTED IN THIS TEMPLATE OR SHAPING WILL NOT FUNCTION CORRECTLY **************
## - Change comment on first rule to indicate description of the site that the rules are for, such as "Frankfurt Rules Start"
/ ip firewall mangle
## Citrix Traffic to Site
add chain=forward src-port=2598 in-interface=private dst-address=SITEADDRESS protocol=tcp action=mark-connection new-connection-mark=SITECODE-citrix-out-con comment="Frankfurt Rules Start" disabled=no passthrough=yes
## Filesharing Traffic to Site
add chain=forward src-port=445 in-interface=private dst-address=SITEADDRESS protocol=tcp action=mark-connection new-connection-mark=SITECODE-fileshare-out-con comment="" disabled=no passthrough=yes
## Filesharing Traffic from Site
add chain=forward src-address=SITEADDRESS in-interface=public dst-port=445 protocol=tcp action=mark-connection new-connection-mark=SITECODE-fileshare-in-con comment="" disabled=no passthrough=yes
## Telnet Traffic to Site
add chain=forward in-interface=private dst-address=SITEADDRESS dst-port=23 protocol=tcp action=mark-connection new-connection-mark=SITECODE-telnet-out-con comment="" disabled=no passthrough=yes
## Thinprint Traffic to Site
add chain=forward in-interface=private dst-address=SITEADDRESS dst-port=4000 protocol=tcp action=mark-connection new-connection-mark=SITECODE-thinprint-out-con comment="" disabled=no passthrough=yes
## Filesharing Traffic to Site
add chain=forward connection-mark=SITECODE-fileshare-out-con action=mark-packet new-packet-mark=SITECODE-fileshare-out comment="" disabled=no passthrough=no
## Citrix Traffic to Site
add chain=forward connection-mark=SITECODE-citrix-out-con action=mark-packet new-packet-mark=SITECODE-citrix-out comment="" disabled=no passthrough=no
## Filesharing Traffic from Site
add chain=forward connection-mark=SITECODE-fileshare-in-con action=mark-packet new-packet-mark=SITECODE-fileshare-in comment="" disabled=no passthrough=no
## Telnet Traffic to Site
add chain=forward connection-mark=SITECODE-telnet-out-con action=mark-packet new-packet-mark=SITECODE-telnet-out comment="" disabled=no passthrough=no
## Thinprint Traffic to Site
add chain=forward connection-mark=SITECODE-thinprint-out-con action=mark-packet new-packet-mark=SITECODE-thinprint-out comment="" disabled=no passthrough=no
## Other Traffic to Site
add chain=forward in-interface=private dst-address=SITEADDRESS action=mark-connection new-connection-mark=SITECODE-other-out-con comment="" disabled=no passthrough=yes
## Other Traffic from Site
add chain=forward src-address=SITEADDRESS in-interface=public action=mark-connection new-connection-mark=SITECODE-other-in-con comment="" disabled=no passthrough=yes
## Other Traffic to Site
add chain=forward connection-mark=SITECODE-other-out-con action=mark-packet new-packet-mark=SITECODE-other-out comment="" disabled=no passthrough=no
## Other Traffic from Site
add chain=forward connection-mark=SITECODE-other-in-con action=mark-packet new-packet-mark=SITECODE-other-in comment="" disabled=no passthrough=no
## - Set max-limit figures in each line to the maximum allowable tranfer rate or bandwidth allocation for that service
## - Set limit-at figures to be the CIR or guaranteed rates provided for that service
## - Remove lines for any services not needed, but always leave "Other Traffic" queues in place as a catch-all
/ queue tree
add name="SITECODE-UP" parent=private packet-mark="" limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
add name="SITECODE-DOWN" parent=public packet-mark="" limit-at=0 queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Citrix Traffic to Site
add name="citrix-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-citrix-out limit-at=942000 queue=pfifo priority=1 max-limit=1024000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Other Traffic to Site
add name="other-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-other-out limit-at=0 queue=red priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Other Traffic from Site
add name="other-from-SITECODE" parent=SITECODE-UP packet-mark=SITECODE-other-in limit-at=128000 queue=pfifo priority=8 max-limit=768000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Thinprint Traffic to Site
add name="thinprint-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-thinprint-out limit-at=128000 queue=pfifo priority=2 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Filesharing Traffic to Site
add name="fileshare-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-fileshare-out limit-at=0 queue=red priority=8 max-limit=128000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Filesharing traffic from Site
add name="fileshare-from-SITECODE" parent=SITECODE-UP packet-mark=SITECODE-fileshare-in limit-at=128000 queue=pfifo priority=8 max-limit=256000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
## Telnet Traffic to Site
add name="telnet-to-SITECODE" parent=SITECODE-DOWN packet-mark=SITECODE-telnet-out limit-at=8000 queue=red priority=2 max-limit=32000 burst-limit=0 burst-threshold=0 burst-time=0 disabled=no
Regards
Paul
Maybe you can answer some questions. Why do you need to mark the connection, then use that connection-mark to mark the packets? Why won't Mikrotik just let you mark the packets using packet-mark?
Second, the first two queues are for the public and private interfaces, with the other queues being child queues to these two "master" queues. If I wanted to extend your template to service many different subnets, do I have to recreate these "master" parent queues, or can I re-use them with multiple sets of child queues for each class-C subnet pointed at the the same parents?
Thanks for any light you can shed on this.
Eric
If you by any means NAT your connection (either DST-NAT; web-proxy redirect or SRC-NAT), then you must first mark the connections and then mark the flows within that connection. This is why there is a connection-mark and the packet-mark.Why do you need to mark the connection, then use that connection-mark to mark the packets? Why won't Mikrotik just let you mark the packets using packet-mark?
Eric
Thanks, but, I'm not using NAT at all. Just a transparent bridge. NAT is done upstream by a PIX 525.If you by any means NAT your connection (either DST-NAT; web-proxy redirect or SRC-NAT), then you must first mark the connections and then mark the flows within that connection. This is why there is a connection-mark and the packet-mark.Why do you need to mark the connection, then use that connection-mark to mark the packets? Why won't Mikrotik just let you mark the packets using packet-mark?
Eric
Sonny.
I think that I can represent all other guys regarding Questions and solutions to find Answer to ours questions.read this: http://www.catb.org/~esr/faqs/smart-que ... tml#before
and try to ask your question once again.
because we need to know the marks before the forward chain. see http://www.mikrotik.com/docs/ros/2.9/gr ... flow31.jpgWhy prerouting chain is used instead of forward chain? Is it because of bridging?
depends on your needs. PCQ works fine.What kind of queue do you recommend for TTS? Can I implement PCQ in TTS?
Queue tree can accept global-* interfaces as well.I believe queue tree can't be implemented because the top-level parents are the available interfaces. Since the interfaces are bridged, there is no way to identify the outgoing and incoming interfaces. Am I right here?
/ interface bridge
add name="bridge1"
/ interface bridge port
add interface=ether2 bridge=bridge1
add interface=ether3 bridge=bridge1
/queue type
add name="pcq-upload" kind=pcq pcq-rate=256k pcq-classifier=src-address
add name="pcq-download" kind=pcq pcq-rate=768k pcq-classifier=dst-address
/ ip firewall mangle
add chain=prerouting action=mark-packet new-packet-mark=ALL_traffic
/queue tree
add parent=global-in flow=ALL_traffic queue=pcq-upload
add parent=global-out flow=ALL_traffic queue=pcq-download