This document discusses how Ghost performs multicasting for sending an image from the server to the client.
This document discusses the following subjects:
Introduction - How the Ghost Server and Ghost Client communicate over a network
Ghost Multicast communicates through both UDP and TCP. When using the Windows version of Ghost Multicast, the TCP stack at the Ghost Server is provided by Windows. At the Ghost Client, the TCP stack is provided by Ghost.
UDP compared to TCP
Ghost uses a combination of UDP and TCP. TCP cannot be used effectively for multicasting since the TCP protocol is designed for reliable communications between two endpoints, not between a group of client computers and a server. There are no multicasting protocols that use TCP.
UDP is fast and allows Ghost to stream the data: That is, Ghost is not required to wait for an acknowledgment before sending the next packet.
Ghost Multicast Server, GhostCast Server, and Ghost Console require that the network switches and routers be IGMP-capable. When the routers or switches are not IGMP-enabled, Ghost may flood the network with packets or not work at all. See the document Ghost compatibility with IGMP KB 151701
How the Ghost Client communicates with TCP
Ghost.exe includes software for communicating through TCP. It packages the information into TCP and sends it to the drivers for the Network Interface Card (NIC). The NIC then sends out the packets. Similarly, when the Ghost Client computer receives a packet, the NIC forwards the information to the Ghost Client.
How the Ghost Server communicates with TCP
When it's run in Windows, the Ghost Multicast Server does not include software for communicating through TCP. Instead, it relies on Windows software. Information is sent to the RML, which packages it for Winsock. Winsock packages the data into TCP and sends the data to the drivers for the Network Interface Card (NIC). The NIC then sends out the packets.
Similarly, when the Ghost Server computer receives a packet, the NIC forwards the information through Winsock and RML and then to the Ghost Server software. RML assigns "ports" to Windows applications to identify which application to send the information to.
Addressing
The Ghost Server and the Ghost Clients recognize each other by their IP addresses. Messages are sent to one or more of the following addresses:
The details of addressing vary according to the IP Class of addresses on the network. On a network using Class C addresses:
The computer is identified by the 255.255.255.255 portion of the address. The application at each computer is identified by the xxxx portion of the address (the port address). For instance, in the address 123.46.52.105.6666, 123.46.52.105 designates the specific computer and 6666 designates the specific application on that computer.
The port address is a number automatically assigned to applications by the TCP protocol. Each application has a different number so that incoming packets can be routed to the appropriate application. The Ghost Server's port number is assigned by RML (a part of the TCP stack).
Image Verification
Packets - All packets sent by means of the Ghost Multicasting protocol are protected by a checksum.
Images - An image file can be verified during the image creation only by using the Ghost verify function (that is, the switches -VDW and -VFY). The switch -VDW verifies disk writes and the switch -VFY verifies each write to an image file (not spanned images). To verify an image after it has already been created, use the Ghost integrity check. See the document How to handle a corrupt image file. KB 151704
When the Ghost server and Ghost client cannot communicate
When the Ghost Server cannot establish a connection with one or more of the Ghost Clients, the Multicast option on the Ghost client appears dimmed, or Ghost displays an error message (or stops responding) and cannot continue.
Part 1 - How Ghost starts the session
In the handshaking process, the computers identify each other and then exchange addressing information. To begin the handshaking process, the Ghost Client initiates contact with the Ghost Server by sending a Broadcast message. Subsequent messages in this stage are addressed to each computer's IP address and are for:
Step 1 - Setup the Ghost Server computer
This is the computer on which you installed Ghost, and selected Server (instead of Client) during the installation.
Step 2 - Setup the Ghost Client computer
This is the computer on which you installed Ghost, and selected Client (instead of Server) during the installation. Or you did not install Ghost on this computer. Instead, you booted up the computer from a floppy disk and ran Ghost.exe from the floppy disk. Open Ghost and select OK.
When the Ghost Server reads the packet sent by the Ghost Client, it determines whether the Session Name in the packet matches the Session Name you typed in at the Ghost server. If there is a match, the Ghost Server replies to the Ghost Client's IP address. This reply contains the following information:
NOTE: The port numbers will vary. For more information, see the section "Addressing."
The Ghost Server and Ghost Client then finish exchanging addressing information and verify what image data will be sent from the Ghost Server to the Ghost Client (this image data is the same for all Ghost Client computers attached to this session.)
To attach each Ghost Client to the session, repeat steps 1 through 4 for each Ghost Client computer.
Step 3 - Select options at the Ghost Client computer
The Ghost Client now displays choices for which disk or partition to write over, and then whether and how to resize the destination disk or partition, and other miscellaneous options, depending on the choices you make during this session.
When you have completed making the choices, the Ghost Client will display a message similar to "Proceed with image file creation?" The answer defaults to No. Answer Yes to have the Ghost Client notify the Ghost Server that it is ready to receive images.
The Ghost Server continues to establish connections with each Ghost client computer until the Multicast Auto Start criteria have been met, or you click the Send button at the Ghost Server. Multiple clients can go through this process in parallel.
Part 2 - How Ghost sends image data
Once the Auto Start criteria have been met (or you clicked Send Now at the Ghost Server), the Ghost Server is ready to send the image data. Here is the sequence of events:
If a client falls behind processing or receiving packets, it sends a message to the server.
Part 3 - How Ghost closes the session
Once all the image data has been sent, the Ghost Server initiates the end of the session by sending a message to the Broadcast IP address. All the Ghost Client computers acknowledge this by sending a message to the Ghost Server's IP address. In Ghost versions prior to 6.0, additional end-of-session messages might be sent.
Closing the session usually requires two or four packets:
More information on packets, IP addresses, UDP/TCP protocols, and ports
Table of packets sent
The following table illustrates the sequence and protocol in which packets are sent.
All messages are sent in UDP except Multicast messages, which are TCP.
How to read the table
Each row indicates a packet sent. Read the steps in numerical sequence. The sequence is indicated by the number in parentheses, such as (1), (2,), and so on. Note that the steps do not follow a consistent pattern between left and right, because not all packets are acknowledged.
GHOST CLIENT
|
Direction and Protocol
|
GHOST SERVER
|
|
Handshaking The client and server exchange addressing information. This process occurs for each Ghost Client computer. |
(1) Ghost Client sends a packet addressed to the Broadcast IP address 226.77.255.255.xxxx Information sent:
|
---->
UDP |
(2) Ghost Server watches for packets addressed to the Broadcast IP address 226.77.255.255.xxxx. It reads the packet and compares Session Names. |
(4) Ghost Client receives the packet. |
<----
UDP |
(3) If Session Names match, Ghost Server replies to the Ghost Client's IP address, to identify itself to the Ghost Client. Information sent:
|
|
(5) Ghost Client sends a packet addressed to the Server's IP address and RML port. Information sent:
|
---->
UDP |
(6) Ghost Server receives the packet. | |
(8) Ghost Client receives the packet and displays any choices available to the user, such as which disk or partition, and disk or partition size. The user answers all the questions. The last question answered is whether to proceed. |
<----
UDP |
(7) Ghost Server replies with a message to the client's IP address. Information sent:
|
|
(9) Ghost Client sends a packet back to the server as an acknowledgment. Information sent:
|
---->
UDP |
(10) Ghost Server receives the acknowledgment and displays the client's IP address in the "Connected Clients" box. | |
(12) Ghost Client receives the packet. |
<----
UDP |
(11) Ghost Server sends a message instructing the client to wait for further information. The Ghost Server continues to establish connections with other Ghost Client computers until the Multicast Server's Auto Start criteria are met. | |
Communications after the Auto Start criteria have been met. Or after the Send button is clicked. |
(2) Each Ghost Client listens for messages sent to 224.77.255.255:xxxx, in addition to its own address. It processes packets sent to 224.77.255.255:xxxx as though they were sent to the client directly. |
<----
TCP <---- UDP |
(1) The Ghost Server sends data packets to the Multicast address 224.77.255.255:xxxx, and the same message to the Master Client's IP address. Information sent:
|
(3) For approximately every second packet sent by the Ghost Server, the Master Client sends an acknowledgment to the Ghost Server's IP address and the same message to the Broadcast IP address. *NOTE: If a Ghost Client misses a packet, it sends a message to the Server IP address, and the same message to the Broadcast IP Address. Information sent:
|
---->
UDP ----> TCP |
(4) Ghost Server receives the packet. | |
Closing the session Sends the first two packets indicated, or all four. |
(2) All Ghost Clients receive the packet. |
<----
UDP |
(1) The Ghost Server sends a packet to the Broadcast address 226.77.255.255:xxxx Information sent: There is no more data to be sent. |
(3) All Ghost Clients acknowledge the packet, addressed to the Ghost Server's IP address. |
---->
UDP |
(4) Ghost Server receives the acknowledgment. In some cases, Ghost Multicast stops, and the session is ended. In other situations, the session continues for two more packets. | |
(5) All Ghost Clients send a "session complete" packet to the server's IP address. |
---->
UDP |
(6) Ghost Server receives the packet. | |
(8) All Ghost Clients receive the packet. |
<----
TCP |
(7) Ghost Server sends an acknowledgment to 224.77.255.255.xxxx for the first "session complete" packet it receives. |
Additional information
Here is another way of looking at communications between the server and client computers.
High-Level Protocol used by the Ghost Enterprise Console and the Ghost Client
When the client computer is running Windows, the Ghost Client is NGctW32.exe. After the client computer has restarted into the hidden Ghost boot partition, the Ghost Client is NGctDOS.exe.
Sent By | Source Port | Destination Address | Destination Port | Type | Volume | |
Stage 1 | Client | Varies | 229.55.150.208 | 1345 | UDP | Low |
Server discovery | Server | 1345 | Client IP | Varies | UDP | Low |
Stage 2 | Client | Varies | Server IP | 1346 | UDP | Low |
Status update | Server | 1346 | Client IP | Varies | UDP | Low |
Stage 3 | Client | Varies | Server IP | 1346 | TCP | Low |
Executing task | Server | 1346 | Client IP | Varies | TCP | Medium |
High-Level Protocol used by the Ghost Multicast Server & the Ghost executable
The Ghost executable is Ghost.exe, running on the client computer.
Sent By | Source Port | Destination Address* | Destination Port | Type | Volume | |
Stage 1 | Client | Varies | 224.77.0.0 | 6666 | UDP | Low |
Server discovery | Server | 6666 | Client IP | Varies | UDP | Low |
Stage 2 | Client | Varies | Server IP | Varies | TCP | Low to Medium |
Status update | Server | Varies | Client IP | Varies | TCP | Low to Medium |
Stage 3 | Client | 7777 | Server IP | Varies | UDP | High |
Executing task | Server | Varies | 224.77.1.0 | 7777 | UDP | Low |
Server | Varies | 224.77.xxx.xxx | 7777 | UDP | High |
*By default, the IP address 224.77.xxx.xxx is a random address between 224.77.2.0 and 224.77.255.255. Starting with Ghost 6.0, the address can be set at the Multicast server to be any desired multicast address, using the -M switch. This switch is documented in the Ghost 6.01 User's Guide on page 133, and in the Ghost 6.03 User's Guide on page 162.
"Varies" indicates that an ephemeral port will be allocated for the connection. In Windows XP this port range is 1024-4999 and in Vista or above the port range is 49152-65535, though there are registry keys that can adjust this range (this adjustment is a Windows property, not a Ghost property).