Wake on lan cmd

In addition to serving as a host, a LAN (or local area network) also gives users a certain amount of control over the PCs that are connected to a network. Included in this is the ability to turn a computer on or off from a remote location.

This article will explain how to use the Shutdown command to turn off a computer remotely as well as how to use the WakeOnLan standard to wake or boot a PC.

This method was tested using a Windows XP Professional computer.

Remotely Shutdown a Computer on a LAN

In order to control a computer remotely, please note that you must be connected to the same local network as the target PC. You must also know the username and password required for login.

The first step is to open TCP port 445 on the target computer. To do this, open your Start menu and then go to Settings > Control Panel > Security Center.

Open Windows Firewall and click the Exceptions tab.

Select the line that reads File Sharing and printers and press OK. If this line is missing, click Add Port and choose TCP port 445 .

Next, head to Start > Settings > Control Panel > System. Select the Remote tab and check the option that reads Allow users to connect remotely to this computer.

It is now time to open the command prompt.

Head to Start/Run or use the keyboard shortcut Windows + R. Next, type cmd and then hit OK. This will open your command prompt.

To obtain the necessary rights to run a shutdown command on the target machine, you must first run the net use command. Use the Windows + R keyboard shortcut and then enter net use \ip_address_of_target_machine. Enter an administrator username and password for the target computer to connect to the target PC.

Once connected to the target PC, we can run the shutdown command. An example of the command is given below, whereby instructions are given for the target computer to close all active applications and shutdown after 30 seconds of inactivity. Please note that you can substitute any of the variables according to your network or PC specifics:

-s: Shutdown the PC

-f: Force active applications to close without warning

-t xx: Set a countdown in seconds

-m \xxx.xxx.xxx.xxx: The IP address of the target computer

Читайте также:  Что такое активные калории в apple watch


The GUI is available by typing shutdown -i.

For any additional information about this command, type shutdown /?.

The WakeOnLAN Command

WakeOnLAN, as the name already suggests, is a tool that can boot or wake a computer by sending a Magic Packet to the network adapter of the target computer. It is important to note that not all network cards and BIOS are compatible with, or support, the use of Magic Packet.

In order to use the WakeOnLAN command, you must be connected to the same local area network (LAN) as the target computer. Knowledge of the physical location (MAC) and IP address of the target computer is also required.

Retrieve IP and MAC Address

The first step is to retrieve the IP address and MAC address of the target computer. To do this, go to Start/Run or use the keyboard shortcutWindows + R and type cmd > OK.

The command prompt will open. Now type ipconfig /all:


Copy the IP and physical (MAC) address of the target PC.

Compatibility Checks

It’s now time to check if your network card is compatible with Magic Packets. To do this, right-click on My Computer and click Manage. Next, go to Device Manager/Network Cards and do a right-click on your Network Card. Then click Properties.

Do a search for the following words and verify that all options that relate to them are currently active: Magic Packet, Wake On Magic Packet, Wake On Lan, or Wake. If none of these words appear, you may be required to update the drivers for your Network Card.

To see if your computer is BIOS compatible, enter the BIOS when you start the computer. You can do this by pressing ESC, F2, F5, F12 or DEL (depending on your system).

Once in the BIOS, go Power Options and enable Wake-On-LAN, or any similar option:

Open Port 8900

Wake On LAN (WOL)

Start by downloading the Symantec WOL tool on the source computer. Launch the tool and then fill in the empty fields using the information gathered above.

Mac Address: MAC address (the target machine)

Internet Address: Local IP address (target machine)

Subnet Mask: 255.255.255.255

Send Options: Local Subnet

Remote Port Number: 8900

Click the button: Wake Me Up

Once the packet has been received, the target computer will boot:

Boot Your PC From the Internet

In theory, it is possible to boot a remote PC from the internet. You will need configure your router to redirect a UDP packet to a specific port on all the network computers.

Читайте также:  Photo blob 0 что за файл

By sending the magic packets to your public IP address (on the correct port), you will be able to individually boot computers on your local network.

Boot Your PC Using Your Phone

If you want to wake up your computer while you are not at home using your phone, you will need an external PSTN modem (using the RS 232 serial port). Connect the modem to your computer and enable the option in your BIOS. From there, you can connect the modem to IP phone line from your router.

