Magic Packet White Paper

Summary

  This article describes the Magic Packet technology and how it works.

SCOPE

  PC market there are many factors that affect the design and implementation of the PC, operating system, as well as additional equipment. In most cases, these factors are complementary, for example, CPU performance and display use, or end users want its nightly backup machine, and an information system (IS) department desirable to maintain the integrity of the data across the network.

  However, sometimes these factors in the PC market seems to have a more direct conflict. One example is the Information Systems Department hopes to be a terminal node management (software updates, backups, etc.), the US government hopes to "Energy Star" program, soon after you stop using the computer so that the computer goes to sleep. If the computer is asleep at 5:30, will be how to deal with the information systems department? If you feel that a backup hard drive is more important than power, he disables the computer's power-saving features? If this is the case, this action will make "Energy Star" program saving intentions fail, because the PC when not in use to make yourself go to sleep.

PROPOSAL

  AMD and Hewlett-Packard two years ago discovered the problem and began working to find solutions to the problem of networked PC Green (Green is an industry term that refers to enter the low-power mode when there is no activity PC). This collaboration led to the proposal of an industry standard mechanism, this mechanism allows for fully networked PC into hibernation (Deep Green), but still allows a network administrator or some network management software by sending a specific Ethernet frame to the PC ( specific Ethernet frame) to wake up the PC. This standard Ethernet frame comprising specific data pattern Ethernet controller detected at the receiving end. Then, the system alerts the Ethernet controller, power management circuitry to wake it up.

  Here is Magic Packet Details of silicon technology implementation, as well as some software systems and meaning.

Magic Packet Technology Overview

  Magic Packet basic technical details of the technology easy to understand. There is a second set of details, particularly to achieve. In other words, Magic Packet technology silicon- or gate-level implementation may differ from AMD and fully interoperable, remains substantially as long as the feature set.

  Magic Packet technology is a feature designed for the Ethernet controller. The basic feature set includes the following:

  • Magic Packet Mode Enable
  • Magic Packet Frame Detection
  • Magic Packet Mode Disable

Magic Packet Mode Enable

  Suppose Ethernet controller (Ethernet controller) is running and communicating with the network, then before the system goes to sleep, PC power management hardware or software must be a way to put Magic Packet mode Ethernet controller. On PCnet ISA II and PCnet PCI II device, which can be achieved in two ways: by setting a bit in an internal register, or the SLEEP pin down. Any of these operations will disable normal network activity and enable the Magic Packet mode. The device will not generate any transmission, and monitors all incoming frames to determine whether any frame magic packet frame.

Magic Packet Frame Detect

  Once the LAN controller enters Magic Packet mode, it scans all incoming frames sent to the node (Frames), to obtain the specific data sequence, which indicates to the controller that is the Magic Packet Frame . Magic Packet frame must also meet the basic requirements of the selected LAN technology, such as source address, destination address (IEEE address may be a receiving station, may comprise a multicast address broadcast address) and the CRC, the specific sequence by the node IEEE 16 duplicate addresses, with no interruption or interruptions.

  This sequence can be located anywhere in the packet, but before the stream must be synchronized. Deferred scan state machine is much simpler, synchronized flow is defined as 6 bytes FFh. Address of the machine as long as 16 copies of the IEEE address and to awaken the match, the device will also accept multicast frames.

  If the IEEE particular node on the network address of 11h 22h 33h 44h 55h 66h, the LAN controller scan sequence data (assumed to be an Ethernet frame):

DESTINATION SOURCE MISC FF FF FF FF FF
FF 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44
55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33
44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22
33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11
22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66
11 22 33 44 55 66 11 22 33 44 55 66 MISC CRC

