OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • WAN DHCP6 VLAN Priority tagging
« previous next »
  • Print
Pages: 1 [2] 3 4

Author Topic: WAN DHCP6 VLAN Priority tagging  (Read 5323 times)

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 9035
  • Karma: 618
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #15 on: December 29, 2017, 03:42:30 pm »
This is pretty nasty if true.

https://github.com/opnsense/core/blob/master/src/etc/inc/interfaces.lib.inc#L160

You can temporarily defang the VLAN setup by deleting the "vlanpcp" stuff there.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #16 on: December 29, 2017, 03:45:27 pm »
Confirmed, if I set the overall VLAN priority it all follows that, the dhcp6 packets get changed  to Pri 6.
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

nivek1612

  • Full Member
  • ***
  • Posts: 131
  • Karma: 18
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #17 on: December 29, 2017, 03:47:23 pm »
I just set the VLAN priority to 3 in the GUI

My entry in rules.debug shows

pass out log quick on igb0_vlan832 proto udp from {any}  port {546} to {any}  port {547}  set prio 6 label "allow dhcpv6 client in WAN"

BUT wireshark trace show the VLAN still tagged as 3 so I conclude that the VLAN priority is overriding it or the rule is not modifying it

This is at 18.1
Logged
OPNsense 19.7.* on Qotom i5-5250U with Zen FTTC 80/20
OPNsense 19.7.* on Qotom i7-4500U with Orange FR FTTP 1000/250 and SFR FTTP 200/20

Team Rebellion Member
One of Marjohns TESTERS :-)

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 9035
  • Karma: 618
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #18 on: December 29, 2017, 03:48:14 pm »
Ok, that means we need an empty "keep default" default in the VLAN device setup. This will still blow up with user setups, I'll file a FreeBSD bug report next year.

For now you can edit out the vlanpcp setup instruction in interfaces.lib.inc and that should start working.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #19 on: December 29, 2017, 03:49:07 pm »
it's also at 17.11, it's an unusual situation though, we set a pri on an VLAN then overide a specific port.
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #20 on: December 29, 2017, 04:11:33 pm »
Quote from: marjohn56 on December 29, 2017, 03:49:07 pm
it's also at 17.11, it's an unusual situation though, we set a pri on an VLAN then overide a specific port.

That certainly stops the pri being set on the VLAN, sadly it has no effect on the dhcp6c packet, which is stubbornly still at 0
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #21 on: December 29, 2017, 04:23:28 pm »
Quote from: franco on December 29, 2017, 03:48:14 pm
Ok, that means we need an empty "keep default" default in the VLAN device setup. This will still blow up with user setups, I'll file a FreeBSD bug report next year.

For now you can edit out the vlanpcp setup instruction in interfaces.lib.inc and that should start working.

It seems that's not the problem either, even with that edited out, we're still not getting the pri set on the dhcp6c packet.
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

nivek1612

  • Full Member
  • ***
  • Posts: 131
  • Karma: 18
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #22 on: December 29, 2017, 04:28:01 pm »
Just tested at 18.1 as well

Same result with the vlanpcp edited out the priority no longer gets set via the GUI BUT its staying at 0
Logged
OPNsense 19.7.* on Qotom i5-5250U with Zen FTTC 80/20
OPNsense 19.7.* on Qotom i7-4500U with Orange FR FTTP 1000/250 and SFR FTTP 200/20

Team Rebellion Member
One of Marjohns TESTERS :-)

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 9035
  • Karma: 618
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #23 on: December 29, 2017, 04:33:05 pm »
Wow, creating any VLAN already seems to get it stuck at vlanpcp 0 according to ifconfig output, which makes escalating this to FreeBSD more urgent... But for now, time for some kernel code reading. :/
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #24 on: December 29, 2017, 04:41:43 pm »
Got it.

It is the net.link.vlan.mtag_pcp setting. Although I have set it to 1 in system.inc, that is not being honoured. I did a sysctl -a from the shell and it was showing 0, set it to 1 in the shell and voila, dhcp6c packets are now showing pri 6.

Ok, so why is the setting not being honoured in system.inc...
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 9035
  • Karma: 618
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #25 on: December 29, 2017, 04:46:29 pm »
Quote
It is the net.link.vlan.mtag_pcp setting.

Ok, that is what the code said. A bit counter-intuitive, but now all makes sense.

Let me take a look at that sysctl.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #26 on: December 29, 2017, 04:48:09 pm »
You are a shining star. :)
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

marjohn56

  • Hero Member
  • *****
  • Posts: 878
  • Karma: 89
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #27 on: December 29, 2017, 04:51:28 pm »
I'll get on and do the GUI setting for it, seems like we have it nailed now.
Logged
OPNsense 20.1.a* - Qotom Q355G4 - ISP - ZEN U.K.

Team Rebellion Member

nivek1612

  • Full Member
  • ***
  • Posts: 131
  • Karma: 18
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #28 on: December 29, 2017, 04:53:43 pm »
Loving the proactive support over here in the light

The darkside was so different  :)
Logged
OPNsense 19.7.* on Qotom i5-5250U with Zen FTTC 80/20
OPNsense 19.7.* on Qotom i7-4500U with Orange FR FTTP 1000/250 and SFR FTTP 200/20

Team Rebellion Member
One of Marjohns TESTERS :-)

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 9035
  • Karma: 618
    • View Profile
Re: WAN DHCP6 VLAN Priority tagging
« Reply #29 on: December 29, 2017, 04:56:23 pm »
Well, tunables GUI worked here even with reboot. All in all this teaches us it's something we should take care of automatically so changed the ticket accordingly and reverted the VLAN PCP configure code.

But... I'm not even convinced this will be a performance impact as we pass the packets through pf anyway and that setting only affects VLAN driver during transmission... ?

https://github.com/opnsense/core/issues/2032
Logged

  • Print
Pages: 1 [2] 3 4
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • WAN DHCP6 VLAN Priority tagging
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2019 All rights reserved
  • SMF 2.0.15 | SMF © 2017, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2