Downloading peer to peer and pre-caching files
LANDESK clients are configured by default to 'check in' with their peers on the same network segment and to download from peers before looking for the files on preferred servers or the source. This is intended to limit the need for transferring files multiple times across network segments. This document describes how that process works and how you can pre-cache files in a subnet for peer download. Pre-caching is especially helpful for slow WAN links to remote sites.
How it works
- You deploy a package to multiple clients
- Each client performs a subnet-directed multicast broadcast and basically asks the following to it's peers: "Looking for packet X with a hash value of Y, who has it?"
- The targeted multicast service (tmcsvc.exe) on each peer checks to see if it has a file with matching hashFrom an administrator cmd prompt, you can run this command to export a list of files available for peer to peer sharing:
“%LDMS_LOCAL_DIR%\..\tmcsvc.exe” /f >cachelist.txt
- Peers who have the file will respond with "Yes, I have this package"
- The client requesting the package will open a connection on port 33354 to a peer or peers who have the package, and pull the file down via unicast.
After caching your package, the files will be located in:
To cache a package for later install:
- Create a distribution package that includes all necessary files as additional files.
- Schedule this package for deployment
- This will cause the files to download to the sdmcache but they will not execute at this time.
It is recommended that you precache the files on one device out of every 10.
Depending on your purpose for this package, you may want to move these files out of the sdmcache and into a different location. If so follow this alternative process:
- Create a script-type distribution package (batch, powershell, vbscript etc.)
- Include the files you need to download as Additional Files:
- Edit your batch script to copy the files from sdmcache into the necessary location. You can reference the sdmcache using this variable:
- Push this package out to several devices on each subnet. It is recommended that you precache the files on one device out of every 10.
- After the files are distributed to the staging devices, the TMC service must be restarted if you wish it to recognize the files immediately. Otherwise you can wait a few minutes.
Deploying the install package:
Once you have pre-cached or staged the files into each subnet, the next step is to actually perform the package installation:
- Due to our pre-caching, other targeted devices will now be able to download the necessary files from peers on their local subnet
- When you are ready to install, simply schedule the same distribution package again
- In the new scheduled task, edit the properties and select Task Settings -> Download and execute:
- Target all remaining devices to this task and start it
- When devices run the task and begin downloading files, they will first check for the presence of necessary files on peers. If found, they will download from a peer and avoid the need to download from the source.