Magic Packet Mode Disable

  There are two instances must be disabled magic packets, and Ethernet controller returns to normal operating mode. The system may receive a magic packet frame, a network administrator may want to back up the hard drive, or some other operating system into a low-power sleep leads to state, for example, the user touches the keyboard, move the mouse, and power management hardware or software must be disabled magic packet mode and the Ethernet controller to resume normal operation. On PCnet ISA II or PCnet PCI II, which may be achieved by the register or resetting the internal register bit deassertion SLEEP pin.

SILICON IMPLEMENTATION

  Magic Packet achieve technical details may vary by device, as long as the basic function of ownership. Since the built-in Ethernet controller already has an address matching circuit identifies the frame addressed to a conventional node (regular frames addressed), so that the circuit can Magic Packet reusable case mode. We have to implement a new mode of operation, power management software or hardware to allow entering and leaving the Magic Packet mode. An address matching circuit must be added in a counter, to calculate the IEEE address repeated 16 times, if the data being processed and IEEE address does not match, another circuit is used to reset the counter.

  The Magic Packet adding technology to existing Ethernet controller does not need a lot of design work, time, or silicon area. This is one reason for using IEEE address as a solution magic packet frame identifier, since the data stream matching circuit already exists.

SYSTEM IMPLENTATION

  To use the Magic Packe t technology in the PC, you must make some changes to ensure the normal operation of the function. Let us take for example a motherboard implementation, which will be located on the motherboard Ethernet controller, an RJ-45 connector on the back from the computer. As the de facto standard desktop Ethernet LAN, this implementation is becoming increasingly common.

  First, let's explain when the Ethernet controller receives a Magic Packet frame when it wakes up the steps required by the system hardware. Most desktop now have considerably advanced power management circuit, either built in a chipset, or as separate functional blocks on the motherboard. In the present embodiment, the connection to the power management circuit is a simple matter. 3, one LED as an LED pin. Magic Packet frame  indicating the alarm is only another possible power management circuits, systems need to wake up. How to connect the pin to the LED 3 system power management circuit details of the system it is clearly, and the specific design of the chip set, and therefore will not be described here in detail.

  The second phase, to enable and disable  Magic Packet  mode, can be done in hardware or software. If done in hardware, power management circuitry must drive the sleep pin is active before the machine in sleep mode. This stops all normal network activity, and the Ethernet controller in a magic packets. Upon receiving the magic packet frame or to some other activity sensor (such as a keyboard or mouse movement), the hardware must be lifted to SLEEP # pin is asserted, and the controller to remove the magic packet from the Ethernet controller to return to normal mode operating.

  If desired, the second stage can also be done in software. On most systems, BIOS or other software to know the state of the system, and collaborate when closing the various components of the system. In this case, if the electronic system BIOS to participate in up and down (if the BIOS is involved in the powering up and down of subsystems), then when the system is powered off to sleep, it can set an Ethernet controller bit to enable the Magic Packet  mode. When the system wakes up, for whatever reason, then, BIOS will be disabled by removing the same bit assertion Magic Packet mode, to turn off the Magic Packet frame detection function, and returns to normal operating mode Ethernet controller.

Driver Implications

  Network operating system drivers may need to be modified to support the  Magic Packet  mode of operation, you may also need to modify. If the hardware or BIOS is responsible for enabling and disabling Magic Packet mode, you may not need to change the driver. This is because the operator does not need to know whether the system is awake or sleep state. If the system goes to sleep, and then wake up for some reason, as long as the Ethernet controller to access it at the same time with the last driver status, including register and buffer pointer, then the driver can continue to work as if nothing It happened. Of course, if the system is dormant for a long time, PC machine may have been logged out of the network, but to re-establish the link to the server, depending on the upper layer, instead of the driver.

  However, despite this, the driver may be supported by Magic Packet best place for technology. For example, the driver can monitor all Advanced Power Management (APM) call, we were told that if the system goes into sleep mode, the driver can enable Magic Packet mode. When APM call indicates that the system is awakened, the driver can disable Magic Packet mode, verify the status of the Ethernet controller, and continue normal activities.

NOS Implications 

  Magic Packet impact of technology on the network operating system (NOS) is still OK but there are a few points to emphasize. First and foremost is that many current NOS periodically send a data packet to a terminal node to determine whether the PC is still there, and log out any sites that do not respond to this Ping after X retries. Over the years, this has been so laptop users frustrated because the laptop is designed to enter the suspend mode after a few minutes of inactivity.

  This ping and subsequent cancellation of the pc does not respond will have to change, in fact, this process is being changed. The most widely used NOS is Novell Interware. Novell Netware 4.1 there is a new option that allows network administrators to disable this feature.

  Another problem currently exists in the peer to peer network operating systems such as Windows for Workgroups. The problem is that users might try to log on to another user's computer after a few hours, at which time the computer has entered the Magic Packet mode, and does not respond to normal network traffic. In this case, the user can not connect to another computer as a server.

Infrastructure Implications

  Since the realization of the Magic Packet technology since, on Magic Packet Frame can really reach the remote PC and there has been a problem for its power supply, these problems usually around Magic Packet Frame whether the bridging and routing to remote PC commenced, may be the next remote PC buildings, may also be in the country.

Bridges

  First, let's solve the bridge problem. Since the Magic Packet Frame is Standard  Ethernet Frame , so the bridge is no reason to unduly forwarding it. Magic Packet Frame and Standard  Ethernet frame only difference is between 16 6 copy byte IEEE address, the address is carried in the  frame  data portion. Bridge does not even care about  frame  what data part is that it cares only about the destination address. The question was also asked, "If a bridge has been removed from the bridge address database Magic Packet Frame address of the terminal node to be sent to, what happens? The bridge framework will throw it? The answer is no If the bridge does not know which port is located in a specific address, the bridge must be frame  forwarded to all ports. this will ensure that the frame  is sent to the node will receive it.

Routers

  Next we will focus on routers in the network. Many networks are separated by a router; router are almost always used to connect a building to another building local area network LAN. A router for LAN segment, and to reduce the number of nodes and a broadcast message on each LAN segment. Also, as described above, since the Magic Packet Frame just a simple Ethernet Frame , there is a particular data pattern in the data field, so there is no reason not to any other router Frame as the route Frame . And because Magic Packet Frame is protocol-independent, so no matter what protocol is running the LAN, whether it is TCP / IP, IPX or other protocols. As long as the data portion of the frame to reach the destination intact, it will wake up the target machine.

Address Aging in Routes

  There has been a major issue during the discussion of infrastructure. It focuses on the router ARP (Address Resolution Protocol) table aging, rather than a bridge. In the bridge, when an address is deleted from the database, the incoming Frame will be sent to all ports on the bridge. Again, this is the definition of a bridge. However, in the router, when the received address is not in the database its frame, the router network will send ARP, of from Frame addressed to the node in response to find. If the machine is in the Magic Packet mode, it will not respond to this ARP, the router will just throw Frame . Obviously, this will negate the ability to awaken dormant PC through a routing network remotely.

  However, IBM engineers proposed a method to solve the problem, they have been studying this problem and propose a new method to solve this problem. Program or system administrator will send a Router "subnet directed broadcast" to be forwarded to the subnet where the target computers, instead of sending an ordinary computer to the target Frame . The following is a gradual process, to ensure that remote wake-up sites outside of the router.

  In this scenario, it is assumed that the two are separated by two network routers (Router 1 and Router 2). These local subnet router are described as subnets A and B. The following is an example of this hypothesis network, for reference. The following figure will be IP internet as an example:

  Want to wake up the remote site manager sends the subnet that contains the site of one IP subnet directed broadcast UDP datagram. This scheme forces sending the magic packet to the subnet broadcast MAC address B (sent by the router 2).

    1. The queue manager uses the destination IP address of the UDP datagram will wake up, as the target subnet subnet directed broadcast station.

    2. IP stack manager sends the frame to the router's MAC destination address 1.

    3. UDP datagram finally forwarded to the router according to the address portion of the network wake-up the UDP datagram IP header

    4. The router 2 receives the wake-UDP datagram, the packet appreciated in the correct target network, and recognizes that the packet is a broadcast packet directed subnet.

    The router 2 the IP subnet directed broadcasts wakeup UDP datagram is sent to the broadcast MAC address.

    6. destination station addresses by matching the broadcast is repeated 16 Frame identified as Magic Packet  Frame , and triggers the wake-up signal from the Ethernet controller.

    7. Objective station is now awakened!

  Although the use of the concept than the first Magic Packet technology is slightly more complicated, but the ability to ensure that the target system by routing network remote wake-up is the key to the use of technology. This ensures the ability to use any site in the world with a wide area of TCP / IP Internet wake up, as long as the router will broadcast through targeted subnet.

 PC System Design Implications

  The design and architecture of the system, or added to an existing system in a newly designed system Magic Packet support can be simple, and may be complicated. Just the matter must be resolved in order to ensure Magic Packet technical support function normally.

