Wake on lan which port. Wake On Lan - remotely turn on a computer over a local network

Wake-on-LAN (WoL) is an underrated and underutilized part operating system Windows 10. If you are not an avid Windows user, then the phrase Wake-on-LAN will probably not be interesting to you. This function is related to connecting via local network, which in turn will interest gamers and technical support... This setting was weak in the past, but today the Wake-on-LAN setting in Windows 10 does more than it did. So what is Wake-on-LAN? How can this be useful for ordinary users? And most importantly, how to set it up?

What is Wake-On-LAN?

Wake-on-LAN is a networking standard that allows a computer to be powered on remotely. It has an additional standard called Wake-on-Wireless-LAN (WoWLAN).

For WoL to work, you need three things:

  • Your computer must be connected to a power source.
  • The computer motherboard must be ATX compatible. Don't worry, most modern motherboards are up to date.
  • The computer's network card (Ethernet or wireless) must be enabled in WoL. WoL support is almost universal.

Wake-on-LAN is widespread in the world of computers. Since support is required at the hardware level, WoL works on computers running windows management, Mac and Linux seamlessly. From a Windows perspective, your computer can turn on from any default power states such as hibernation and sleep, or from a complete power off.

How does Wake-On-LAN work?

Wake-on-LAN uses "magic packets" when network Card detects a packet, it tells the computer to turn on itself. This is why your computer must be connected to a power source even if it is turned off. WoL-enabled NICs will continue to receive a small charge around the clock while they scan "magic packets".

But what's going on?

The "magic packet" is sent from the server. There can be many things on the server, for example, specialized software, routers, websites, computers, mobile devices, smart TVs. The server sends the packet all over your network. The package itself contains important informationincluding subnet information, network address and most importantly the MAC address of the computer you want to turn on. All this information, combined into one packet, is called a wake-up frame. Your network card is constantly scanning them.

Why is Wake-On-LAN useful?

Now you know what Wake-on-LAN is and how it works. But why is this useful? Why should the average user care about this technology?

Turn on your computer from anywhere

It's hard to imagine yourself on a business trip without forgotten files at home that you can't access remotely. To remotely use your desktop, you will need a remote desktop application that supports Wake-On-LAN. Popular Google chrome Remote Desktop doesn't work, but it does.

Note: BIOS must support Wakeup-on-PME (Power Management Event). And then you can wake up the computer from the off state.

How to enable Wake-On-LAN

Enabling WoL is a two-step process. You need to configure Windows and BIOS of your computer.

Enabling Wake-On-LAN on Windows

  • To enable Wake-on-LAN on Windows, you need to open the Device Manager application. Click Win + R and write devmgmt.msc.
  • Scroll through the list of devices until you find network adapters... Click " > ", to expand the menu. Now you need to find your network card.


  • If you don't know which one is your network card, type in search windows "System information".

  • Go " Components" > "Network" > "Adapter"and on the right, find the name or type of the product. Remember these values \u200b\u200band go back to the device manager.


  • In the device manager, click on your network adapter right click mouse and select properties... Next, in the new window that appears, go to the " Additionally", scroll down the list and find Wake-On-LAN, select value Enabled (included). The name may differ between devices and some will have Wake on magic packet.


  • Then go to the " Power management"and you should have two items marked there: allow this device to wake up the computer and allow the computer to wake up from standby only using the "magic package"... Click OK.

Enabling Wake-On-LAN in BIOS

Unfortunately, the BIOS menus differ between computers and laptops, making it impossible to provide accurate instructions. In general, you need to press a specific key while your computer boots up. Typically, the button is Escape, Delete or F1.See detailed manual, .

  • In the BIOS menu, you need to find the " Power " and find the entry Wake-on-LAN and enable (Enabled) Don't forget to save your BIOS settings.
  • The tab can also be named Power Managementor you can find this function even in Advanced Settings.

Security Implications During Wake On LAN

Magic packets are sent using the OSI-2 layer. In practice, this means that anyone on the same network as WoL can use your computer to boot. In a home environment, this is not a significant problem. On a public network, this is more problematic. In theory, WoL only allows computers to turn on. It won't bypass security checks, password screens, or other forms of security. It also prevents you from shutting down your computer again.

