| Line | Revision | Contents |
| 1 | 27 | Interested parties about FSP please email |
| 2 | to Radim Kolar | |
| 3 | 161 | hsn at sendmail.cz |
| 4 | 27 | visit our homepage on |
| 5 | http://fsp.sourceforge.net/ | |
| 6 | and join us! | |
| 7 | ||
| 8 | For more than 7 years benefits of FSP protocol were unnoticed | |
| 9 | and FSP software was not maintained... | |
| 10 | ||
| 11 | FSP today | |
| 12 | 105 | |
| 13 | 27 | Written by Radim Kolar |
| 14 | ||
| 15 | 105 | Protocol related |
| 16 | ||
| 17 | FSP uses UDP datagrams and it is reliable even when there is | |
| 18 | high number of packet loss. It is usable on WiFi network with | |
| 19 | 276 | 60%-80% packet loss. |
| 20 | 277 | |
| 21 | 105 | FSP can very quickly addapt to changing line condition. This |
| 22 | 277 | is excelent for wireless packet networks where network condition |
| 23 | changes wildly based on receiver location and disturbance. | |
| 24 | Unlike TCP based protocols, FSP has a fast restart when | |
| 25 | line condition improves - It do not needs any RTT for retuning | |
| 26 | self. FSP goes immediatly back to maximum possible speed. | |
| 27 | 105 | |
| 28 | Maximum FSP speed is by design lower than maximum speed of TCP | |
| 29 | based protocols because it has only 1 packet in the network. | |
| 30 | TCP protocol has about 3 packets. Design of FSP protocol | |
| 31 | makes impossible to send more than 1 packet into network. | |
| 32 | 279 | This is nice method for bandwidth protection, better handling |
| 33 | traffic spikes and for sever protection against denial of | |
| 34 | service attacks on server. | |
| 35 | 105 | |
| 36 | FSP server do not sends any data out unless is asked for. This | |
| 37 | solves problem with transfering duplicate data when using TCP | |
| 38 | protocol on overloaded lines. About 30% are dupes, thrown out | |
| 39 | by client. Note: TCP stacks from BSD family has this dupe | |
| 40 | ratio much lower. | |
| 41 | ||
| 42 | Embedded devices | |
| 43 | ||
| 44 | FSP protocol is very easy to implement; client core has about | |
| 45 | one page of C code. It is ideal for embedded devices for | |
| 46 | file-transfer tasks, like firmware downloading. Because of its | |
| 47 | simplicity, there is a little chance to writing buggy | |
| 48 | implementation. | |
| 49 | ||
| 50 | 278 | FSP is also good for remote booting. It is simplier, faster |
| 51 | and more reliable than TFTP and supports directory listings. | |
| 52 | 105 | |
| 53 | FSP protocol can be used as wire-protocol even without using | |
| 54 | any layer 2 stuff. It operates in degraded mode with extra | |
| 55 | features disabled. | |
| 56 | ||
| 57 | 280 | Stealth operation |
| 58 | 105 | |
| 59 | UDP ports are not often port scanned today, only one exception | |
| 60 | is scanning for Windows/Samba file sharing service. Nobody | |
| 61 | will notice that you are running a fsp server. | |
| 62 | ||
| 63 | FSP uses UDP which is unnoticed by many firewalls. FSP server | |
| 64 | runs on 21 port by default, if you move it to port 53 (dns) | |
| 65 | even strictly configured firewall can be worked around. | |
| 66 | ||
| 67 | You want to run anonymous archive and want to keep lamers out. | |
| 68 | ||
| 69 | 280 | Busy sites |
| 70 | ||
| 71 | 105 | You want to share something without ruining your valueable |
| 72 | 280 | bandwidth or latency. FSP protocol is slower than TCP based |
| 73 | protocol it means that more bandwith will be left for your own use. | |
| 74 | Important point is that starting data sharing via FSP do not | |
| 75 | considerably raises your network latency because FSP can | |
| 76 | have just 1 packet floating in network. In ideal condition you will | |
| 77 | not notice increased latency at all. | |
| 78 | 105 | |
| 79 | 280 | You have overloaded archive site. It is historicaly proven fact |
| 80 | that FSP handles overloaded lines or sites better than anything else. | |
| 81 | FSP is very suitable for distributing updates to very large number | |
| 82 | of subscribers because it can easily handle traffic spikes without | |
| 83 | breaking connections and it can be very easily distributed between | |
| 84 | multiple servers because it is more or less connectionless. | |
| 85 | 105 | |
| 86 | You do want to share large data files (movies, ISO images) on | |
| 87 | slow (or you do not want to waste valuable bandwidth) lines. | |
| 88 | Ideal for sharing files on modem lines. | |
| 89 | 27 | |
| 90 | FSP daemon is a very light server. | |
| 91 | 105 | |
| 92 | 27 | What is the purpose of FSP (V2.8.1): |
| 93 | 105 | |
| 94 | 27 | Written by A.J.Doherty@reading.ac.uk |
| 95 | ||
| 96 | FSP is a set of programs that implements a public-access archive | |
| 97 | similar to an anonymous-FTP archive. It is not meant to be a | |
| 98 | replacement for FTP; it is only meant to do what anonymous-FTP | |
| 99 | does, but in a manner more acceptable to the provider of the | |
| 100 | service and more friendly to the clients. | |
| 101 | ||
| 102 | Providing anonymous-FTP service can be costly --- each active | |
| 103 | session consumes one process slot in the OS and one stream socket | |
| 104 | entry in the network sub-system. The servers can also run | |
| 105 | concurrently, adding to the system load. A popular archive site | |
| 106 | can easily be overwhelmed as a result. Some were forced to | |
| 107 | shutdown and some impose inconvenient access restrictions. | |
| 108 | ||
| 109 | Unlike FTP, FSP is connection-less and virtually state-less. One | |
| 110 | server handles requests from all clients machines. Each active | |
| 111 | client machine takes up 16-bytes in a dynamically extensible | |
| 112 | table. Since only one server exists on a server machine at any | |
| 113 | time, the load added to the server machine is no more than one. | |
| 114 | ||
| 115 | In exchange for allowing site operators to keep their sites open | |
| 116 | and do away with cumbersome access restrictions, this is what the | |
| 117 | clients accept with FSP: | |
| 118 | ||
| 119 | 1) Lower transfer rate. The maximum rate is 1 kbyte per UDP | |
| 120 | message round-trip time between the client and the server. | |
| 121 | ||
| 122 | In addition to the potential for more abundant sites and more | |
| 123 | accessible sites, this is what the clients gain with FSP: | |
| 124 | ||
| 125 | 1) Robustness. Since FSP is connectionless, fluctuations in | |
| 126 | the network will not abort a FSP transaction. Furthermore, | |
| 127 | the 16-bytes of data for each client can be regenerated at | |
| 128 | any point during any transaction. Thus, if the server goes | |
| 129 | down at any point during a transaction, the transaction will | |
| 130 | resume when the server is restarted. (like NFS) | |
| 131 | ||
| 132 | 2) Friendlier user interface. FSP does not have its own command | |
| 133 | interpretor like FTP. Since it is connectionless, there is | |
| 134 | no reason to carry much information from one command to the | |
| 135 | next, and the commands can all be made into individual Unix | |
| 136 | programs. For instance, there is one program you run to list | |
| 137 | the directory and another you run to download a file. | |
| 138 | ||
| 139 | 3) Client protection. FSP oversees a directory structure similar | |
| 140 | to that of an anonymous-FTP. However, a directory created | |
| 141 | via FSP transaction is owned by the client machine that issued | |
| 142 | the creation request. The client can create and delete files | |
| 143 | and subdirectories in that directory. In addition, the client | |
| 144 | can enable any of the four attributes for that directory: | |
| 145 | ||
| 146 | A) Give all other clients the permission to create files. | |
| 147 | ||
| 148 | B) Give all other clients the permission to delete files | |
| 149 | or subdirectories. | |
| 150 | ||
| 151 | C) Give all other clients the permission to read files. | |
| 152 | (this is true by default) | |
| 153 | ||
| 154 | D) Give all other clients the permission to create sub- | |
| 155 | directories. | |
| 156 | ||
| 157 | Note: A subdirectory can be deleted if it is empty and the | |
| 158 | client owns the subdirectory. | |
| 159 | ||
| 160 | 4) Server protection. FSP server does not spawn sub-programs. | |
| 161 | It will accept only paths that are downward relative to its | |
| 162 | designated working directory. On systems with symbolic links, | |
| 163 | the server will follow symbolic links, but it does not follow | |
| 164 | uplinks (".."). Clients cannot create symbolic links and | |
| 165 | care should be taken so that other users on the server machine | |
| 166 | cannot create symbolic links in the server's work space. | |
| 167 | ||
| 168 | It is also fairly difficult to formulate an attack to force a | |
| 169 | shutdown of a FSP site by actions of a rogue site. About the | |
| 170 | only way to disrupt a FSP service is to flood the FSP site | |
| 171 | with network packets. FSP server prevents itself from | |
| 172 | 'counter-flooding' by filtering for legitimate requests using | |
| 173 | the following method: | |
| 174 | ||
| 175 | A) Each request message contains a key. For each client, | |
| 176 | server database contains the keys to be used for the | |
| 177 | next client request and for the previous client request. | |
| 178 | ||
| 179 | B) If the next request does not contain a key that matches | |
| 180 | either of the two keys, it is accepted only if at least | |
| 181 | one minute has elapsed since the last time a request | |
| 182 | is accepted. If the key does match the old key | |
| 183 | (retransmit by client) it is accepted if the elapse time | |
| 184 | is greater than 3 seconds. | |
| 185 | ||
| 186 | C) Every request message accepted is acknowledged with | |
| 187 | one reply message. The reply message contains a new | |
| 188 | key to used for the next request. The new key is | |
| 189 | computed by the server with a pseudo-random number | |
| 190 | generator. | |
| 191 | ||
| 192 | Flooding is a blatant violation of network etiquette because | |
| 193 | a site can be subjected to flooding attack whether it has FSP | |
| 194 | running or not, and flooding congests every link and gateway | |
| 195 | between the rogue client and the server. As a further measure | |
| 196 | of protection, the server loads a table of rogue clients on | |
| 197 | startup. The server will not respond to requests from any of | |
| 198 | those clients. | |
| 199 | ||
| 200 | *********************************************************************** | |
| 201 | ||
| 202 | This is a free software. Be creative; make your own macros and tools | |
| 203 | and let me know of any bugs and suggestions. | |
| 204 | ||
| 205 | *********************************************************************** | |
| 206 | ||
| 207 | Source code uses several BSD-like licenses; Whole FSP is distributed | |
| 208 | under 2-point BSD license, also known as MIT X11 License. |
Loggerhead is a web-based interface for Bazaar branches