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

    set dscp

    Scheduled Pinned Locked Moved CE 2.7.0 Development Snapshots (Retired)
    10 Posts 3 Posters 1.1k Views
    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.
    • yon 0Y
      yon 0
      last edited by

      i want setup dscp 63 (0x3f) in pfsense. But there is no such value option in firewall rule, I hope to increase the value entered by the user..

      alt text

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        pf can only match DSCP. There is no way to set it or change it.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        yon 0Y 1 Reply Last reply Reply Quote 1
        • yon 0Y
          yon 0 @jimp
          last edited by

          @jimp said in set dscp:

          pf can only match DSCP. There is no way to set it or change it.

          DSCP has 63. I have successfully set 63 value DSCP in ubuntu.
          -A FORWARD -j DSCP --set-dscp 0x3f

          https://ipset.netfilter.org/iptables-extensions.man.html

          dscp
          This module matches the 6 bit DSCP field within the TOS field in the IP header. DSCP has superseded TOS within the IETF.
          [!] --dscp value
          Match against a numeric (decimal or hex) value [0-63].

          Bob.DigB 1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Ah, all of the wording in your original message implied changing/setting the value, not matching it.

            That DSCP value is uncommon and unlikley to be respected by anything, why would anyone need/want it?

            We can add more values to the drop-down but the ones we have are there because they are listed in various RFCs for DSCP/TOS (See https://docs.netgate.com/pfsense/en/latest/trafficshaper/dscp.html )

            While the packet field may support values from 0-63 that doesn't mean they will all work properly in real-world networks.

            pf seems to accept 0x3f though so we could consider adding that, it's not a large change.

            diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
            index 8ca98fced2..7a36190abd 100644
            --- a/src/usr/local/www/guiconfig.inc
            +++ b/src/usr/local/www/guiconfig.inc
            @@ -114,7 +114,8 @@ $firewall_rules_dscp_types = array(
             	"cs7",
             	"0x01",
             	"0x02",
            -	"0x04");
            +	"0x04",
            +	"0x3f");
             
             $auth_server_types = array(
             	'ldap' => "LDAP",
            

            You could also keep that as a local custom patch in the system patches package.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            yon 0Y 1 Reply Last reply Reply Quote 0
            • Bob.DigB
              Bob.Dig LAYER 8 @yon 0
              last edited by

              @yon-0 I am using AF33 (30/0x1e) with success from Windows to pfSense.

              yon 0Y 1 Reply Last reply Reply Quote 0
              • yon 0Y
                yon 0 @jimp
                last edited by

                @jimp said in set dscp:

                但这并不意味着它们都可以在现实世界的网络中正常

                I've tested it and it gives a noticeable improvement in speed. Some big carrier networks in the world don't use default values, but give high priority to some less commonly used values. So I think leave technically allowed values to Users make decisions to set up based on their carrier network conditions.

                yon 0Y 1 Reply Last reply Reply Quote 0
                • yon 0Y
                  yon 0 @yon 0
                  last edited by

                  @yon-0 said in set dscp:

                  @jimp said in set dscp:

                  但这并不意味着它们都可以在现实世界的网络中正常

                  I've tested it and it gives a noticeable improvement in speed. Some big carrier networks in the world don't use default values, but give high priority to some less commonly used values. So I think leave technically allowed values to Users make decisions to set up based on their carrier network conditions.

                  My internet speed is 5-10 times faster

                  1 Reply Last reply Reply Quote 0
                  • yon 0Y
                    yon 0 @Bob.Dig
                    last edited by

                    @bob-dig said in set dscp:

                    @yon-0 I am using AF33 (30/0x1e) with success from Windows to pfSense.

                    Does your value increase your internet speed?

                    Bob.DigB 1 Reply Last reply Reply Quote 0
                    • Bob.DigB
                      Bob.Dig LAYER 8 @yon 0
                      last edited by

                      @yon-0 said in set dscp:

                      @bob-dig said in set dscp:

                      @yon-0 I am using AF33 (30/0x1e) with success from Windows to pfSense.

                      Does your value increase your internet speed?

                      No sry, it is only about LAN.

                      yon 0Y 1 Reply Last reply Reply Quote 0
                      • yon 0Y
                        yon 0 @Bob.Dig
                        last edited by

                        @bob-dig said in set dscp:

                        @yon-0 said in set dscp:

                        @bob-dig said in set dscp:

                        @yon-0 I am using AF33 (30/0x1e) with success from Windows to pfSense.

                        Does your value increase your internet speed?

                        No sry, it is only about LAN.

                        I use DSCP for the speed improvement of the world interstate long distance network. I use it for my own BGP network.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.