Maintain Ethernet Power

  Power Ethernet controller must always be kept, allowing the Ethernet controller scans all incoming packets for Magic Packet  Frame .

Add Support to Power Management Circuitry

  In normal systems, power management circuitry looks for any one of several events to wake up the system. It will cause the system wake-up events, such as keyboard input or mouse movement. In order to use Magic Packet technology, power management must include a Magic Packet  Frame as a wake-up condition of the system.

Enable / Disable Magic Packet Mode

  The system must have a mechanism to enable and disable the Ethernet controller Magic Packet mode of operation. This can be done in hardware or software, and is clearly dependent on the Ethernet controller used. When the system enters a low-power mode, you must enable Magic Packet mode; when the system exits the low-power mode, whether it is receiving the Magic Packet  Frame or after other events (such as keyboard input), you must disable Magic Packet mode.

Sleep Mode Power Consumption

  PC power consumption problem is becoming increasingly important, not only for the government, through the EPA Energy Star program is being implemented, but also for a large company's management information system managers, these managers can easily see through using PC power management, lower utility bills, can save costs immediately.

  However, how best to put the computer in power-off state, there are two ideas. First, the computer is placed in a so-called standby mode of operation. In this mode, the computer is actually viable, we can supply the entire motherboard. In this mode, low power consumption is achieved by slowing the processor clock, reducing the rotational speed of the hard disk drive and a low-power state causes the display. However, stand-by mode to save power is limited. In fact, with more and more DRAM array processors consume more power, regardless of how the clock frequency of the system is running, it may become more apparent.

  The second method, may also Magic Packet method for use with technology, commonly referred to as the state of the system in suspend mode. In suspend mode, the system will typically stop completely. CPU stop, or even off, even though there are very few systems to do so. The system board may be powered down, the power management circuit leaving only energized to detect some indication system may be powered activity. In this case, the Ethernet controller will energize the received frame from the network, looking for a Magic Packet  Frame , this would indicate that the power management system should be awakened.

CONCLUSIOIN

  In this white paper, I found some problems related to sleeping Green PC and it works on the network, and the use of Magic Packet technology enables the PC to enter the low-power state, and still managed by a network administrator. From AMD Magic Packet receive technical proposals very positive response, many major system developers and addin cards suppliers have expressed interest in this technology. By using Magic Packet technology as the industry standard mechanism that allows remote wake sleeping PC, these vendors are further achieve power consumption of the PC will be reduced to as low as non-operating goals.

  AMD believes, Magic Packet technology will play an important role in terms of network management PC can be, especially in the enterprise LAN environment, the terminal node management is becoming increasingly important. AMD is working with a number of PC, network interface cards and software vendors to ensure that the standardization and interoperability of this technology.

 

Guess you like

Origin www.cnblogs.com/aiMiku/p/12509740.html