如何在 Configuration Manager 中配置 LAN 唤醒How to configure Wake on LAN in Configuration Manager

适用范围: Configuration Manager (Current Branch)Applies to: Configuration Manager (current branch)

若要将计算机从休眠状态唤醒,请指定 Configuration Manager 的“LAN 唤醒(WoL)”设置。Specify Wake on LAN (WoL) settings for Configuration Manager when you want to bring computers out of a sleep state.

自版本 1810 起的 LAN 唤醒Wake on LAN starting in version 1810

自 Configuration Manager 1810 起,有一种新方法可用来唤醒休眠计算机。Starting in Configuration Manager 1810, there's a new way to wake up sleeping machines. 可以在 Configuration Manager 控制台中唤醒客户端,即使客户端与站点服务器不在同一子网中,也不例外。You can wake up clients from the Configuration Manager console, even if the client isn't on the same subnet as the site server. 如果你需要执行维护或查询设备,则不会受到处于睡眠状态的远程客户端的限制。If you need to do maintenance or query devices, you're not limited by remote clients that are asleep. 站点服务器使用客户端通知通道来标识同一远程子网上已唤醒的其他客户端,然后使用这些客户端发送 LAN 唤醒请求(幻数据包)。The site server uses the client notification channel to identify other clients that are awake on the same remote subnet, then uses those clients to send a wake on LAN request (magic packet). 使用客户端通知通道有助于避免可能会导致路由器关闭端口的 MAC 漂移。Using the client notification channel helps avoid MAC flaps, which could cause the port to be shut down by the router. 可以同时启用新旧版本的 LAN 唤醒。The new version of Wake on LAN can be enabled at the same time as the older version.

先决条件和限制Prerequisites and limitations

  • 目标子网中必须至少有一个客户端处于唤醒状态。At least one client in the target subnet must be awake.
  • 此功能不支持以下网络技术:This feature doesn't support the following network technologies:
    • IPv6IPv6
    • 802.1x 网络身份验证802.1x network authentication
      • 802.1x 网络身份验证可能支持其他配置,具体视硬件及其配置而定。802.1x network authentication may work with additional configuration depending on the hardware and its configuration.
  • 不能将 DHCP 租用期限设置为无限期。DHCP lease durations can't be set to infinite.
    • 在 Configuration Manager 版本 2010 及更高版本中,如果 DHCP 租用期限设置为无限期,则不会唤醒客户端或将其用作对等方来唤醒其他设备。With Configuration Manager version 2010 and later, if the DHCP lease is set to infinite a client won't be woken up or used as a peer to wake other devices.
    • 在 Configuration Manager 版本 2006 及更早版本中,你可能会看到 SleepAgent_<domain>@SYSTEM_0.log 变得非常大,在 DHCP 租用期限被设置为无限期的环境中,可能会出现广播风暴。With Configuration Manager version 2006 and earlier, you may see the SleepAgent_<domain>@SYSTEM_0.log become very large and possibly a broadcast storm in environments where DHCP leases are set to infinite.

Configuration Manager 版本 2006 及更早版本的限制:Limitations for Configuration Manager version 2006 and earlier:

  • 仅当你通过“唤醒” 客户端通知向计算机发出通知时,计算机才会唤醒。Machines only wake when you notify them through the Wake Up client notification.
    • 若要在最后期限到来时唤醒,使用的是旧版 LAN 唤醒。For wake-up when a deadline occurs, the older version of Wake on LAN is used.
    • 如果旧版本未启用,使用“使用 LAN 唤醒来唤醒客户端以执行必需部署”或“发送唤醒数据包”设置创建的部署不会发生客户端唤醒 。If the older version isn't enabled, client wake-up won't occur for deployments created with the settings Use Wake-on-LAN to wake up clients for required deployments or Send wake-up packets.

安全角色权限Security role permissions

  • 集合类别下的“通知资源”Notify resource under the Collection category

自版本 1810 起,将客户端配置为使用 LAN 唤醒Configure the clients to use Wake on LAN starting in version 1810

以前必须在网络适配器的属性中手动启用 LAN 唤醒客户端。Previously you had to manually enable the client for wake on LAN in the properties of the network adapter. Configuration Manager 1810 新增客户端设置“允许网络唤醒”。Configuration Manager 1810 includes a new client setting called Allow network wake-up. 请配置和部署此设置,而不是修改网络适配器的属性。Configure and deploy this setting instead of modifying the properties of the network adapter.

  1. 在“管理”下,转到“客户端设置”。Under Administration, go to Client Settings.

  2. 选择要编辑的客户端设置,或新建要部署的自定义客户端设置。Select the client settings you want to edit, or create new custom client settings to deploy. 有关详细信息,请参阅如何配置客户端设置For more information, see How to configure client settings.

  3. 在“电源管理”客户端设置下,为“允许网络唤醒”设置选择“启用”。Under the Power Management client settings, select Enable for the Allow network wake-up setting. 若要详细了解此设置,请参阅关于客户端设置For more information about this setting, see About client settings.

  4. 自 Configuration Manager 1902 起,新版 LAN 唤醒使用你为“LAN 唤醒端口号(UDP)” 客户端设置指定的自定义 UDP 端口。Starting in Configuration Manager 1902, the new version of Wake on LAN honors the custom UDP port you specify for the Wake On LAN port number (UDP) client setting. 新版和旧版 LAN 唤醒共用此设置。This setting is shared by both the new and older version of Wake on LAN.

自 1810 起,使用客户端通知来唤醒客户端Wake up a client using client notification starting in 1810

可以唤醒一个客户端或集合中的任何多个休眠客户端。You can wake up a single client or any sleeping clients in a collection. 对于集合中已唤醒的设备,不会对它们执行任何操作。For devices that are already awake in the collection, no action is taken for them. 只有处于休眠状态的客户端,才会收到 LAN 唤醒请求。Only clients that are asleep will be sent a Wake on LAN request. 若要详细了解如何向客户端发出唤醒通知,请参阅客户端通知For more information on how to notify a client to wake, see Client notification.

  • 若要唤醒一个客户端: 请右键单击此客户端,转到“客户端通知”,再选择“唤醒”。To wake up a single client: Right-click on the client, go to Client Notification, then select Wake up.

    控制台中的客户端唤醒通知

  • 若要唤醒集合中所有处于休眠状态的客户端: 请右键单击设备集合,转到“客户端通知”,再选择“唤醒”。To wake up all sleeping clients in a collection: Right-click on the device collection, go to Client Notification, then select Wake up.

    • 无法对内置集合执行此操作。This action can't be run on built-in collections.
    • 如果集合中既有休眠客户端,也有已唤醒客户端,只有处于休眠状态的客户端,才会收到 LAN 唤醒请求。When you have a mix of asleep and awake clients in a collection, only the clients that are asleep are sent a Wake on LAN request.
    • 从 Configuration Manager 2002 开始,可以从连接到管理中心站点、独立站点或子主站点的控制台中执行此操作。Starting in Configuration Manager 2002, this action is available from a console connected to a Central Administration site, a stand-alone site, or child primary site.
    • 在 1910 版本及更早版本中,仅当 Configuration Manager 控制台连接到独立或子主站点时,此操作才可用。In versions 1910 and earlier, this action is only active when the Configuration Manager console is connected to a stand-alone or child primary site. 当连接到管理中心站点时,此操作不可用。When connected to a Central Administration Site, the action isn't available.

使用同一远程子网上的对等客户端在部署截止时间唤醒计算机Wake machine at deployment deadline using peer clients on the same remote subnet

(在版本 2010 中引入)(Introduced in version 2010)

