06-16-2014 07:22 AM - edited 03-04-2019 11:09 PM
Hi,
We have a customer with a Cisco CISCO1941/K9. The router has 2 WAN connection. 1 connection has a monthly bandwith limit of 20GB/month and is an high speed connection. The second connection is unlimited and used as a fallback connection in case the primary line is unreachable.
We need to prevent the primary connection to use more as 20GB/monthly and in case it uses 20GB make the router switch to the second connection till the new billing period starts.
Is there any way to do this on a Cisco CISCO1941/K9 without Cisco Prime / extra hardware/software costs?
Thanks in advance for any reply.
Sven
Solved! Go to Solution.
06-16-2014 09:22 AM
There is a usage EEM policy at the link below. It was built to monitor the usage over 4G interfaces but there is no reason why it would not work for your use case as well. The current policy notifies via syslog messages on BW and additional logic will need to be added to fail the routing over from your primary to backup interface.
https://supportforums.cisco.com/document/12098671/monitor-byte-count-over-4g-cellular-interfaces
06-20-2014 05:32 AM
There is one line that needs to be removed when using an interface that is not cellular which is "regsub -all {r} $interface "r " interface" This changed the "Cellular0" to "Cellular 0" I commented it out in the attached file and it is working as expected.
*Jun 20 12:19:01.840: %HA_EM-6-LOG: data_limit.tcl: C819-4G FastEthernet1 has used 34297149. Bytes with a monthly subscription of 100000000 Bytes (34.297149 % used)
*Jun 20 12:20:01.856: %HA_EM-6-LOG: data_limit.tcl: C819-4G FastEthernet1 has used 34308997. Bytes with a monthly subscription of 100000000 Bytes (34.308997 % used)
*Jun 20 12:21:01.836: %HA_EM-6-LOG: data_limit.tcl: C819-4G FastEthernet1 has used 34331844. Bytes with a monthly subscription of 100000000 Bytes (34.331844 % used)
06-16-2014 09:22 AM
There is a usage EEM policy at the link below. It was built to monitor the usage over 4G interfaces but there is no reason why it would not work for your use case as well. The current policy notifies via syslog messages on BW and additional logic will need to be added to fail the routing over from your primary to backup interface.
https://supportforums.cisco.com/document/12098671/monitor-byte-count-over-4g-cellular-interfaces
06-16-2014 09:42 AM
Thanks for your quick response. This helps a lot.
06-20-2014 05:06 AM
Daniel,
I modified the script to work with the FastEthernet interface instead of the Cell interface. but every time I run the script I get an error that the inputbytes (outputbytes also) variable is unavailable.
Can you take a quick look at the modifications to make sure it's done correctly?
Thanks,
Sven
06-20-2014 05:32 AM
There is one line that needs to be removed when using an interface that is not cellular which is "regsub -all {r} $interface "r " interface" This changed the "Cellular0" to "Cellular 0" I commented it out in the attached file and it is working as expected.
*Jun 20 12:19:01.840: %HA_EM-6-LOG: data_limit.tcl: C819-4G FastEthernet1 has used 34297149. Bytes with a monthly subscription of 100000000 Bytes (34.297149 % used)
*Jun 20 12:20:01.856: %HA_EM-6-LOG: data_limit.tcl: C819-4G FastEthernet1 has used 34308997. Bytes with a monthly subscription of 100000000 Bytes (34.308997 % used)
*Jun 20 12:21:01.836: %HA_EM-6-LOG: data_limit.tcl: C819-4G FastEthernet1 has used 34331844. Bytes with a monthly subscription of 100000000 Bytes (34.331844 % used)
06-20-2014 05:42 AM
Thanks once again. We missed it with 2 people.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide