Cisco Router Wake On Lan

by | Jun 14, 2023 | IT Tips | 0 comments

Haven't confirmed this to work yet but leaving here so I have a reference for later

In the Cisco enable prompt

1
Router# tclsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
proc WakeOnLan {broadcastAddr macAddr} {
     set net [binary format H* [join [split $macAddr -:] ""]]
     set pkt [binary format c* {0xff 0xff 0xff 0xff 0xff 0xff}]
 
     for {set i 0} {$i < 16} {incr i} {
        append pkt $net
     }
 
     # Open UDP and Send the Magic Paket.
     set udpSock [udp_open]
     fconfigure $udpSock -translation binary \
          -remote [list $broadcastAddr 4580] \
          -broadcast 1
     puts $udpSock $pkt
     flush $udpSock;
     close $udpSock
}
1
WakeOnLan 255.255.255.255 98Fa9b55c5e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
proc WakeOnLan {broadcastAddr macAddr} {
     set net [binary format H* [join [split $macAddr -:] ""]]
     set pkt [binary format c* {0xff 0xff 0xff 0xff 0xff 0xff}]
 
     for {set i 0} {$i < 16} {incr i} {
        append pkt $net
     }
 
     # Open UDP and Send the Magic Paket.
     set udpSock [udp_open]
     fconfigure $udpSock -translation binary \
          -remote [list $broadcastAddr 4580]
     puts $udpSock $pkt
     flush $udpSock;
     close $udpSock
}

WakeOnLan 10.19.23.255 98Fa9b55c5e0

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.