Page 1 of 1

I Can't set 802.1p on VLAN for DHCP [probably BUG]

Posted: Wed Feb 20, 2019 9:47 pm
by zimzum
I try set prority by two methods like i can read in this link: https://wiki.mikrotik.com/wiki/Vlans_on ... nvironment for the outputs requests. For example, the DHCP request is by VLAN ID: 2 and Priority 5 but the offer Mikrotik send with Priority 0 always.

(vlan 2 interface is in brVlan2 interface)
/interface bridge filter
add action=set-priority chain=output new-priority=5 out-bridge=brVlan2 passthrough=no
OR
/ip firewall mangle
add action=set-priority chain=postrouting new-priority=5 out-interface=VLAN2 passthrough=no
add action=set-priority chain=output new-priority=5 out-interface=VLAN2 passthrough=no

No one works.

Thanks for help.

Re: I Can't set 802.1p on VLAN

Posted: Wed Feb 20, 2019 10:10 pm
by anav
snippets of config are basically not the most useful or efficient at getting at the root of the issues...
Please post config
/export hide-sensitive file=yourconfig

Re: I Can't set 802.1p on VLAN

Posted: Thu Feb 21, 2019 11:40 am
by zimzum
I think that in this case the rest of the configuration matters little. Anyway:
# jan/02/1970 00:26:58 by RouterOS 6.43.12
# model = 951Ui-2HnD
/interface vlan
add interface=ether1 name=vlan2 vlan-id=2
/ip address
add address=192.168.2.1/24 interface=vlan2 network=192.168.2.0
/ip firewall mangle
add action=set-priority chain=postrouting new-priority=5 out-interface=vlan2

I added the address in vlan2 to make it easier to understand. I try to ping 192.168.2.2 which is a router from another manufacturer (huawei) that only accepts packages from vlan2 and priority 5. It never responds because it does not arrive with priority 5, but with 0.

I just need to use the Priority code point (PCP) bits in the IEEE 802.1Q header.

Re: I Can't set 802.1p on VLAN

Posted: Thu Feb 21, 2019 11:48 am
by jprietove
Chain should be output. Try this:
/ip firewall mangle
add action=set-priority chain=output new-priority=5 out-interface=vlan2

Re: I Can't set 802.1p on VLAN

Posted: Thu Feb 21, 2019 12:17 pm
by zimzum
Thanks for the reply jprietove.
Well, now the ping if it arrives with the correct priority, but I go back to my initial problem, the ping yes, but the DHCP does not ... the DHCP offer is sent with priority 0, although the DHCP Discover and the Request comes with priority 5.Therefore, the DHCP Offer never reaches its destination.
Why does it work with ICMP but not with DHCP? Maybe it's a bug?

The export of code added is:
/ip pool
add name=dhcp_pool0 ranges=192.168.2.2-192.168.2.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=vlan2 name=dhcp1
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1

Re: I Can't set 802.1p on VLAN

Posted: Thu Feb 21, 2019 12:59 pm
by mkx
Seems like DHCP bypasses most of processing on ROS and works quite directly on interfaces ...

Re: I Can't set 802.1p on VLAN

Posted: Thu Feb 21, 2019 1:06 pm
by zimzum
Seems like DHCP bypasses most of processing on ROS and works quite directly on interfaces ...
Thanks for the reply mkx

And what can be done in this case, report it as a bug? how do you do this? I need it to work like this ... :?

Re: I Can't set 802.1p on VLAN for DHCP [probably BUG]

Posted: Thu Feb 21, 2019 1:25 pm
by joegoldman
send a supout and explanation of your bug to support@mikrotik.com

Re: I Can't set 802.1p on VLAN for DHCP [probably BUG]

Posted: Wed Jul 24, 2019 6:31 am
by GervaisdeM1
Did this ever get sorted out? I am having the same issue.

Wish I had found this first instead of wasting my entire evening trying to make it work.
:(

Re: I Can't set 802.1p on VLAN for DHCP [probably BUG]

Posted: Wed Jul 24, 2019 11:42 am
by sindy
I was dealing with this in multiple posts here on the forum, the solution are /interface brifge filter rules or, if you are lucky, /interface ethernet switch rules setting the 802.1p priority. If you cannot find them, come back, I'll remember some keywords.