RDP Wake-On-Lan в среде локальной сети

62826
oshirowanen

Как вы настраиваете RDP, чтобы иметь возможность подключаться к клиентским компьютерам?

По сути, я хочу иметь возможность активировать один или несколько компьютеров одновременно в нашей среде локальной сети.

18
Windows XP ? 7? Lawrence 10 лет назад 0
MS Windows 7 Pro oshirowanen 10 лет назад 0
Это была бы действительно хорошая особенность. Я на Windows 8.1 с обновлением 1, и до сих пор нет опции WOL, встроенной в MSTSC. Даже на Windows 10 TP. Samir 9 лет назад 0
Я делаю WOL через мой DD-WRT, а затем запускаю MSTSC и определяю имя хоста через NetBIOS. Удаленный ПК установлен на Magic Packet. Возможно, изменение этого на Pattern может помочь ему проснуться при запросе TCP SYN, как предложено ниже. Я не пробовал это. Кроме того, все мои машины с Windows 8, похоже, сталкиваются с этой странной проблемой случайного и непреднамеренного пробуждения через NIC, и установка триггера WOL на Magic-Packet-only, по-видимому, уменьшает проблему. По этой причине я предпочитаю триггер Magick Packet. У меня не было этой проблемы в Windows 7, поэтому случайные пробуждения могут не повлиять на вас, если вы все еще используете Windows 7. Samir 9 лет назад 0
Сейчас я провел быструю проверку и могу подтвердить, что отмена выбора опции «Только для Magic-Packet» в настройках питания для сетевой карты (то есть разрешение триггера по шаблону) позволяет вам разбудить удаленный ПК через MSTSC (RDP). Обратите внимание, что RDP-соединение будет разорвано в первый раз (вы получите ошибку). Это служит только для пробуждения удаленного ПК. После пробуждения вторая попытка подключения RDP будет более успешной. Протестировано на двух ПК с локальной сетью под управлением Windows 8.1 Update 1. (Используйте имя удаленного хоста вместо IP-адреса.) Samir 9 лет назад 0

3 ответа на вопрос

20
harrymc

Remote Desktop does not have any built-in remote wake-up capability. You will need to first use Wake-On-Lan to wake up the sleeping computer, before you can RDP to it.

To enable WOL on your computer, the first step is to check the hardware :

  • Your network card must support Wake-on-LAN
  • Your power supply must support Wake-on-LAN
  • Wake-on-LAN must be enabled in BIOS
  • Your router must be configured to forward broadcast packets
  • Your OS must be configured to enable Wake-on-LAN

Enable WOL in BIOS (from boot)

The actual method depends on your motherboard. However, if no such option is found in the BIOS, it might be safe to assume that it will work by default.

Enable WOL for your Ethernet Card

Open Device Manager from the Control Panel, expand Network Adapters and find your Ethernet Card. Right-click and open Properties then go to the Advanced tab and enable "Wake on Magic Packet" or something similar.

image1

Install Windows Feature "Simple TCPIP services"

Open Programs and Features from the Control Panel, click "Turn Windows features on or off" on the sidebar, scroll down and check "Simple TCPIP services", then click OK to install the feature.

image2

Start Service "Simple TCP/IP Service" (enables ports 7 & 9)

Open Services from Administrative Tools in Control Panel, scroll down to the service, ensure the service is started and that its Startup Type is set to Automatic so that it will run with Windows.

image3

Open UDP for Port 9 in Windows Firewall

Open Windows Firewall from Control Panel. Only UDP is needed, but you can if you wish open the TCP port as well. UDP is a broadcast packet which can always be received by your NIC, whereas TCP requires the computer to be powered up.

image4

WOL software

Many such are available on the Internet, by command line like wolcmd or its matching Graphical Interface found here.

source

Мы широко используем WOL и не включили простые службы TCP / IP или исключение брандмауэра. Если машина выключена, брандмауэр даже не работает для блокировки пакета WOL. Patrick Seymour 10 лет назад 4
@PatrickS .: Эти предметы являются частью стандартного рецепта поваренной книги для WOL, но ваш комментарий о том, что они излишни, кажется мне совершенно логичным. Я бы, возможно, был осторожен с брандмауэром, поскольку брандмауэры становятся все более изощренными. harrymc 10 лет назад 1
Я не уверен, как программные брандмауэры будут останавливать пакеты, когда они не работают. И даже если Simple TCP / IP открывает порты 7 и 9, эта служба также не работает, когда компьютер выключен. И WOL не требует ни порта 7, ни 9. Patrick Seymour 10 лет назад 3
@PatrickS .: Я думал о будущем. harrymc 10 лет назад 0
3
KGA

If the machine is a Physical machine, then you first configure it's BIOS to allow wake-on-lan and just send it a WakeOnLan packet, using any other software (there are many free ones) and then separately RDP to it.

If on the other hand they are Virtual Machines, then you have a problem. WOL relies on the NIC to do the wake, and in a VM you have virtual NICs not physical ones. In that case, you are dependent on your virtualization tool to support the WOL, if it supports it and is enabled, then you will send a WOL packet, as if you are doing it to a physical machine.

Note: With the default windows RDP client, you cannot configure a script to run prior to the connection, only after. I suggest you package mstsc.exe to run inside a BAT script that sends the WOL packet, waits for a few minutes and then launches mstsc.exe (i.e. the RDP client).

How-to-guide assuming physical machines (OS doesn't matter): http://www.smallnetbuilder.com/lanwan/lanwan-howto/29941-how-to-wake-on-lan--wake-on-wan VMWare settings (one example, you need to search for your specific vendor and version): http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.vm_admin.doc_50%2FGUID-35CD5E60-6FFA-47CE-A5CF-78B6D6B42CB8.html

Обратите внимание, что вы можете назначить виртуальную машину физическому сетевому адаптеру, и это часто случается в серверной среде. cutrightjm 10 лет назад 1
2
Lawrence

Using Wake On Pattern would seem to be the way to go for this. As long as Wake On Lan is enabled in the BIOS as well as in Windows.

I haven't done it myself, but I know that WOL can be done on Name Lookups as well as TCP SYN requests.
This Microsoft KB doco specifies as much also.

Assuming that you're connecting to an IP address and not a hostname, connecting to the IP should attempt to send a TCP Syn request to the computer, as long as the switch has not forgotten which IP address has that MAC address.

By default, Windows 7 should be setup to wake on either MagicPacket and PetternMatch. The latter is what will take care of waking on TCP Syn requests.
However, the NIC itself will need to support ARP & ND offload, or at least ARP offload.
If the NIC doesn't support that, then Magic Packet is the only way to wake up the computer.

In which case, you will need a utility to run before attempting to connect with RDP to the computer. Your network infrastructure may even have the ability to send Wake On Lan packets for you.

Похожие вопросы