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.




10 posts

Wannabe Geek
+1 received by user: 2

Trusted
Orcon

Topic # 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!

 

 

 

 

 

 





No longer working for Orcon.


Create new topic
26196 posts

Uber Geek
+1 received by user: 5796

Moderator
Trusted
Biddle Corp
Lifetime subscriber

  Reply # 1518583 23-Mar-2016 18:45
One person supports this post
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
+1 received by user: 2

Trusted
Orcon

  Reply # 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,

 

 





No longer working for Orcon.


 
 
 
 


Try Wrike: fast, easy, and efficient project collaboration software
26196 posts

Uber Geek
+1 received by user: 5796

Moderator
Trusted
Biddle Corp
Lifetime subscriber

  Reply # 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
+1 received by user: 2

Trusted
Orcon

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

 

 

 

 





No longer working for Orcon.


Create new topic



Twitter »

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 »

Amazon launches the International Shopping Experience in the Amazon Shopping App
Posted 19-Apr-2018 08:38


Spark New Zealand and TVNZ to bring coverage of Rugby World Cup 2019
Posted 16-Apr-2018 06:55


How Google can seize Microsoft Office crown
Posted 14-Apr-2018 11:08


How back office transformation drives IRD efficiency
Posted 12-Apr-2018 21:15


iPod laws in a smartphone world: will we ever get copyright right?
Posted 12-Apr-2018 21:13


Lightbox service using big data and analytics to learn more about customers
Posted 9-Apr-2018 12:11


111 mobile caller location extended to iOS
Posted 6-Apr-2018 13:50


Huawei announces the HUAWEI P20 series
Posted 29-Mar-2018 11:41


Symantec Internet Security Threat Report shows increased endpoint technology risks
Posted 26-Mar-2018 18:29


Spark switches on long-range IoT network across New Zealand
Posted 26-Mar-2018 18:22


Stuff Pix enters streaming video market
Posted 21-Mar-2018 09:18


Windows no longer Microsoft’s main focus
Posted 13-Mar-2018 07:47


Why phone makers are obsessed with cameras
Posted 11-Mar-2018 12:25


New Zealand Adopts International Open Data Charter
Posted 3-Mar-2018 12:48


Shipments tumble as NZ phone upgrades slow
Posted 2-Mar-2018 11:48



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.

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