However, there have been cases where attackers used a combination of DHCP and PXE servers to boot a machine with its own boot image. This gives them access to any unsecured drives on the local network.

The Wake on LAN technology will help you turn on the computer over the network using a "magic" packet. In order for this packet to normally reach the network card, and she accepted it and turned on the computer, you need to make some settings.

Configuring Wake on LAN on a computer.

The first step is to configure Windows. Consider at windows example 10. Press the key combination Win + X, select the item network connections. In network connections, we find our network card (local network connection), right-click on it and open the properties, then click the configure button. Open the "Power Management" tab, here you need to check the "Allow this device to wake up the computer from standby mode" box. Then, if you are the lucky owner of a network realtek cards, open the tab additionally.


It needs to check three parameters:

  • Wake-up on LAN after disconnect.
  • Include when template matches.
  • Enable when the Magic Packet function is triggered.

Modern technologies are becoming more and more convenient, for example, turning on the computer we need, while being miles away from it without pressing a button. The Wake-on-LAN feature has been around for a long time, so let's take a look at how it works and how to enable it.

What is Wake-on-LAN?

Wake-on-LAN is an industry standard protocol for waking up (waking) computers remotely that have standby power. The definition of standby power is understood as a mode in which the computer is turned off, but the indication on the motherboard indicates that it has power and at the same time it has the ability to start the power supply. The same protocol allows organizing additional opportunity: Wake-on-Wireless-LAN - wake up from the wireless network.

Wake-on-LAN depends on two things: your motherboard and a network card. Your motherboard must be connected to an ATX-compatible power supply, which is common in most cases. Your network or wireless network card must also support this functionality. Since this feature is configured in the BIOS and in the network card, there is no need for additional special software to enable it. Wake-on-LAN support by computers is very common even for older models. However, in newer computer models, you can find in the BIOS additional optionsthat will help you turn on your computer on a specific schedule or time. This is, of course, technically not Wake-on-LAN, but it additionally expands the functionality of the computer.

If you assembled the computer yourself, then be aware that the discrete network card also requires the connection of a special 3-pin cable to the motherboard to support the Wake-on-LAN function.

Magic package.

Computers with the Wake-on-LAN function enabled, in order to turn on, wait for a special "magic packet" from the network, which will contain their own MAC addresses. This magic packet can be sent from an operating system on a different platform, or from a website or router. Typical ports that are used for Wake-on-LAN are UDP 7 and 9. Since the computer "listens" to the network for the appearance of a magic packet, it consumes energy, at least a little, but consumes, which can negatively affect the battery level in a laptop ... Therefore, if you are somewhere on the road and you do not need this function at this moment, then you need to make sure that it is disabled.

A magic packet is usually sent to the network itself and contains various sub-network information, network broadcast address and MAC address of the network adapter desired computer... And there is no difference what kind of adapter it is, wired or wireless. The picture above shows the output of the packet capture utility that was used to catch the magic packet. This example shows how safe it is to use insecure networks and the Internet. Many motherboard manufacturers, along with the Wake-on-LAN function, provide specialized software to simplify the configuration and use of this function.

How to enable Wake-on-LAN.

BIOS

Most computers are older, and also many modern ones contain the Wake-on-LAN setting in the BIOS. Depending on the type or model of the motherboard, it is possible to get into the BIOS if you press the F2 or Del key during boot. Wake-on-LAN settings should be in the following BIOS menus: Power Management or Advanced Options, or something like that.

Although there are computers in which there is no Wake-on-LAN setting in the BIOS, this does not always mean that they do not support it. It happens that you just need to enable this function in the operating system itself.

Windows

Press the Start key and select "Computer Management" in the search box. Find your network adapter.

Right click on it from the Properties menu and then find the Advanced tab.

Scroll down the list and find the next item “Wake on Magic Packet” or something like that, and set the value to “Enabled”. Click on the OK key when done.

OS X

Open the window " System settings»(System Settings) and select Energy Saver.

On the Options tab, you should see the phrase "Wake up from Ethernet" or something similar. This option enables the Wake-on-LAN feature.

Linux

Ubuntu has a great utility to help you determine if your motherboard supports Wake-on-LAN and if so, enable it. Start a terminal and install the "ethtool" utility with the following command:

sudo apt-get install ethtool

You can check the possibility enable Wake-on-LAN using the command:

