I need your help to set up QOS for internet traffic.
Currently we are facing issue for our VOIP traffic we want to assign particular bandwidth for VOIP in such a way that if there is VOIP traffic bandwidth pipe will get assigned(Will increase decrease as per traffic) to it else it can be used by other traffic (Specifically I am looking for dynamic QOS settings)
Much information within Cisco's main site. By default, most Cisco QoS doesn't reserve bandwidth, in the sense, that unused bandwidth, for its specific purpose, can otherwise be used.
For example, given a policy like:
bandwidth percent 99
bandwidth percent 1
Class Background would be allowed any bandwidth not being used by Class Foreground, although it's guaranteed a minimum bandwidth of 1% even if Foreground wants 100%. Further, even when Foreground it not using its guaranteed minimum of 99% it would be dequeued, relative to Background, in a ratio of 99:1. What the latter means, if Foreground was only using 1% and Background using 99%, Foreground packets will most often be dequeued/sent before Background packets.
"QoS does not make any sense if applied to WAN links."
I suspect what @Leo Laohoo really has in mind is Internet WAN links, because for "private" WAN links, QoS often makes even more sense than for LAN links. But, even with Internet connections, QoS is not always ineffective, much depends on the nature of your Internet usage. (I'll explain more, in my next post, to the OP.)
Before I could even offer QoS advice, need to understand your Internet topology and traffic usage, as to use QoS with the Internet only makes sense when done in specific ways. Hopefully the following will provide background.
Generally, the Internet does not "honor" or provide any kind of QoS support, for traffic transiting it. (At least for "general" Internet traffic. "Under the covers" ISPs may also support private clouds on the same equipment/links, and that traffic often does get QoS prioritization over "general" Internet traffic, and the private traffic, itself, might also be supplied with QoS capabilities within the private traffic too.)
In the case of "general" Internet traffic, we can often apply very comprehensive and effective QoS to traffic as it enters the Internet, and can apply some QoS to Internet traffic that arrives from the Internet, the latter not so comprehensive, and its effectiveness varies greatly along with possible adverse side effects to try to make it effective. (Egress QoS might be considered like neurosurgery while ingress QoS might be compared to Civil War surgery.)
The Internet, itself, internally, often is well provisioned with bandwidth, so QoS, would also often offer no real benefit. Usually the bandwidth "chokepoints" of the Internet are our connections to it.
As mentioned above, we can often do great QoS, to our traffic, as it enters the Internet. Such traffic, often would not need QoS within the Internet. But our QoS capabilities, are limited for our traffic leaving the Internet, which is often a chokepoint that really needs QoS, and again, where an ISP won't provide it.
So we're in a hopeless situation? No.
The key trick, for effective QoS across the Internet, is if traffic from the Internet is only sourced by us, we can pretty much manage it from the far side. E.g. Site A <Internet> Site B. If Site A is the only sender of traffic to site B, and it "know" what Site B's bandwidth is, it can manage that such that Site A and Site B will behave much like a private p2p link, including all the things we can do with QoS, such as, prioritize VoIP yet dynamically allow other traffic to use whatever bandwidth is not needed by VoIP.
In general practice, what this also means, we cannot use Internet QoS interface for any other traffic from locations we don't control. Assuming you also want such "regular" Internet access, you need to have one Internet link for that purpose and one Internet link, whose traffic uses it, where all endpoints are managed by us. (Basically, the latter becomes our own "private" WAN cloud using the Internet for transport.)
From personal experience, within a global enterprise, the prior described "private" WAN cloud, using the Internet, usually works, very, very well; also much, much less expensive than vendor provided "private" WAN clouds (also, especially in 3rd world countries, much easier to obtain too).
Do note, I wrote this approach usually works very, very well, but as it's does ride on the Internet, and ISPs offer no SLAs, you can hit performance snags. (Of course, I've seen performance issues in real "private" WAN clouds too, only real difference, you might get a service credit for SP not maintaining your SLAs. For either, ISP or SP, if reoccurring service problems, often you need to shop for another provider [if possible].)
If you can share what your topology is now and/or whether you can add Internet links, we can get into how to configure QoS.