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

10 posts

Wannabe Geek


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



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 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):








 /ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=server_con src-address=
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








/ip firewall mangle
add action=mark-connection chain=prerouting new-connection-mark=server_con src-address=
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








/ip firewall mangle
add action=set-priority chain=postrouting comment="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
29038 posts

Uber Geek

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.





10 posts

Wannabe Geek


  #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.








29038 posts

Uber Geek

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.



10 posts

Wannabe Geek


  #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

Twitter and LinkedIn »

Follow us to receive Twitter updates when new discussions are posted in our forums:

Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:

Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:

News »

Chorus completes the build and commissioning of two new core Ethernet switches
Posted 8-Jul-2020 09:48

National Institute for Health Innovation develops treatment app for gambling
Posted 6-Jul-2020 16:25

Nokia 2.3 to be available in New Zealand
Posted 6-Jul-2020 12:30

Menulog change colours as parent company merges with Dutch food delivery service
Posted 2-Jul-2020 07:53

Techweek2020 goes digital to make it easier for Kiwis to connect and learn
Posted 2-Jul-2020 07:48

Catalyst Cloud launches new Solutions Hub to support their kiwi Partners and Customers
Posted 2-Jul-2020 07:44

Microsoft to help New Zealand job seekers acquire new digital skills needed for the COVID-19 economy
Posted 2-Jul-2020 07:41

Hewlett Packard Enterprise introduces new HPE GreenLake cloud services
Posted 24-Jun-2020 08:07

New cloud data protection services from Hewlett Packard Enterprise
Posted 24-Jun-2020 07:58

Hewlett Packard Enterprise unveils HPE Ezmeral, new software portfolio and brand
Posted 24-Jun-2020 07:10

Apple reveals new developer technologies to foster the next generation of apps
Posted 23-Jun-2020 15:30

Poly introduces solutions for Microsoft Teams Rooms
Posted 23-Jun-2020 15:14

Lenovo launches new ThinkPad P Series mobile workstations
Posted 23-Jun-2020 09:17

Lenovo brings Linux certification to ThinkPad and ThinkStation Workstation portfolio
Posted 23-Jun-2020 08:56

Apple introduces new features for iPhone iOS14 and iPadOS 14
Posted 23-Jun-2020 08:28

Geekzone Live »

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

Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron

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.

Alternatively, you can receive a daily email with Geekzone updates.