sudo ethtool eth0

Where eth0 is the name of your default network interface.

Look at the section called "Supports Wake-on" (it's 3rd from the bottom). If you see the letter "g" opposite, it means that you can use the Magic Pack for the Wake-on-LAN function. To enable it use the following command:

sudo ethtool -s eth0 wol g

Then enter the previous command to check if the Wake-on-LAN feature is now connected. Look at the "Wake on" section (it's 2nd from the bottom), you should now see the letter "g" instead of "d".

Sending a Magic Package.

To send a mock request, you need to know some parameters.

Namely: it is directly the MAC address of the computer, its Internet address or hostname, as well as the mask of the sub-network where this computer is located. And it is imperative to know and enter the port number that the switched off remote computer is listening to.

You can download the program for sending the Magic Pack at the following link:

Often, the forum receives various questions. As far as possible, prompt answers are given to them. And sometimes, the number of questions with the same content begins to go off scale. And this phenomenon has not bypassed the Wake-On-Lan technology, which was implemented on a mass of motherboards manufactured by GIGABYTE.

In today's example with pictures, an attempt will be made to clarify a little about the specifics of setting up and working with WOL. What is Wake-On-Lan and why is it needed, can be found on the all-knowing Wikipedia site:

I'll start with the configuration. The following equipment was used:

GIGABYTE GA-Z77X-D3H Motherboard

CPU Intel Core i5 -2300

Intel BOX Cooler cooling system

RAM Kingston KHX11000D3LL / 2G connected to DDR3_1 slot

Drive wd1002faex

Power supply unit CFT-1000G-DF

Operating windows system 7 Professional x64

So, it is considered that the system is assembled, tested, working properly and included in the local network. However, for guaranteed correct settings in a UEFI environment, you must still bring it to uniformity and harmony. To do this, you need to clear CMOS. This is done by closing two CLR_CMOS contacts with a metal jumper WITH ABSOLUTELY DE-ENERGIZED SYSTEM... But we used the proven, old-fashioned method, and closed the contacts with a screwdriver☺

For details on the procedure for clearing CMOS, see the official manual for the motherboard.

After that, the system turns on, and subsequently a message about the BIOS reboot is displayed on the screen, and it is offered to select the desired option. The third is selected - entering the BIOS settings menu.

After clearing CMOS, all parameters are restored to factory settings and, therefore, the option that some settings affected the WOL functions necessary for correct operation is excluded.

In the UEFI environment, you need to go to Advanced mode (where there is no beautiful views on the board). This is done by pressing the F1 key. Next, you need to go to the Power Management menu, and make sure that the ErP parameter (it is he who is responsible for the WOL functionality) is set to Disabled. If not installed, you need to install.

So, in the operating system environment, it is necessary to prepare the Ethernet adapter for "listening" to the air in order to receive a "magic packet". This package is just designed to transfer the computer from S5 mode to S0 mode at the right time, without physical user intervention. To do this, the following adapter settings must be made. Let's go to the computer control menu by right-clicking on the “Computer” icon on the desktop, and selecting the “control” item:

Go to the "Advanced" tab. There we select the parameter "WOL Package Magic". It must be enabled. If it is off, turn it on.

In fact, after that the computer is ready to wake up on the command "Magic packet'a" And all that remains to be done is to find out how to "wake it up". But before that, you need to find out what physical and IP-address, at the moment, the computer has. This can be done as follows:

Go to the network control center and general access (either with the help of the device manager, or through the tray icon), select the current local network connection and click the "information" button there. After, you can contemplate extensive information regarding network connection... We are interested in the columns "Physical Address" (aka MAC) and IPv4 Address. We write them down on a piece of paper. In our case, these are, respectively, 50E549EDFCA3 and 192.168.100.55.

After, turn off the computer exclusively the right way, through "shutdown". This is necessary in order for the network adapter to continue to function correctly and receive "magic packets" after the computer is turned off.

After the computer has quieted down, you can make sure that the network adapter continues to work by blinking the coveted LED:

Please note that further de-energization is absolutely unacceptable. When unplugging the power cord or disconnecting line filter "Pilot", the computer will not be able to remotely turn on.

So, now you can go directly to the procedure for remotely turning on the computer. This is done using a special softwarecapable of generating and sending a "Magic packet" to the desired address. There is a huge mass of such software available, and everyone can find something personally to their liking. We stopped at free utility WOL 2.0.3. It is installed on third party computer, from which, in fact, the computer will be switched on remotely, waiting for "Magic Packet'a".

Installation takes place in the most elementary way:





After the program starts, and in it you need to make settings for adding a computer that will be turned on remotely. To do this, in the main window, click the "add new item" icon, in the window that appears, enter the IP and MAC addresses previously written down on paper. Next, click the OK button.


After that, in the rows of the list of the main window, a record about the computer with the previously entered parameters should appear. Select the entry below the "Host" column, the interaction icons become active, and click on the one called "Wake-up". After this action on remote computer the coveted "Magic packet" will be sent, and the computer will react as if it was pressed power button, or, more simply, it will turn on.

This is, in short, the procedure for remotely turning on a computer based on motherboard GIGABYTE with Wake-On-Lan technology. But what to do with the computer next, how to connect, how to work and how to turn it off is up to you, because this is a completely different story☺

Turning on a computer remotely, over a network or via the Internet - Wake On Lan

Any modern network card and BIOS of the motherboard support technology that allows you to enable this computer remotely.

How WOL works

When the function is enabled, the computer, turned off normally (not in emergency mode), continues to supply standby power (5V with low current) to the network card, which is in standby mode for just one packet - Magic packet (magic package). After receiving this packet, the network card gives a signal to turn on the computer.

You can transfer this packet using special program, for example WOL v2.0.3, or PHP script.

Configuring the computer to turn on

In the BIOS of the computer, enable the Wake On Lan technology, this option is located in the power management section, and can be called (set to Power-On), Wake Up On LAN (to Enabled), Wake on LAN from S5 (to Power-On ), or ERP Support (to the Disabled position).


Now, shutting down the computer in a normal way, it will wait for the magic packet, and turn on after receiving it.

How to send a magic package

To send the magic packet and then turn on the computer, you need to know MAC address (physical address) of the network card of the included computer ().

Since a turned off computer simply cannot have any IP address, it can receive a packet only in broadcast mode. A turned off computer also cannot respond to a TCP packet that requests a connection on a port, and therefore, it is logical to assume that packet must be UDP (although it doesn't matter). The destination port is not important in this case, the network card will receive a magic packet on any port, but it is considered 7th and 9th ports, the default ports for WOL. From the above, it follows that the computer to be turned on and the computer from which the packet is sent must be on the same network, otherwise, the broadcast packet will most likely not go beyond the router (we will talk about turning on via the Internet later).

As mentioned earlier, you can send a magic packet using a special program, in which you only need to enter the MAC address of the computer to be turned on and its IP to create a broadcast on this network. For example, if the IP of the computer is 192.168.1.10, then the program will send 192.168.1.255 to this ip and broadcast. And if you need to organize the inclusion of computers online (through a browser), then this can be done using a PHP script.

Wake On Lan over the Internet

If you have direct connection to the Internet (via DHCP) and a dedicated IP address, and if your provider supports the routing of broadcast packets, then your computer can be turned on to send a magic packet to the broadcast of your network, for example, your IP 37.37.37.59, then you need to send the packet to the address 37.37 .37.255.

But in most cases, for one reason or another it won't work, then you must have a router. The router (router) connects to the Internet, and your computer connects to this router via a cable. In this situation, the magic packet must be sent not broadcast, but to the external IP address of the router. And in the router, you need to create a rule (port forwarding) in which to register the forwarding of the desired port (by default 7 and 9 for the magic packet, although you can send to any) from WAN to LAN to broadcast, that is, to XXX.XXX.XXX.255 ...

But unfortunately, not all routers are able to forward ports to broadcast, some D-link models, all Linksys and Cisco, MikroTik routers, and, in my opinion, ZyXel can do this.

Magic package structure

A magic packet is a special sequence of bytes that normal work sent over UDP broadcast. The package starts with 6 bytes equal to 0xFFand then it goes MAC address repeated 16 times... Let's say that the MAC address 00: 1D: 7D: E5: 06: E8, then the magic package will look like this (without line breaks, of course):

FFFFFFFFFFFF
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8
001D7DE506E8

Don't forget to leave

Did you like the article? To share with friends: