Scheduled Changes to MIR?

Is there a way MIR could be adjusted on a time schedule? For example, could I increase the MIR on a profile for a specific time window.. or change the MIR profile for a period of time? I imagine the change would have to be scripted, or somehow pushed through a RADIUS server, but I'm looking for any input.

I'm considering offering "the next faster service" during low use hours. 

Thanks - Chris

We would like to do a similar thing.  Where we are located, bandwidth is expensive, so offering 2AM-7AM 'quota free' periods or 'turbo boost' periods to encourage the heaviest users to schedule their downloads to those off-peak times, that would be interesting to us also. :)

Hi all,
Today such functionality is not available on ePMP devices.
But it can be easily performed by scheduled script(python for example) in crontab.

Let me know if you need example of such script.

Thank you.

@Fedor wrote:

Let me know if you need example of such script.

Yes please! An example would be great.

Thank you, Chris

You can change this in a simple bash/shell script using snmpset, like

snmpset -v2c -cPrivate . i 7

snmpset -v2c -cPrivate . i 1

First one sets MIR profile 7, second applies changes. (.

I'd worry about tracking and consistency.  Unless all customers are on the same service plan, and all are getting toggled, then you'd need to track who was on what plan.  (e.g. you bump a 4mbps customer to 10mbps class during the wee hours, but a 10mbps customer to 20mbps during that time - without tracking, script might take a 10mbps customer who wasn't reachable during bump-up and subsequently cut them to 4mbps)  This would quickly increase the complexity of the script, obviously, so I'd tend to handle that outside the script.

That said, if you have a mysql database or something listing the IPs to change, and simply want to change them to 'x' at a given time, the two lines above are the gist of it.

Literally, you can set up a single line cron job like:

1 1 * * * for ip in $(mysql -sss radios -u smlist -e 'select ip from sm where MIR=1;');do snmpset -v2c -cPrivate $ip i 2;snmpset -v2c -cPrivate $ip. i 1;done

 This assumes you have a mysql database named 'radios' with a table named 'sm', and a user 'smlist' allowed to query it without password, and SNMP writeable community string 'Private'.  It would run at 1:01am and find anyone whose provisioning was listed as MIR=1 and try to bump them to MIR=2 - do the same thing later (like "1 7 * * *" for 7:01am) to set them all back to MIR=1.

Everything inside the $(...) block can be changed to any command that will result in a simple text result with one IP address per line - so it could be "cat mir1SMs.txt" for example if you keep a simple text-file list of the IPs to change prepared.




Here is the simplest example with verification of current MIR profile, without additional errors verifications.

Script has only one IP address, but it could be inserted in cycle from IP addresses list converted in tuple.

__author__ = 'fedortrutsko'

import pexpect
import paramiko
import re

ssh = paramiko.SSHClient()
ssh.connect('', port=22, username='admin', password='admin')

stdin, stdout, stderr = ssh.exec_command('config show | systemConfigDeviceName')
devNameOut =
devName = str((re.sub(r"systemConfigDeviceName ",'', devNameOut)).strip() + ('>'))
print devName

stdin, stdout, stderr = ssh.exec_command('config show | wirelessMIRSTAProfileNumber')
currentMIRprofile =
print ('currentMIRprofile ' + currentMIRprofile)
MIRnum = int(str(re.sub(r"wirelessMIRSTAProfileNumber ",'', currentMIRprofile)).strip())

if MIRnum == 8:
child = pexpect.spawn("ssh admin@")
child.logfile = open("/tmp/mylog", "w")
child.sendline("show config\r")
child.sendline("config set wirelessMIRSTAProfileNumber 3\r")
child.sendline("config save\r")
child.sendline("config apply\r")
child.sendline("config show\r")

stdin, stdout, stderr = ssh.exec_command('config show | wirelessMIRSTAProfileNumber')
newMIRprofile =
print ('newMIRprofile ' + newMIRprofile)
print "Device does not need MIR profile changes" 
1 Like