Professional Documents
Culture Documents
1. Linux implementation
To use the TCP-NACK protocol in a physical machine is necessary to modify the TCP/IP
protocol stack from the Linux kernel source code, specifically the include and net
directories source code, which are distributed as is show in figure 4.
a. Sockets implementation
In Linux, the different communication protocols are implemented by sockets, which
works as a common interface between the user and the different files systems and
device systems. There are three data structures for the sockets handling. The first is
denominated socket buffer, which store the packet information, the second is
denominated socket, which register the open connections, and the last is
denominated sock, which maintains the open connections state {12}.
1) tcp_sendmsg: Copies the user space data to the Linux kernel space where are
assigned to the socket buffers and divide it in smaller segments.
2) tcp_send_skb: Organizes the data in 'socket buffers' to the transmission queue
and decides whether the transmission can take place or not.
3) Tcp_transmit_skb: Builds the TCP header and sends the segments to the network
layer.
1) Tcp_v4_rcv: Verifies the packet integrity, checks that the packet is destined to that
computer, process the transport layer checksum and removes the IP header.
2) Tcp_v4_do_rcv: Verifies that the received segment has a complete header and
checks the current TCP connection state.
3) Tcp_rcv_established: If the current TCP connection is defined as ESTABLISHED,
processes the received segments and copies the data to the user space. If the
segments havent errors a fast process is executed denominated fast path,
otherwise slow path is executed.
In Code 4 we assigned the space for a TCP notification flag. To assign his value and
definition we modified the code inside the tcp_flag_world structure, as is show in
Code 5.
Finally, inside the tcp_skb_cb structure, is necessary to assign the value that the
NACK flag takes when is assigned to a segment, creating the #define
TCPCB_FLAG_NACK 0x100 line, as is show in Code 6. Also is necessary to enlarge
the flags attribute type from u8 (8 bits) to u16 (16 bits).
- tcp_transmit_skb modification
If the segment to be transmitted has raised the new TCP_FLAG_NACK flag,
the TCP confirmation number field must contain the sequence number of the
detected damaged segment. This modification is show in Code 8.
2. Field tests
Once the Linux kernel that works with the TCP-NACK protocol was created, is possible to
do more realistic tests. In those tests intervene emulation experiments, different distance
links, different environments performance, different injected bit rate and the use of WiFi
and WiMAX technologies.
Netem is a utility available in the Linux kernel. Allows to emulate a link by specifying
bandwidth, delay, losses and traffic control {14}. The emulated wireless link contains
the described parameters in Table 1.
The command used to define the Netems parameters in the Linux terminal are the
next:
1) sudo tc qdisc add dev ethX root handle 1:0 tbf rate Bandwidthkbit
2) sudo tc qdisc add dev ethX parent 1:1 handle 10: netem corrupt Y% delay Z
Where ethX is the network interface name, Bandwidthkbit is the links bandwidth in
kbps, Y is the error probability in percent and Z is the delay in milliseconds.
Iperf configuration
Iperf allows to do a client-server TCP connection and size its transference data
rate {15}. In Table 2 are detailed the necessary configuration commands by
terminal for both terminal equipment.
Throughput evaluation
We did tests with the Iperf tool to obtain the average transference data rate
under the different error probabilities. Each essay consisted in establish a TCP
connection and do a data transference while one minute.
CWND evaluation
For this evaluation we started a TCP connection between the terminal equipment,
and while 25 seconds we transmitted the maximum possible data through the
emulated link.
Is introduced in the system the OpenVPN tool, which uses a TUN interphase that is a
network layer emulation. OpenVNP allows to connect multiple remote clients to a
server where anyone client can communicate whit the rest {17}.
Once configured client and server, the client execute in a terminal the
sudo./quake4-linux-1.4.2.x86.run command. The command displays the game
principal menu as is show in Figure 7, giving us the option of enter to the
multiplayer mode.
The evaluated parameters are throughput, delay and jitter by the D-ITG tool. This
is more detail explained in {17}.