1UDP-SENDER(1) Udpcast UDP-SENDER(1)
2
3
4
6 udp-sender - broadcast file on a LAN
7
9 udp-sender [--file file] [--full-duplex] [--half-duplex] [--pipe pipe]
10 [--portbase portbase] [--blocksize size] [--interface net-interface]
11 [--mcast-data-address data-mcast-address] [--mcast-rdv-address mcast-
12 rdv-address] [--max-bitrate bitrate] [--pointopoint] [--async] [--log
13 file] [--min-slice-size min] [--max-slice-size max] [--slice-size]
14 [--ttl time-to-live] [--fec stripesxredundancy/stripesize]
15 [--print-seed] [--rexmit-hello-interval interval] [--autostart
16 autostart] [--broadcast] [--min-receivers receivers] [--min-wait sec]
17 [--max-wait sec] [--nokbd] [--retries-until-drop n] [--bw-period n]
18
20 "Udp-sender" is used to broadcast a file (for instance a disk image) to
21 multiple "udp-receivers" on the local LAN. In order to do this, it uses
22 Ethernet multicast or broadcast, so that all receivers profit from the
23 same physical datastream. Thus, sending to 10 destinations does not
24 take more time than it would take to send just 2.
25
27 Basic options
28
29 --file file
30 Reads data to be transmitted from file. If this parameter is not
31 supplied, data to be transmitted is read from stdin instead.
32
33 --pipe command
34 Sends data through pipe before transmitting it. This is useful for
35 compressing/decompressing it, or for stripping out unused blocks.
36 The command gets a direct handle on the input file or device, and
37 thus may seek inside it, if needed. "Udpcast" itself also keeps a
38 handle on the file, which is used for an informal progress display.
39 The command's stdout is a pipe to udpcast.
40
41 --autostart n
42 Starts transmission after n retransmissions of hello packet,
43 without waiting for a key stroke. Useful for unattended operation,
44 where udp-sender is started from a cron-job for a
45 broadcast/multicast at a scheduled time.
46
47 Networking options
48
49 The following networking options should be supplied both on the sender
50 and the receivers:
51
52 --portbase portbase
53 Default ports to use for udpcast. Two ports are used: portbase and
54 portbase+1 . Thus, Portbase must be even. Default is 9000. The same
55 portbase must be specified for both "udp-sender" and
56 "udp-receiver".
57
58 --interface interface
59 Network interface used to send out the data. Default is "eth0"
60
61 --ttl time to live
62 Sets the time-to-live parameter for the multicast packets. Should
63 theoretically allow to use UDPCast beyond the local network, but
64 not tested for lack of a multicast router.
65
66 --mcast-rdv-address address
67 Uses a non-standard multicast address for the control (rendez-vous)
68 connection. This address is used by the sender and receivers to
69 "find" each other. This is not the address that is used to transfer
70 the actual data.
71
72 By default "mcast-rdv-address" is the Ethernet broadcast address if
73 "ttl" is 1, and 224.0.0.1 otherwise. This setting should not be
74 used except in very special situations, such as when 224.0.0.1
75 cannot be used for policy reasons.
76
77 The following networking options should be supplied only on the sender:
78
79 --mcast-data-address address
80 Uses the given address for multicasting the data. If not specified,
81 the program will automatically derive a multicast address from its
82 own IP (by keeping the last 27 bits of the IP and then prepending
83 232).
84
85 --pointopoint
86 Point-to-point mode. Only a single receiver is allowed, but the
87 data will be directly send to this receiver (in unicast mode),
88 rather than multicast/broadcast all over the place. If no async
89 mode is chosen, and there happens to be only one receiver, point-
90 to-point is activated automatically.
91
92 --nopointopoint
93 Don't use point-to-point, even if there is only one single
94 receiver.
95
96 --full-duplex
97 Use this option if you use a full-duplex network. T-base-10 or 100
98 is full duplex if equipped with a switch. Hub based networks, or
99 T-base-2 networks (coaxial cable) are only half-duplex and you
100 should not use this option with these networks, or else you may
101 experience a 10% performance hit.
102
103 N.B. On high-latency WAN links, the full-duplex option can lead to
104 substantial performance improvements, because it allows udp-sender
105 to send more data while it is still waiting for the previous batch
106 to get acknowledged.
107
108 --half-duplex
109 Use half duplex mode (needed for Hub based or T-base-2 networks).
110 This is the default behavior in this version of udpcast.
111
112 --broadcast
113 Use Ethernet broadcast, rather than multicast. Useful if you have
114 Ethernet cards which don't support multicast.
115
116 By default, "udpcast" uses multicast. This allows sending the data
117 only to those receivers that requested it. Ethernet cards of
118 machines which don't participate in the transmission automatically
119 block out the packets at the hardware level. Moreover, network
120 switches are able to selectively transmit the packets only to those
121 network ports to which receivers are connected. Both features thus
122 allow a much more efficient operation than broadcast. This option
123 should only be supplied on the sender.
124
125 -b blocksize
126 Choses the packet size. Default (and also maximum) is 1456.
127
128 Unidirectional mode (without return channel)
129
130 The options described below are useful in situations where no "return
131 channel" is available, or where such a channel is impractical due to
132 high latency. In an unidirectional setup (i.e. without return channel),
133 the sender only sends data but doesn't expect any reply from the
134 receiver.
135
136 Unidirectional options must be used together, or else the transfer will
137 not work correctly. You may for example use the following command line:
138
139 "udp-sender --async --max-bitrate 10m --fec 8x8"
140
141 --async
142 Asynchronous mode. Do not request confirmations from the receiver.
143 Best used together with forward error correction and bandwidth
144 limitation, or else the receiver will abort the reception as soon
145 as it misses a packet. When the receiver aborts the reception in
146 such a way, it will print a list of packets lost in the slice
147 causing the problem. You can use this list to tune the forward
148 error correction parameters.
149
150 --max-bitrate bitrate
151 Limits bandwidth used by udpcast. Useful in asynchronous mode, or
152 else the sender may send too fast for the switch and/or receiver to
153 keep up. Bitrate may be expressed in bits per second (--bitrate
154 5000000), kilobits per second ("--bitrate 5000k") or megabits per
155 second ("--bitrate 5m"). This is the raw bitrate, including packet
156 headers, forward error correction, retransmissions, etc. Actual
157 payload bitrate will be lower.
158
159 --fec interleave"x"redundancy"/"stripesize
160 Enables forward error correction. The goal of forward error
161 correction is to transmit redundant data, in order to make up for
162 packets lost in transit. Indeed, in unidirectional mode, the
163 receivers have no way of requesting retransmission of lost packets,
164 thus the only way to address packet loss is to include redundant
165 information to begin with. The algorithm is designed in such a way
166 that if r redundant packets are transmitted, that those can be used
167 to compensate for the loss of any r packets in the same FEC group
168 (stripe).
169
170 In order to increase robustness of the FEC algorithm against burst
171 packet losses, each slice is divided in interleave stripes. Each
172 stripe has stripesize blocks (if not specified, stripesize is
173 calculated by diving slice-size by interleave). For each stripe,
174 redundancy FEC packets are added. Stripes are organized in such a
175 fashion that consecutive packets belong to different stripes. This
176 way, we ensure that burst losses affect different stripes, rather
177 than using all FEC packets of a single stripe. Example: "--fec
178 8x8/128"
179
180 --rexmit-hello-interval timeout
181 If set, rebroadcasts the HELLO packet used for initiating the
182 casting each timeout milliseconds.
183
184 This option is useful together with asyc mode, because with async
185 mode the receiver won't send a connection request to the sender
186 (and hence won't get a connection reply). In async mode, the
187 receivers get all needed information from the hello packet instead,
188 and are thus particularly dependant on the reception of this
189 packet, makeing retransmission useful.
190
191 This option is also useful on networks where packet loss is so high
192 that even with connection requests, sender and receiver would not
193 find each other otherwise.
194
195 --retries-until-drop retries
196 How many time to send a REQACK until dropping a receiver. Lower
197 retrycounts make "udp-sender" faster to react to crashed receivers,
198 but they also increase the probability of false alerts (dropping
199 receivers that are not actually crashed, but merely slow to respond
200 for whatever reason)
201
202 Keyboardless mode
203
204 The options below help to run a sender in unattended mode.
205
206 --min-receivers n
207 Automatically start as soon as a minimal number of receivers have
208 connected.
209
210 --min-wait t
211 Even when the necessary amount of receivers do have connected,
212 still wait until t seconds since first receiver connection have
213 passed.
214
215 --max-wait t
216 When not enough receivers have connected (but at least one), start
217 anyways when t seconds since first receiver connection have pased.
218
219 --nokbd
220 Do not read start signal from keyboard, and do not display any
221 message telling the user to press any key to start.
222
223 --daemon-mode
224 Do not exit when done, but instead wait for the next batch of
225 receivers.
226
227 Example:
228
229 "udp-sender -f zozo --min-receivers 5 --min-wait 20 --max-wait 80"
230
231 · If one receiver connects at 18h00.00, and 4 more within the next 5
232 minutes, start at 18h00.20. (5 receivers connected, but min-wait
233 not yet pased)
234
235 · If one receiver connects at 18h00.00, and 3 more within the next 5
236 minutes, then a last one at 18h00.25, start right after.
237
238 · If one receiver connects at 18h00.00, then 3 more within the next
239 15 minutes, then no one, start at 18h01.20. (not enough receivers,
240 but we start anyways after max-wait).
241
242 Logging options
243
244 The options instruct "udp-sender" to log some additional statistics to
245 a file:
246
247 --log file
248 Logs some stuff into file.
249
250 --bw-period seconds
251 Every so much seconds, log instantenous bandwidth seen during that
252 period. Note: this is different from the bandwidth displayed to
253 stderr of the receiver, which is the average since start of
254 transmission.
255
256 <!--
257
258 Tuning options (sender)
259
260 The following tuning options are all about slice size. Udpcast groups
261 its data in slices, which are a series of blocks (UDP packets). These
262 groups are relevant for
263
264 · data retransmission: after each slice, the server asks the
265 receivers whether they have received all blocks, and if needed
266 retransmits what has been missing
267
268 · forward error correction: each slice has its set of data blocks,
269 and matching FEC blocks.
270
271 --min-slice-size size
272 minimum slice size (expressed in blocks). Default is 16. When
273 dynamically adjusting slice size (only in non-duplex mode), never
274 use smaller slices than this. Ignored in duplex mode (default).
275
276 --max-slice-size size
277 maximum slice size (expressed in blocks). Default is 1024. When
278 dynamically adjusting slice size (only in non-duplex mode), never
279 use larger slices than this. Ignored in duplex mode (default).
280
281 --default-slice-size size
282 Slice size used (starting slice size in half-duplex mode).
283
284 Tuning the forward error correction
285
286 There are three parameters on which to act:
287
288 redundancy
289 This influences how much extra packets are included per stripe. The
290 higher this is, the more redundancy there is, which means that the
291 transmission becomes more robust against loss. However, CPU time
292 necessary is also proportional to redundancy (a factor to consider
293 on slow PC's), and of course, a higher redundancy augments the
294 amount of data to be transmitted.
295
296 interleave
297 This influences among how many stripes the data is divided. Higher
298 interleave improves robustness against burst loss (for example, 64
299 packets in a row...). It doesn't increase robustness against
300 randomly spread packet loss. Note: interleave bigger than 8 will
301 force a smaller stripesize, due to the fact that slicesize is
302 limited to 1024.
303
304 stripesize
305 How many data blocks there are in a stripe. Due to the algorithm
306 used, this cannot be more than 128. Reducing stripe size is an
307 indirect way of augmenting (relative) redundancy, without incurring
308 the CPU penalty of larger (absolute) redundancy. However, a larger
309 absolute redundancy is still preferable over a smaller stripesize,
310 because it improves robustness against clustered losses. For
311 instance, if 8/128 is preferable over 4/64, because with 8/128 the
312 8 FEC packets can be used to compensate for the loss of any of the
313 128 data packets, whereas with 4/64, each group of 4 FEC packets
314 can only be used against its own set of 64 data packets. If for
315 instance the first 8 packets were lost, they would be recoverable
316 with 8/128, but not with 4/64.
317
318 Considering these, change parameters as follows:
319
320 · If you observe long stretches of lost packets, increase interleave
321
322 · If you observe that transfer is slowed down by CPU saturation,
323 decrease redundancy and stripesize proportionnally.
324
325 · If you observe big variations in packet loss rate, increase
326 redundancy and stripesize proportionnally.
327
328 · If you just observe high loss, but not necessarily clustered in any
329 special way, increase redundancy or decrease stripesize
330
331 · Be aware that network equipment or the receiver may be dropping
332 packets because of a bandwidth which is too high. Try limiting it
333 using "max-bitrate"
334
335 · The receiver may also be dropping packets because it cannot write
336 the data to disk fast enough. Use hdparm to optimize disk access on
337 the receiver. Try playing with the settings in
338 "/proc/sys/net/core/rmem_default" and
339 "/proc/sys/net/core/rmem_max", i.e. setting them to a higher value.
340
342 udp-receiver
343
345 Alain Knaff
346
347
348
349current July 28, 2009 UDP-SENDER(1)