README for IGI source code [ root version ]

1. What's IGI

IGI means "Initial Gap Increasing", it is a technique to measure available
bandwidth between two network end points. This package includes the root
version implementation for this technique, that is, you must have root access
to run this code

From IGI's implementation, we can also easily get the measurement for another
technique, which is called PTR (Packet Transmission Rate). This implementation
outputs both IGI value and PTR value (refer to section "3. Output" below).

For the details about IGI and PTR, please refer to the "Document" section in
IGI's homepage.

2. How to build and run IGI

(1). Build libpcap

IGI depends on libpcap to do packet filtering, so before building IGI, make
sure libpcap.a exists in your system. If necessary, the source code can
be downloaded from

or from IGI's homepage:

Please refer the document of libpcap on how to build it.

(2). Build IGI

In IGI's source directory:

(1) In Makefile, modify the LIBPCAP to points the directory where
your libpcap.a locates
(2) make

(3). Run IGI

IGI is executed on two end points of the network, one (igi_client) sends
probing packets, the other (igi_server) uses packet filter to record the
time stamps (so you must have root access) when the probing packet arrive.
We call the former one as "src machine", and the latter one as "dst machine".

Need to emphasize: the probing direction is igi_client -> igi_server, you
must set it right to get what you want.

On dst machine:

./igi_server [-vdh]

-v verbose mode
-d debug mode (will print more message than verbose mode)

On src machine:

./igi_client [-n probe_num] [-s packet_size] [-p dst_port]
[-m working_mode] [-f trace_file] [-vdh] dst_address

-n set the number of probing packets in each probing phase.
-s set the packet size of the probing packets in byte.
-p indicate the dst machine's listening port.
This is optional, because igi_client can itself search for the
port that the igi_server is using.
-m working_mode (default: sequential):
o. binary: use binary search to locate the turning point.
o. fast: this method tries to achieve the best speed to
get the final results. It does not sleep, and
use b_gap to adjust the source gap

o. sequential: this just starts from a very low src gap,
sequentially increases it, until the src gap
is twice of the possible turning gap value.

o. simple: this method simply assump that the turning
point is at the bottleneck gap, and just do
two probings:
1st: get the b_gap
2nd: probe on b_gap (turing point)
It is not very accurate, but much faster.

-f indicate the trace file name, which will record the packet
information in way that matlab script can directly work on.
-v verbose mode.
-d debug mode.

"dst_address" can be either IP address or hostname.

3. Output

Here is an output example in verbose mode. The [* *] is the explaination for
the output, hope it does not make it more confusing :).

The debug mode will output more message, and mainly for the purpose of my
debuging (of course). It is not explained here. But if you are really curious,
please forward your questions to

*. client side output (verbose mode):

# ./igi_client -v -m fast

src = (0)
dst = (0)
we get str: READY
[* basic probing setup information *]

probe_num = 60 packet_size = 500 delay_num = 0
from dst: data_size = 720 total_count = 60
avr_src_gap = 0.000011
avr_dst_gap = 0.000044
[* statistics for single probing phase, "delay_num" is *]
[* the loop count used to generate the source gap *]

probe_num = 60 packet_size = 500 delay_num = 45
from dst: data_size = 720 total_count = 60
avr_src_gap = 0.000027
avr_dst_gap = 0.000043

probe_num = 60 packet_size = 500 delay_num = 54
from dst: data_size = 720 total_count = 60
avr_src_gap = 0.000033
avr_dst_gap = 0.000043

probe_num = 60 packet_size = 500 delay_num = 63
from dst: data_size = 720 total_count = 60
avr_src_gap = 0.000038
avr_dst_gap = 0.000043
[* all the above only appear in the verbose/debug mode *]

Bottleneck Bandwidth: 92209854.348493
Competing Bandwidth: 0.000000
Packet Transmit Rate: 92876820.089005
Available Bandwidth: 92209854.348493

[* THE final measurements, unit: bps (bit/second). *]
[* Bottleneck Bandwidth: the bottleneck link capacity *]
[* Competing Bandwidth: the throughput of background *]
[* traffice for "IGI" algorithm *]
[* Packet Transmission Rate: the "PTR" value in the JSAC*]
[* paper, the probing rate of the packet train at *]
[* the turning point *]
[* Available Bandwidth: bottleneck_bw - competing_bw, *]
[* this is so called "IGI" value *]

fast probing time : 0.028760
fast probing count: 4
ending gaps: [ 0.000038 0.000043 ]

[* statistics for the whole probing procedure *]

*. server side output (verbose mode):

# ./igi_server -v
server port = 10241
[* probing server listening here *]
get new connection
src_ip_str =
dst_ip_str =
[* except the ip addresses and port numbers, the *]
[* information below is not important unless you want to*]
[* know how the source code works *]

waiting for START msg
probe_num = 60
request device name: eth0
new device eth0
device inited
create a new filter item
come into get_packets
start sending back data
start sending back data
start sending back data
start sending back data
start sending back 0 data
start sending back 0 data
3 no data phases, close socket with
[* server will automatically close the connection with *]
[* the client after 3 "null" phases *]

4. Bug report

Please send any bugs to

Mon Jul 22 17:26:47 EDT 2002