Image: © Arian Darvishi — Unsplash.com

A few words of thanks would be greatly appreciated.

changing the digital world one bit at a time.

Price — Wake On Lan Command Line is free.

I would love to change the world, but they won’t give me the source code.

Включаем компьютеры через сеть.

Сегодня мой рассказ пойдёт об включении компьютеров через локальную сеть, либо через интернет.

Давно хотел у себя на работе настроить компьютеры для ночной работы. Заходишь удалённо на сервачёк, а там дальше с него уже запускаешь нужные компьютеры в сети, удобно в любое время можно поработать. Вообще ездить не придётся на работу. Сегодня наконец-то руки дошли и я воплотил свой план.

Читайте также:  Холодильник hisense коды ошибок

Начну с системных требований:

1) Компьютер с ATX-источником питания

2) Материнская плата с поддержкой Wake On LAN

3) Сетевой адаптер с поддержкой Wake On LAN

Если сетевой адаптер или материнская плата поддерживают шину PCI версии 2.1, то нужен специальный трёхпроводной кабель для соединения Wake-On-LAN разъёмов материнской платы и сетевого адаптера. Если сетевой адаптер, и материнская плата поддерживают PCI 2.2, то кабель не нужен.

4) Программа, способная посылать Magic Packet.

Лампочка на сетевом адаптере должна гореть при выключенном компьютере, это первый признак поддержки включения по сети.

Не много теории, чтоб представление было, что как работает.

При выключении компьютера ( конечно не из розетки имею ввиду ) остаётся дежурное питание 5В оно подаётся на разъемы PS/2, USB, LAN предназначенное для запитки внутренних, внешних устройств с целью ожидания сигнала включения. Сетевой адаптер просматривает все пакеты, приходящие на его MAC-адрес и ничего не отвечает на них. Если одним из пакетов окажется Magic Packet, сетевой адаптер выдаёт сигнал на включение питания компьютера.

Magic Packet это специальная последовательность байтов, которую вставляют в пакеты UDP, TCP, IPX для прохождения по локальным сетям .

Состав Magic Packet

Вначале идет так называемая “цепочка синхронизации”, состоящая из 6 байт FF, а затем — MAC-адрес сетевой платы, повторённый 16 раз. То есть, если бы адрес платы выглядел как 01:02:03:04:05:06, то магический пакет оказался бы таким:

FFFFFFFFFFFF010203040506010203040506010203040506010203040506 010203040506010203040506010203040506010203040506010203040506 010203040506010203040506010203040506010203040506010203040506 010203040506010203040506

По умолчанию для WOL пакета используются порты 7 и 9 (протокол UDP)

Настройка компьютеров.

Проверим настройки Bios в разделе Power management…. ищем строку со словами Wake On LAN выбираем enable.
Проверяем настройки сетевого адаптера, заходим в диспетчер оборудования выбираем свою сетевую плату жмём свойства далее управление питанием ставим галочки напротив.
Разрешить отключение этого устройства для экономии энергии.
Разрешить устройству вывод компьютера из ждущего режима.

Сбор Mac адресов

Теперь нам нужно определить Mac адреса наших компов.
Данные о соответствии IP адреса и физического адреса хранятся в ARP-таблице.
Просмотреть ее содержимое можно командой ARP.
С сервачка запускаем cmd и пишем команду arp –a, результатом ее выполнения должна быть таблица, в которой будут перечислены все Ip и Mас адреса сетевых плат данного компьютера и локальных компьютеров.

Запуск компьютеров.

Переходим к самому интересному, качаем программу для запуска.

Wake On Lan for Windows GUI/Command Line, Pocket PC и другие –
http://www.depicus.com/wake-on-lan/

Скачали, установили, вбили данные нужного компьютера и всё компьютер должен запуститься.

Бывают вот такие случаи.

Материнская плата Гигабайт с интегрированным сетевым контролером (марвелл) не просыпается, в биосе всё включено.

Решение: нужно в свойствах драйвера в управлении питанием поставить нужные галки.

«>

Оцените статью
Добавить комментарий

Adblock
detector