在一次停電後復電的情況下,NAS寄信告訴我機房有斷電的情況,且NAS剛開好機。雖然裡面有UPS,但看起來斷電的時間超過UPS的極限,所以最後就是大家抱團一起死。
NAS、Fortigate、Switch這類型的機器會自動開機,但同在機房中的其他設備就沒有這麼好運了,因為我不在機房附近,所以當下Esxi 及 PC皆成了死局,於是就有了這一篇,我該如何透過Wake up on lan(WOL)的功能來叫醒已關機的電腦及Esxi。
環境
- 防火牆版本:Fortigate 7.2.5
- 電腦版本:Windows 10 22H2
設定
電腦設定:
- BIOS有WOL的設定,請先自行查詢設定並開啟。每家機板都不同,Google是你的好朋友。
- Windows 10的設定頁面如下,(很多方法都可以達到目標,我是選最笨的一種)





- 找出你網卡的Mac-address


防火牆設定
- WOL指令
- show system interface ? #display all interface.
- execute wake-on-lan #tell you how to command.
- Usage: execute wake-on-lan interface mac-address [protocol] [port] [ip] [password]
- [protocol] Protocol used by WoL packets (1-WoL, 2-UDP, default = 2)
- [port] Port used by UDP WoL packets, (0, 7, or 9, default = 9)
- [ip] Broadcast IP used by UDP WoL packets.
- [password] Password of the destination host if SecureOn is enabled.
- WOL範例
- 這邊注意一件事,interface 指的是系統給的interface名稱,不是你設定的Alias名稱。不清楚的請從Web UI進到interface去確認。
- 喚醒DMZ interface的主機
- execute wake-on-lan dmz 74:d4:35:xx:xx:xx 1 9 192.168.xx.xx
- 喚醒LAN interface的主機
- execute wake-on-lan internal 00:15:d3:xx:xx:xx 1 9 192.168.xx.xx