cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2877
Views
15
Helpful
5
Replies

Limit monthly bandwidth usage

svenvilters
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

Dan Frey
Cisco Employee
Cisco Employee

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

View solution in original post

Dan Frey
Cisco Employee
Cisco Employee

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)

 

View solution in original post

5 Replies 5

Dan Frey
Cisco Employee
Cisco Employee

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

Thanks for your quick response. This helps a lot.

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

Dan Frey
Cisco Employee
Cisco Employee

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)

 

Thanks once again. We missed it with 2 people.

Review Cisco Networking for a $25 gift card