从 Configuration Manager 版本 2010 开始,你可以允许站点使用客户端通知通道在部署截止时间唤醒设备。Starting in Configuration Manager version 2010, you can allow the site to wake devices at the deadline of a deployment, using the client notification channel. 站点服务器不直接发出幻数据包,而是使用客户端通知通道,在目标设备的最后一个已知子网中找到一台联机计算机,并指示联机客户端为目标设备发出 WoL 数据包。Instead of the site server issuing the magic packet directly, the site uses the client notification channel to find an online machine in the last known subnet of the target device(s) and instructs the online client to issue the WoL packet for the target device.

使用客户端通知通道在截止时间唤醒客户端的先决条件Prerequisites for waking a client at deadline using the client notification channel

目标计算机先决条件:Target computer prerequisites:

  • 脱机Offline
  • 已更新到最新 Configuration Manager 客户端版本Updated to latest Configuration Manager client version
  • 以具有一个截止日期并已启用“发送唤醒包”选项的必需部署为目标 。Targeted with a Required deployment with a Deadline and the Send wake-up packages option enabled.

计算机将 WoL 幻数据包发送到目标计算机的先决条件:Prerequisites for the computer sending the WoL magic packet to the target computer:

  • 联机Online
  • 已更新到最新客户端版本Updated to latest client version
  • 与目标计算机位于同一子网中On the same subnet as the target computer

支持使用客户端通知通道在截止时间唤醒客户端Enable waking a client at deadline using the client notification channel

  1. 在站点级别启用 LAN 唤醒:At the site level, enable Wake on LAN:

    1. 在 Configuration Manager 控制台中,转到“管理”>“站点配置”>“站点” 。In the Configuration Manager console, go to Administration > Site Configuration > Sites.
    2. 选择要配置的主站点,然后选择“属性”。Select the primary site to configure, and then choose Properties.
    3. 在“LAN 唤醒”选项卡中,选择“为此站点启用 LAN 唤醒”,并选中“使用客户端通知通道”来发送唤醒数据包 。In the Wake on LAN tab, select Enable Wake On LAN for this site and send the wake-up packets Using client notification channel.
    4. 选择“确定”,然后为层次结构中的所有主站点重复此过程。Select OK and repeat the procedure for all primary sites in the hierarchy. 使用客户端通知通道进行 WoL 的站点属性
  2. 验证“电源管理”客户端设置下的“允许网络唤醒”是否已启用。Verify Allow network wake-up under the Power Management client settings is enabled.

  3. 通过“发送唤醒数据包”选项和一个最后期限创建一个“必需”部署 。Create a deployment as Required with the Send wake-up packages option and a Deadline. 如果任务序列、软件分发或软件更新安装等部署的最后期限到来,将会向客户端发送通知。Clients are sent a notification when a deadline is received on deployments such as task sequences, software distribution, or software updates installation.

    部署向导中的“发送唤醒数据包”选项

仅启用新版 LAN 唤醒会发生什么What to expect when only the new version of Wake on LAN is enabled

如果你仅启用新版 LAN 唤醒,只有“唤醒”客户端通知处于启用状态。When you have only the new version of Wake on LAN enabled, only the Wake Up client notification is enabled. 如果任务序列、软件分发或软件更新安装等部署的最后期限到来,不会向客户端发送通知。Clients aren't sent a notification when a deadline is received on deployments such as task sequences, software distribution, or software updates installation. 休眠计算机重新联机后,它会在向管理点签入时反映在控制台中。Once a sleeping machine is back online, it will be reflected in the console when it checks in with the Management Point.

  • 自 Configuration Manager 版本 1902 起,可以指定 LAN 唤醒端口。Starting in Configuration Manager version 1902, you can specify the Wake on LAN port. 新版和旧版 LAN 唤醒共用此设置。This setting is shared by both the new and older version of Wake on LAN.

  • 从 Configuration Manager 版本 2020 开始,你可以在任务序列、软件分发或软件更新安装等部署的截止时间到来时,使用客户端通知通道唤醒客户端。Starting in Configuration Manager version 2020, you can use the client notification channel to wake clients when a deadline is received on deployments such as task sequences, software distribution, or software updates installation. 有关详细信息,请参阅在部署截止时间到来时,使用客户端通知通道唤醒客户端For more information, see Use the client notification channel to wake a client when a deployment deadline occurs.

