TWiki home TWiki > Simulation > SimulationWebHome > Tutorials > FileSenderreceiverOverTCPIPv4 TWiki webs:
Main | TWiki | Know | Sandbox
Simulation . { Changes | Index | Search | Go }

File Sender/Receiver Over TCP and IPv4

This simulation topology is very simple. We have a file sender, which will transfer a file of 1 MB size to a receiver. In the simulation set up you will see a configurator module. The configurator module automatically allocates IPv4 addresses, and sets up the routing tables in the nodes. If your research is not in the area of routing protocols, configurator module saves you a lot of time. Here is the simulation topology for our file sender/receiver:

file-sender-receiver.png
Figure 1: File sender/receiver network topology.
In this simulation we will have two active applications in the sender and receiver: TCPApp (which sends and receives a "file" over the link), and a PingApp (which generates ICMP echo requests and replies). To simulate this network, you only need three files: The NED file is pretty short, and I think self explanatory. The omnetpp.ini file contains plenty of configuration parameters for the TCP and Ping Applications. The "dummy" executable file is interesting: It only contains a single line: $HOME/oppsim/INET/bin/INET $*. That's really it. OMNeT++ magically runs our little TCP/IP network when we execute this (note that you need to adjust the directory pointers in the files if you do not use my directory organization).

So far so good. Let's run the network, and see some results: ./file-sender-receiver. Note the absence of the make process! No need to compile any C++ code since the INET Framework code is already compiled, and we use dynamic loading method.

file-sender-receiver-sim.png
Figure 2: File sender-receiver simulation.
As the omnetpp.ini file dictates, simulation will run for 8 simulated seconds, and will record statistics into the omnetpp.vec file. We can use the plove program to examine the statistics: plove omnetpp.vec. There are quite a few number of data sets available. Let's plot the sequence numbers of the segments sent by the file sender:
send-seq-no-plot.png
Figure 3: Combined graph of the sequence numbers of the segments recorded when they leave the TCP layer of the file sender and arrive at the file receiver, ACKs sent by the receiver, and instants when the router's output queue drops a packet (X-Axis is time in seconds).
The graph shows the sequence number of the packets (as seen by the receiver). We can easily identify the slow-start phase, and then packet losses and recovery. We deliberately set the buffer capacity of the router to a very small number to observe packet losses. The graphing tool allows you to zoom in any section of the plot to have more detailed views. Check out the other plots, and let me know if anything is not right.

That concludes our first TCP/IP simulation model exercise. In the next tutorial we will experiment with packet losses and TCP over a slightly more complicated network scenario.

Topic FileSenderreceiverOverTCPIPv4 . { Edit | Attach | Ref-By | Printable | Diffs | r1.8 | > | r1.7 | > | r1.6 | More }
Revision r1.8 - 17 Oct 2006 - 03:20 GMT - AhmetSekercioglu
Parents: SimulationWebHome > Tutorials
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.