Community discussions

MikroTik App
 
amorsen
newbie
Topic Author
Posts: 39
Joined: Wed Jun 13, 2007 2:17 pm

Setting 802.1p tag (CoS) based on DSCP

Tue Jan 12, 2010 6:13 pm

I have a need for setting the 802.1p tag based on the DSCP tag. I.e. basic DSCP-to-CoS translation, like vconfig set_egress_map does on plain Linux.

It seems like there are two possible workarounds for achieving this on RouterOS:

I can use the bridge chip to do the mapping. Unfortunately the platform is RB1000 which doesn't have a bridge chip, and the VLAN's are double tagged, so the bridge chip probably can't find the DSCP values anyway (they'll be offset by 16 bits because of the extra VLAN tag).

I can route to a bridge interface instead of to a physical interface. This probably works but it's a lot of configuration for 500 interfaces... Also, it seems like it could hurt performance.

Would it be difficult to expose the set_egress_map function in RouterOS?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8716
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Setting 802.1p tag (CoS) based on DSCP

Wed Jan 13, 2010 5:09 pm

/ip firewall mangle add chain=postrouting action=set-priority new-priority=from-dscp
 
User avatar
Eising
Member Candidate
Member Candidate
Posts: 272
Joined: Mon Oct 27, 2008 10:21 am
Location: Copenhagen, Denmark

Re: Setting 802.1p tag (CoS) based on DSCP

Fri Jan 15, 2010 11:19 am

Just want to confirm that this works. As for QinQ, new-priority sets the priority of both vlans.
The manual isn't very clear on the difference between from-dscp and from-ingress. Can anyone clarify? I imagine the difference is something like this:
from-ingress keeps the ingress priority regardless of dscp value (e.g. if the other device has a different cos-dscp mapping), where from-dscp uses whatever cos-dscp mapping routeros has. Am I right?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8716
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Setting 802.1p tag (CoS) based on DSCP

Fri Jan 15, 2010 11:44 am

yes, 'from-ingress' uses ingress packet .1p priority, w/o any mappings
 
amorsen
newbie
Topic Author
Posts: 39
Joined: Wed Jun 13, 2007 2:17 pm

Re: Setting 802.1p tag (CoS) based on DSCP

Fri Jan 15, 2010 12:39 pm

Thanks Chupaka! That's brilliant!

"For every complex problem, there is a solution that is simple, neat, and wrong."

Apparently for this particular problem there is also a solution that is simple, neat, and correct...