同时启用两个版本的 LAN 唤醒会发生什么What to expect when both versions of Wake on LAN are enabled

同时启用两个版本的 LAN 唤醒后,不仅可以使用“唤醒”客户端通知,还能在最后期限到来时唤醒。When you have both versions of Wake on LAN enabled, you can use the Wake Up client notification and wake up on deadline. 客户端通知功能与传统 LAN 唤醒略有不同。The client notification functions a little differently than traditional Wake on LAN. 有关客户端通知工作原理的简要说明,请参阅自版本 1810 起的 LAN 唤醒部分。For a brief explanation of how the client notification works, see the Wake on LAN starting in version 1810 section. 新客户端设置“允许网络唤醒”会将 NIC 属性更改为允许 LAN 唤醒。The new client setting Allow network wake-up will change the NIC properties to allow Wake on LAN. 你不再需要为添加到环境中的新计算机手动更改它。You no longer need to manually change it for new machines that are added to your environment. LAN 唤醒的其他所有功能都没有改变。All other functionality of Wake on LAN hasn't been changed.

  • 自版本 1902 起,“唤醒”客户端通知使用现有的“LAN 唤醒端口号(UDP)”设置。Starting in version 1902, the Wake Up client notification honors your existing Wake On LAN port number (UDP) setting.
  • 从 Configuration Manager 版本 2020 开始,你可以在任务序列、软件分发或软件更新安装等部署的截止时间到来时,使用客户端通知通道唤醒客户端。Starting in Configuration Manager version 2020, you can use the client notification channel to wake clients when a deadline is received on deployments such as task sequences, software distribution, or software updates installation. 有关详细信息,请参阅在部署截止时间到来时,使用客户端通知通道唤醒客户端For more information, see Use the client notification channel to wake a client when a deployment deadline occurs.

版本 1806 及更低版本的 LAN 唤醒Wake on LAN for version 1806 and earlier

如果要将计算机从休眠状态中唤醒以安装所需的软件(如软件更新、应用程序、任务序列和程序),请指定 Configuration Manager 的 LAN 唤醒设置。Specify Wake on LAN settings for Configuration Manager when you want to bring computers out of a sleep state to install required software, such as software updates, applications, task sequences, and programs.

可以使用唤醒代理客户端设置来对 LAN 唤醒进行补充。You can supplement Wake on LAN by using the wake-up proxy client settings. 但是,要使用唤醒代理,你必须首先为站点启用 LAN 唤醒,并为 LAN 唤醒传输方法指定“仅使用唤醒数据包”和“单播”选项。However, to use wake-up proxy, you must first enable Wake on LAN for the site and specify Use wake-up packets only and the Unicast option for the Wake on LAN transmission method. 这种唤醒解决方案也支持临时连接,例如远程桌面连接。This wake-up solution also supports ad-hoc connections, such as a remote desktop connection.

使用第一个过程来针对 LAN 唤醒配置主站点。Use the first procedure to configure a primary site for Wake on LAN. 然后,使用第二个过程来配置唤醒代理客户端设置。Then, use the second procedure to configure the wake-up proxy client settings. 此第二个过程配置唤醒代理设置的默认客户端设置,以应用于层次结构中的所有计算机。This second procedure configures the default client settings for the wake-up proxy settings to apply to all computers in the hierarchy. 如果你希望这些设置仅应用于所选计算机,请创建一个自定义设备设置,并将其分配给包含要为唤醒代理配置的计算机的集合。If you want these settings to apply to only selected computers, create a custom device setting and assign it to a collection that contains the computers that you want to configure for wake-up proxy. 有关如何创建自定义客户端设置的详细信息,请参阅如何配置客户端设置For more information about how to create custom client settings, see How to configure client settings.

