Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    PRIQ on different interfaces

    Traffic Shaping
    4
    13
    1929
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mbarnes last edited by

      Quick question. Does the priority span interfaces or are they unique to each interface?

      As an example, if I have a LAN1 default queue set to priority 1 and a LAN2 default priority set to 2, will LAN2 have a higher priority when going out to WAN?

      Thanks

      1 Reply Last reply Reply Quote 0
      • H
        Harvy66 last edited by

        Priorities are assigned to queues and queues are assigned to interfaces. Packets don't get prioritized, queues do.

        Does the priority span interfaces or are they unique to each interface?

        Nope. They are unique per interface.

        I should also mention that priorities are only applied to packets leaving an interface. This makes your question kind of moot. It doesn't matter which interface your packets enters, all that matters is what rule matches and which queue your rules assign a packet to. Of course you can have a rule on your LAN interfaces that makes packets get placed in different queues based on which interface they enter.

        1 Reply Last reply Reply Quote 0
        • M
          mbarnes last edited by

          Good to know.

          How would I handle prioritizing one LAN over the other? If priority is outbound of the interface, and NAT rules are processed before firewall rules are evaluated, wouldn't that make it impossible to have one LAN take precedence over the other, as the source address would always be the WAN address?

          Thanks again.

          1 Reply Last reply Reply Quote 0
          • H
            Harvy66 last edited by

            @mbarnes:

            Good to know.

            How would I handle prioritizing one LAN over the other? If priority is outbound of the interface, and NAT rules are processed before firewall rules are evaluated, wouldn't that make it impossible to have one LAN take precedence over the other, as the source address would always be the WAN address?

            Thanks again.

            I think you are correct that if you place a floating rule on your WAN that tries to match a new egress state, you cannot tell which LAN interface the state is coming from because of NAT, but if you place a rule on the appropriate LAN interfaces, then you know which interface the state is coming from.

            So. Match on the ingress of the LAN interface instead of the egress on the WAN interface.

            Of course, someone else may know more about how to better use the firewall and give more ideas, but I figured I'd try to be helpful since no one else has yet.

            1 Reply Last reply Reply Quote 0
            • M
              mbarnes last edited by

              Noted.

              Does that still work for outbound traffic? That is, if the state is LAN -> WAN, and I'm matching outbound on LAN, does that work? What about the Ack/Queue? Does the logic flip if matching the other way? Does throttling/prioritizing Queue and Ack work the same if limiting both upload and download speed regardless of the connection initiation direction? Or am I looking at this from the perspective of how PF works and actually ALTQ doesn't have the same concept of "direction"?

              Thanks a bunch.

              1 Reply Last reply Reply Quote 0
              • H
                Harvy66 last edited by

                Your questions are more related to how the firewall works and not traffic shaping.

                if the state is LAN -> WAN, and I'm matching outbound on LAN, does that work?

                Traffic going from LAN to WAN is entering the LAN and exiting the WAN. Matching outbound LAN will not match that.

                The firewall is quite simple except for floating rules. Even then, it's still simple, just less simple. The simplest way is to just place a pass rule on your LAN interface that assigns the state to whatever queue you want. The general idea is the state is created and assigned on the interface that first sees the new state. The one exception to rules applying to ingress only is floating rules being able to apply

                This may help a bit  https://doc.pfsense.org/index.php/What_are_Floating_Rules

                1 Reply Last reply Reply Quote 0
                • E
                  Ecnerwal last edited by

                  Another option I've seen mentioned but not actually done much with is to use a rule to mark the packet on one side, and match the mark on the other side.

                  In rules, advanced options, advanced features.

                  1 Reply Last reply Reply Quote 0
                  • H
                    Harvy66 last edited by

                    @Ecnerwal:

                    Another option I've seen mentioned but not actually done much with is to use a rule to mark the packet on one side, and match the mark on the other side.

                    In rules, advanced options, advanced features.

                    Do you mean to "mark" using 802.1p?

                    1 Reply Last reply Reply Quote 0
                    • E
                      Ecnerwal last edited by

                      No; as far as I understand it these "marks" are internal to the firewall.

                      http://www.openbsd.org/faq/pf/tagging.html

                      Quote from link above: "Tags are internal identifiers. Tags are not sent out over the wire."

                      1 Reply Last reply Reply Quote 0
                      • H
                        Harvy66 last edited by

                        Ahh, internal metadata. I didn't see anything in the rule UI. I'd be interested in this.

                        1 Reply Last reply Reply Quote 0
                        • N
                          Nullity last edited by

                          IIRC, if traffic is assigned to qArbitrary, then when the reply traffic arrives, if there is a similarly named qArbitrary on that interface, the traffic is automatically assigned to that queue.

                          I dunno if that is useful or not, but there it is. :)

                          1 Reply Last reply Reply Quote 0
                          • E
                            Ecnerwal last edited by

                            @Harvy66:

                            Ahh, internal metadata. I didn't see anything in the rule UI. I'd be interested in this.

                            It's there, but VERY understated. One box for marking (put on a rule on one side) one box (lower) for matching (put on a rule on the other side) Both are in the Advanced features section on the bottom of the rule page which you may have to scroll down to even see, and then in the Advanced Options part of that.

                            The text below the first one sayeth: You can mark a packet matching this rule and use this mark to match on other NAT/filter rules. It is called Policy filtering

                            The text below the second sayeth: You can match packet on a mark placed before on another rule.

                            1 Reply Last reply Reply Quote 0
                            • H
                              Harvy66 last edited by

                              Ahh.. Seems to be a text field. I wonder if it's actually internally doing string compares. If it is, shorter strings are better.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post

                              Products

                              • Platform Overview
                              • TNSR
                              • pfSense
                              • Appliances

                              Services

                              • Training
                              • Professional Services

                              Support

                              • Subscription Plans
                              • Contact Support
                              • Product Lifecycle
                              • Documentation

                              News

                              • Media Coverage
                              • Press
                              • Events

                              Resources

                              • Blog
                              • FAQ
                              • Find a Partner
                              • Resource Library
                              • Security Information

                              Company

                              • About Us
                              • Careers
                              • Partners
                              • Contact Us
                              • Legal
                              Our Mission

                              We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                              Subscribe to our Newsletter

                              Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                              © 2021 Rubicon Communications, LLC | Privacy Policy