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

    Possible? When it detects a voip call, throttle everything else to 1%?

    Traffic Shaping
    4
    24
    2.3k
    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.
    • T
      toysareforboys
      last edited by

      I have very freaky cable internet :(

      I'm paying for 1gig/50mbps but I've never seen more than 30mbps up.

      In the evening the upload speed drops to about 20mbps and the download speed drops to about 150mbps, so setting up traffic shaping rules is tricky.

      My main issue is with voip. We have 6 voip channels and 6 extensions connected to Anveo on port 5010 (sip.ca.anveo.com) using g711 (about 87kbps per channel so says the traffic queue). When doing big downloads using sftp (48 threads) it murders the voip (timeouts, dropped packets, big latency, etc.).

      What I would like to do is set up some type of rule that once it detects a voip call it throttles everything else to 1% or something. When I'm on a call I don't need to be using the internet. We don't have IPTV or anything else that needs priority.

      -Jamie M.

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

        Like you've said, fluctuating bandwidth complicates the matter. In general, you need to target your slowest rate.

        That being said, you don't need to limit to 1%, assuming that is possible in a non-kludgy way. If you look into the fq_Codel discussion, you should get pretty much everything you want and all you need to do is configure the bandwidth appropriately. It may be possible to setup some timed jobs that change ipfw's configured bandwidth for on-peak and off-peak times.

        1 Reply Last reply Reply Quote 0
        • KOMK
          KOM
          last edited by

          At work I just use PRIQ and classify voip traffic over everything else.  I don't have to worry about bandwidth allocation.

          1 Reply Last reply Reply Quote 0
          • T
            toysareforboys
            last edited by

            @Harvy66:

            In general, you need to target your slowest rate.

            You were right. If I set it to 125mbps voip works flawless, no matter how many downloads I have going on:

            (WAN gateway is pinging my sip provider, WAN6 is pinging google dns)

            Going to hurt bad during the daytime though.

            Thanks for the help!

            -Jamie M.

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

              You may be able to get away with no throttling your download so much as your upload. Your upload bandwidth is probably getting swamped with ACKs hurting VoIP.

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                "I'm paying for 1gig/50mbps but I've never seen more than 30mbps up."

                Why would you not call your isp if your not getting close to 50?  If you pay for gig and it drops to 150… Dude I would be complaining!!! Until they fix it - or move...

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                1 Reply Last reply Reply Quote 0
                • T
                  toysareforboys
                  last edited by

                  @johnpoz:

                  "I'm paying for 1gig/50mbps but I've never seen more than 30mbps up."

                  Why would you not call your isp if your not getting close to 50?  If you pay for gig and it drops to 150… Dude I would be complaining!!! Until they fix it - or move...

                  It's cable internet, they call it "up to" 1gig/50mbps so when I call and complain they say "you can pay $1300/mo for our dedicated fiber service, then you will get 1gig/1gig" lol :(

                  Voip seems to be working great if I throttle at 125mbps/20mbps and nobody is complaining so far so I'll keep it at that for now.

                  -Jamie M.

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

                    You can still complain. I have unlimited minutes and speakerphone on my cell phone. I'm willing to help keep their call center busy.

                    1 Reply Last reply Reply Quote 0
                    • KOMK
                      KOM
                      last edited by

                      Tell your ISP you're going to send them "up to" the amount of money they request each month.

                      1 Reply Last reply Reply Quote 0
                      • T
                        toysareforboys
                        last edited by

                        Still not working very well. I have to keep moving the speed down and down and down. I'm at 100mbps now :(

                        Is there absolutely NO way for the traffic shaping to detect the voip call and have it throttle everything else?

                        -Jamie M.

                        1 Reply Last reply Reply Quote 0
                        • KOMK
                          KOM
                          last edited by

                          Still not working very well.

                          What does that actually mean?  I don't see any drops in your voip queue.

                          Is there absolutely NO way for the traffic shaping to detect the voip call and have it throttle everything else?

                          Not automagically.  All pfSense has to work with are IP addresses and ports.  There is no built-in DPI stuff to figure out the app from the packet.

                          In my first reply to you, I mentioned that I use a dozen voip phones here in my office and I have no problems at all using the PRIQ shaper which doesn't care about bandwidth – only packet priority.  I'm surprised you didn't follow up on that.

                          1 Reply Last reply Reply Quote 0
                          • T
                            toysareforboys
                            last edited by

                            @KOM:

                            What does that actually mean?  I don't see any drops in your voip queue.

                            It never shows any drops in the voip queue. The problems are latency so big my sip provider drops the connection (or my voip phones time out connecting to the sip server) so all of a sudden I get an voicemail e-mail from my sip provider but my phones never ring. The other problem is garbled audio of course. As soon as I pause my download the audio returns to flawless, unpause my download and audio goes to crap.

                            @KOM:

                            Not automagically.  All pfSense has to work with are IP addresses and ports.  There is no built-in DPI stuff to figure out the app from the packet.

                            It doesn't need DPI. As you can see from the screenshot above it already "knows" there's a voip call in progress. When it detects that, throttle all the other stuff way down.

                            @KOM:

                            In my first reply to you, I mentioned that I use a dozen voip phones here in my office and I have no problems at all using the PRIQ shaper which doesn't care about bandwidth – only packet priority.  I'm surprised you didn't follow up on that.

                            I didn't believe packet priority would work in my case because it's being buffered at my ISP, not my modem (I assume). I'll investigate that option more and give it a try, thanks.

                            Someone sent me a script on here for OpenWRT x86 that will automatically throttle everything else when it detects a voip call, might give that a try.

                            -Jamie M.

                            1 Reply Last reply Reply Quote 0
                            • T
                              toysareforboys
                              last edited by

                              @KOM:

                              In my first reply to you, I mentioned that I use a dozen voip phones here in my office and I have no problems at all using the PRIQ shaper which doesn't care about bandwidth – only packet priority.  I'm surprised you didn't follow up on that.

                              PRIQ seems to be working much better, thanks! I have WAN and LAN set to PRIQ, qVoIP priority 15, qP2P priority to 0. Is it true that putting in bandwidth numbers or percentages does nothing with PRIQ? Freaky.

                              The only thing I'm finding with PRIQ is that http and https doesn't work well when downloading, DNS timeouts (DNS PROBE FINISHED NO INTERNET) or page loading timeouts mostly. In the traffic shaping wizard I set HTTP and DNS to "Higher priority".

                              -Jamie M.

                              1 Reply Last reply Reply Quote 0
                              • KOMK
                                KOM
                                last edited by

                                Is it true that putting in bandwidth numbers or percentages does nothing with PRIQ?

                                Yes.  The wizard is meant to support several different shapers in a one-size-fits-all manner, so some options don't apply depending on which shaper you're using.

                                The only thing I'm finding with PRIQ is that http and https doesn't work well when downloading, DNS timeouts (DNS PROBE FINISHED NO INTERNET)

                                Are you remembering to use UDP as well as TCP with your DNS floating rules?

                                1 Reply Last reply Reply Quote 0
                                • T
                                  toysareforboys
                                  last edited by

                                  @KOM:

                                  Are you remembering to use UDP as well as TCP with your DNS floating rules?

                                  It looks like the traffic wizard created both TCP and UDP floating DNS rules:

                                  Maybe I need to increase the priority of qOthersHigh?

                                  -Jamie M.

                                  1 Reply Last reply Reply Quote 0
                                  • KOMK
                                    KOM
                                    last edited by

                                    I don't know if that will help because the problem is weird.  I have a 100/100 connection, and I can pound our link without upsetting the voip calls.  How you're managing to do it with 1000/50 is a mystery to me.

                                    Where's Harvy66 when you really need him?  ;D

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

                                      @KOM:

                                      I don't know if that will help because the problem is weird.  I have a 100/100 connection, and I can pound our link without upsetting the voip calls.  How you're managing to do it with 1000/50 is a mystery to me.

                                      Where's Harvey66 when you really need him?  ;D

                                      My 8 year old Netgear 3700 took a crap. Just got my new Ubiquiti AC Pro last night. Been keeping an eye on this discussion. Need to make time to look over the new info.

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

                                        Can you show us what the traffic load looks like when you're having the issues, and also show us your "Quality" graph? Can you show us your current queue configuration on your WAN?

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          toysareforboys
                                          last edited by

                                          @Harvy66:

                                          Can you show us what the traffic load looks like when you're having the issues, and also show us your "Quality" graph? Can you show us your current queue configuration on your WAN?

                                          I just ran a test. Voip was horrible:

                                          Started my download at 04:11.
                                          All my phones were offline by 04:12.
                                          They stayed offline until 04:23 and when they came back up they had bad voice quality.
                                          They went back offline at 04:27 and stayed offline until my download finished (04:45) at which time they came back up with perfect voice quality.

                                          Graphs (hopefully this is what you asked for):

                                          -Jamie M.

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

                                            Is your test a TCP download? What are the priorities of your queues? Can you show Status/Queues during the test to make sure it looks like the expected traffic activity?

                                            Also, could you run a speedtes from DSLReports https://www.dslreports.com/speedtest and click the gear to make sure "Hi-Res BufferBloat" is set, and set to 32/32 streams.

                                            I find it very interesting that the start of the load shows a delayed mirrored shape of the throughput and the latency. Bandwidth peaks around 300Mb, but the latency doesn't go back to normal until ~220Mb/s, where it goes to stead-state throughput and normal latency for a while. I also noticed that the inpass and outpass is 30:1 ratio, sounding like ACKs. The reason I asked about DLSReports is because the upload test will give an idea of what your max upload is before queuing starts.

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