接收唤醒代理客户端设置的计算机可能会将其网络连接暂停 1-3 秒。A computer that receives the wake-up proxy client settings will likely pause its network connection for 1-3 seconds. 发生此暂停是因为客户端必须重置网络接口卡以启用客户端上的唤醒代理驱动程序。This pause occurs because the client must reset the network interface card to enable the wake-up proxy driver on it.

警告

为了避免网络服务意外中断,请首先在有代表性的隔离网络基础结构上评估唤醒代理。To avoid unexpected disruption to your network services, first evaluate wake-up proxy on an isolated and representative network infrastructure. 然后,使用自定义客户端设置将测试范围扩展到若干子网上的所选计算机组。Then use custom client settings to expand your test to a selected group of computers on several subnets. 有关唤醒代理工作原理的详细信息,请参阅规划如何唤醒客户端For more information about how wake-up proxy works, see Plan how to wake up clients.

使用版本 1806 及更低版本为站点配置 LAN 唤醒的具体步骤To configure Wake on LAN for a site for version 1806 and earlier

若要使用 LAN 唤醒,必须为层次结构中的每个站点都启用它。To use Wake on LAN, you need to enable it for each site in a hierarchy.

  1. 在 Configuration Manager 控制台中,转到“管理”>“站点配置”>“站点” 。In the Configuration Manager console, go to Administration > Site Configuration > Sites.
  2. 选择要配置的主站点,然后选择“属性”。Select the primary site to configure, and then choose Properties.
  3. 在“LAN 唤醒”选项卡中,为此站点配置所需的选项。In the Wake on LAN tab, and configure the options that you require for this site. 要支持唤醒代理,请确保选择“仅使用唤醒数据包”和“单播”。To support wake-up proxy, make sure you select Use wake-up packets only and Unicast. 有关详细信息,请参阅计划如何唤醒客户端For more information, see Plan how to wake up clients.
  4. 选择“确定”,然后为层次结构中的所有主站点重复此过程。Select OK and repeat the procedure for all primary sites in the hierarchy.

在站点属性中启用 LAN 唤醒

配置唤醒代理客户端设置To configure wake-up proxy client settings

  1. 在 Configuration Manager 控制台中,转到“管理”>“客户端设置”。In the Configuration Manager console, go to Administration > Client Settings.
  2. 选择“默认客户端设置”,然后选择“属性” 。Select Default Client Settings, and then choose Properties.
  3. 选择“电源管理”,然后对“启用唤醒代理”选择“是”。Select Power Management and then choose Yes for Enable wake-up proxy.
  4. 查看并在必要时配置其他唤醒代理设置。Review and if necessary, configure the other wake-up proxy settings. 若要详细了解这些设置,请参阅电源管理设置For more information on these settings, see Power management settings.
  5. 选择“确定”关闭对话框,再选择“确定”关闭“默认客户端设置”对话框 。Select OK to close the dialog box, and then OK to close the Default Client Settings dialog box.

你可以使用以下 LAN 唤醒报表来监视唤醒代理的安装和配置:You can use the following Wake On LAN reports to monitor the installation and configuration of wake-up proxy:

  • 唤醒代理部署状态摘要Wake-Up Proxy Deployment State Summary
  • 唤醒代理部署状态详细信息Wake-Up Proxy Deployment State Details

提示

要测试唤醒代理是否工作,请测试与休眠计算机的连接。To test whether wake-up proxy is working, test a connection to a sleeping computer. 例如,连接到该计算机上的共享文件夹,或尝试通过使用远程桌面连接到该计算机。For example, connect to a shared folder on that computer, or try connecting to the computer using Remote Desktop. 如果使用“直接访问”,请通过为当前位于 Internet 上的休眠计算机尝试相同的测试来检查 IPv6 前缀是否工作。If you use Direct Access, check that the IPv6 prefixes work by trying the same tests for a sleeping computer that is currently on the Internet.