cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1795
Views
8
Helpful
3
Replies
Highlighted

Script to shutdown/reactive 3G interface based on monthly traffic

Hello.

Is it possible to have a script that can shutdown a 3G interface when a pre-defined monthly traffic is reached and that reactivates the interface on the first day of the following month?

The scenario is that a customer has a Cisco 800 3G routers with a 3G card from a Service Provider, that offers a rate for X Mbytes per month and that when those monthly X Mbps are exceeded, a differente rate (much more expensive) is applied for the excess traffic that month.

The customer would like to have the router NOT to active the 3G access when the X Mbytes (on that month) are exceeded.

What additional features should the script use? ip accounting? netflow?

Does anyone have an example of a script with a similar functionality?

Thanks in advance.

Best regards,

Rui Antunes

3 REPLIES 3
Highlighted
Hall of Fame Cisco Employee

You don't need ip accounting or Netflow, really.  You could do this with SNMP byte counters.  The problem is reloads.  If the device reloads, you lose state.  Is that a concern?  Other than that, what you want is very doable.

Highlighted

Hello Joseph.

Thank you for your help.

Losing state due to a device reload is a concern, since for that month, we won't be able to guarantee that the 3G plafond is not exceeded. However, since a device reload should be rare, that is not very serious.

Is there any scripting examples for a similar function?

Best regards,

Rui Antunes

Highlighted
Hall of Fame Cisco Employee

Try this.  You'll need to set a few EEM environment variables first:

event manager environment mobile_interface Cellular0

event manager environment mobile_datafile flash:mobile.dat

event manager environment mobile_threshold 100000000

The threshold is specified in bytes.

Content for Community-Ad