Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


TheKitchen

10 posts

Wannabe Geek
Inactive user


#193768 23-Mar-2016 15:58
Send private message

Hello,

 

Have been playing around with RouterOS and am trying to achieve some 802.1p tagging using HBT and am a bit stuck.

 

 

 

What I am trying to achieve:

 

I would like to tag egress traffic between 0-5M with a 802.1p 5, anything in excess of that I would like to be mark with 802.1p 0.

 

 

 

I have made a few attempts at this using HBT but while capturing the egress traffic in wireshark it looks as though PRI in the 802.1q header is marked as 0 regardless of the amount of traffic I am generating so i'm obviously doing something wrong.

 

 

 

I had a read through sbiddle post http://www.geekzone.co.nz/sbiddle/8744 which was a great resource but i'm specifically looking to mark 802.1p using HBT.

 

 

 

Here's a few of my attempts (The tags for the excess traffic are just set to something random for testing):

 

 

 

1)

 

 

 

 /ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=server_con src-address=192.168.88.0/24
add action=mark-packet chain=forward connection-mark=server_con new-packet-mark=server
add action=mark-packet chain=forward connection-mark=workstation_con new-packet-mark=workstations


/queue tree
add max-limit=200M name=Queue_A1 parent=ether1-gateway
add limit-at=0M max-limit=4M name=Queue_C1 packet-mark=HighPri parent=Queue_A1 priority=5
add limit-at=5M max-limit=200M name=Queue_D1 packet-mark=LowPri parent=Queue_A1 priority=7

 

 

 

2)

 

 

 

/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=server_con src-address=192.168.88.0/24
add action=mark-packet chain=forward connection-mark=server_con new-packet-mark=server


/queue tree
add max-limit=200M name=Queue_A1 parent=ether1-gateway
add limit-at=0M max-limit=4M name=Queue_B1 packet-mark=server parent=Queue_A1 priority=5
add limit-at=5M max-limit=200M name=Queue_C1 packet-mark=server parent=Queue_A1 priority=8

 

 

 

3)

 

 

 

/ip firewall mangle
add action=set-priority chain=postrouting comment="From dscp high 3 bits" \
new-priority=from-dscp-high-3-bits
add action=mark-packet chain=postrouting comment="Priority 0" \
new-packet-mark=prio0 priority=0
add action=mark-packet chain=postrouting comment="Priority 1" \
new-packet-mark=prio1 priority=1
add action=mark-packet chain=postrouting comment="Priority 2" \
new-packet-mark=prio2 priority=2
add action=mark-packet chain=postrouting comment="Priority 3" \
new-packet-mark=prio3 priority=3
add action=mark-packet chain=postrouting comment="Priority 4" \
new-packet-mark=prio4 priority=4
add action=mark-packet chain=postrouting comment="Priority 5" \
new-packet-mark=prio5 priority=5
add action=mark-packet chain=postrouting comment="Priority 6" \
new-packet-mark=prio6 priority=6
add action=mark-packet chain=postrouting comment="Priority 7" \
new-packet-mark=prio7 priority=7


/queue tree
add comment="Link limited at 200,200 Mbps" limit-at=200M max-limit=200M name=\
queue-vlan10 parent=ether1 queue=default

add limit-at=0M max-limit=5M name=queue-vlan10-p1 packet-mark=prio5 parent=\
queue-vlan10 priority=1 queue=default

add limit-at=5M max-limit=200M name=queue-vlan10-p2 packet-mark=prio6 parent=\
queue-vlan10 priority=2 queue=default

 

 

 

Any help would be much appreciated. Thanks!

 

 

 

 

 

 


Create new topic
sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #1518583 23-Mar-2016 18:45
Send private message

I'd need to think about it more about how to actually do it but just skimming through that post it's probably not working because you can't set an 802.1p tag unless data is already encapsulated within a 802.1q header - and I'm making the assumption looking at the config above that it's not.

 

 

 

 




TheKitchen

10 posts

Wannabe Geek
Inactive user


  #1518901 24-Mar-2016 11:39
Send private message

Hi, Thanks for the reply.

 

 

 

ether1 tags all traffic with VLAN10, I have a LAN tap between ether1 and the Chorus ONT so I can see VLAN10 in the 802.1q so it appears to be there. 

 

 

 

I see what you're saying though, perhaps the rules are trying to set the 802.1p before there is any 802.1q, I might try applying the 802.1q during the queueing process.

 

 

 

Cheers,

 

 


sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #1519139 24-Mar-2016 16:29
Send private message

I've got my UFB on VLAN10 and do stuff for customers with voice on the CIR, but I've never tried to do what you're doing which is send 5Mbps on the CIR and then everything after that on the EIR. I'll have a play over the weekend if I get time because I'm curious how to do it.

 

 




TheKitchen

10 posts

Wannabe Geek
Inactive user


  #1521946 28-Mar-2016 23:29
Send private message

Hi There,

 

Did some tinkering over the weekend and it does not look like I can use HTB for what I want to achieve.

 

From my testing I gather that in HTB for RouterOS you cannot change the packet mark during the queuing phase so unfortunately you cannot reclassify the excess, you can mark the traffic before it goes to HTB so for example you can set a packet mark for a subnet or protocol and reserve traffic for that packet mark but you cannot reclassify or mark what traffic goes over.

Here's a few of my notes below, if "/queue tree" had something like "new-packet-mark=" I could use that to classify excess as LP and then use a mangle rule to set that traffic to 802.1p 0 but it does not look like that is a feature in RouterOS. The idea was to set all egress to 802.1p 5 and then any excess would be sent to Queue_C1 (Excess traffic is sent through the Queues only when "limit-at=" is met) and then be reclassified to 802.1P 0.

***802.1p manipulation***
/ip firewall mangle add chain=output action=set-priority new-priority=5
/ip firewall mangle add chain=output packet-mark=LP action=set-priority new-priority=0


***Queue Creation***
/queue tree add name=Queue_A1 parent=ether1 max-limit=200M
/queue tree add name=Queue_B1 parent=Queue_A1 max-limit=200M limit-at=5M priority=2
/queue tree add name=Queue_C1 parent=Queue_A1 max-limit=200M limit-at=5M priority=1 packet-mark=LP

As a side note, the "priority=" handle is just specific to "/queue" and is irrelevant to 802.1Q, that threw me off for a bit.

 

Also attatched a diagram of Mikrotiks packet flow for further clarification:

 

 

 

 

I'm going to have a go in IOS so will report back if anyone is interested.

 

 

 

 


Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.