AF_IPN is no longer protocol #34 (assigned to AF_ISDN).
[vde.git] / vde-2 / man / wirefilter.1
blobb010c504bd8fab17c4dee590dcfa62a8059673e1
1 .TH WIREFILTER 1 "December 6, 2006" "Virtual Distributed Ethernet"
2 .SH NAME
3 wirefilter \- Wire packet filter for Virtual Distributed Ethernet
4 .SH SYNOPSIS
5 .B wirefilter
7 [\fB\-l\fI loss\fR]
8 [\fB\-l\fI lostburst\fR]
9 [\fB\-d\fI delay\fR]
10 [\fB\-D\fI dup\fR]
11 [\fB\-b\fI bandwidth\fR]
12 [\fB\-s\fI interface_speed\fR]
13 [\fB\-c\fI channel_capacity\fR]
14 [\fB\-n\fI noise_factor\fR]
15 [\fB\-m\fI mtu_size\fR]
16 [\fB\-M\fI mgmt socket\fR]
17 [\fB\-v\fI vde_plug1:vde_plug2\fR]
18 [\fB\--daemon\fI]
19 [\fB\--pidfile\fI pidfile_path]
20 [\fB\--blink\fI blink]
21 [\fB\--blinkid\fI blink_identifier]
22 [\fB-N\fR]
23 .br
24 .SH DESCRIPTION
26 \fBwirefilter\fP 
27 is able to emulate delays and packet loss on virtual wires.
28 e.g.:
31 dpipe vde_plug /tmp/s1 = wirefilter -l 10 = vde_plug /tmp/s2
33 creates a wire between two vde_switches (with sockets /tmp/s1 and /tmp/s2
34 respectively). This cable looses 10% of the packets in each direction.
36 The same cable can be created using:
39 wirefilter -v /tmp/s1:/tmp/s2 -l 10
41 .SH OPTIONS
42 .TP
43 .B \-l "\fIloss\fP"
44 percentage of loss as a floating point number. It is possible to specify
45 different loss percentage for the two channels: LR20.5 means 20.5% of packet
46 flowing left to right are lost, RL10 means 10% from right to left.
47 .TP
48 .B \-L "\fIlostburst\fP"
49 when this is not zero, wirefilter uses the Gilbert model for bursty errors.
50 This is the mean length of lost packet bursts. (it is a two state Markov
51 chain: the probability to exit from the faulty state is \fI1/lostburst\fP, the
52 probability to enter the faulty state is \fIloss/(lostburst-(1-loss))\fP. The
53 loss rate converges to the value \fIloss\fR.
54 .TP
55 .B \-d "\fIdelay\fP" 
56 Extra delay (in milliseconds). This delay is added to the
57 real communication delay.  Packets are temporarily stored and resent after the
58 delay.  It is possible to specify different values for LR and RL like in the
59 previous option.  When the delay is specified as two numbers with a + in
60 between, the first is the standard delay and the second is a random variation.
61 1000+500 means that the delay can be randomly chosen between half second and
62 1.5 seconds. It is possible to add 'U' or 'N' at the end. 1000+500U means that
63 the dealys are uniformly distributed, 1000+500N means that the delays follow
64 a Gaussian normal distribution (more than 98% of the values are inside the
65 limits).
66 .TP
67 .B \-D "\fIdup\fP"
68 percentage of dup packet. It has the same syntax of -l. Do not use dup factor 100% 
69 because it means that each packet is sent infinite times. 
70 .TP
71 .B \-b "\fIbandwidth\fP"
72 Channel bandwidth in Bytes/sec. It has the same syntax of -d. It is also possible to
73 use suffixes K,M,G to abbreviate 2^10, 2^20, 2^30.
74 128K means 128KBytes/sec. 128+64K means 64i to 196KBytes/sec.
75 Sender is not prevented from sending packets, delivery is delayed to limit the bandwidth
76 to the desired value. (Like a bottleneck along the path)
77 U and N after the values (e.g. 128+64KN) set the statistic distribution to
78 use (uniform or normal).
79 .TP
80 .B \-s "\fIspeed\fP"
81 Interface speed in Bytes/sec. It has the same syntax of -b. Input is blocked for
82 the tramission time of the packet, thus the sender is prevented from sending too fast.
83 .TP
84 .B \-c "\fIcapacity\fP"
85 Channel capacity (in Bytes): maximum size of the packet queue. Exceeding packets 
86 are discarded. 
87 .TP
88 .B \-n "\fInoise factor\fP"
89 Number of bits damaged/one megabyte. 
90 .TP
91 .B \-m "\fImtu size\fP"
92 Packets longer than mtu_size are discarded.
93 .TP
94 .B \-N 
95 nofifo. with -N packets can be reordered.
96 .TP
97 .B \-M "\fImgmt socket\fP" 
98 the unix socket where the parameters (loss percentage, delay etc) can be checked and
99 changed runtime. unixterm(1) can be used as a remote terminal for wirefilter.
101 .B \-v "\fIvde_plug1:vde_plug2\fP"
102 If this option is used, the two local vde_plugs (vde_plug1 and vde_plug2) will be connected each other instead of stdin/stdout,
103 using the libvdeplug libraries. 
105 .B \--mgmtmode "\fImode\fP" 
106 this option sets the access mode of the mgmt socket.
108 .B \--daemon\fP 
109 wirefilter becomes a daemon
111 .B \--pidfile "\fIpathnamefP"
112 wirefilter saves its pid into the  file.
114 .B \--blinkid "\fIname\fP"                       
115 This option defines the id sent for each packet to the blink server 
116 (see the --blink option below).
117 The stardard identifier for a wirefilter is the process pid.
119 .B \--blink "\fIsocket\fP"        
120 wirefilter sends a log message to the specified PF_UNIX/DATAGRAM socket 
121 for each packet sent. Each packet has the format: id direction length.
122 e.g:
124 .in +4n
126 6768 LR 44
127 6768 LR 44
128 6768 RL 100
129 6768 LR 100
130 6768 LR 44
134 .SH NOTICE
135 Virtual Distributed Ethernet is not related in any way with
136 www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik"
137 i.e. the German "Association for Electrical, Electronic & Information
138 Technologies").
140 .SH SEE ALSO
141 \fBvde_switch\fP(1),
142 \fBvdeq\fP(1).
143 \fBdpipe\fP(1).
144 \fBunixterm\fP(1).
146 .SH AUTHOR
147 VDE is a project by Renzo Davoli <renzo@cs.unibo.it>