Here's some code I use to shutdown my pc remotely:
CODE
from telnetlib import Telnet
tn = Telnet('192.168.1.100', 23)
tn.read_until('login:')
tn.write('xbox\r')
tn.read_until('password:')
tn.write('xbox\r')
tn.read_until('>')
tn.write('shutdown -s -t 120\r')
tn.read_until('>')
tn.write('exit\r')
tn.close()
Pretty basic but does the job. Would have thought something similar would work
for your router