2 Simulation program » History » Version 44

« Previous - Version 44/47 (diff) - Next » - Current version
MOURA, Ninon, 03/23/2016 10:53 AM

2. Simulation program

2.1. Simulation

First simulation as been run without modem. Steps 1 to 4 must be executed in both PC engines. Commands are explicites only on one side, source and destination must be updated if one wants to use it on the other side.

Step 1. Configuration of both PC engines. Line commands to configure the PC engines are described in part II.3.

Step 2. Addition of space delay to user interface and hub interface.
tc qdisc add dev p5p1 root netem delay 300ms

Step 3. Test connection and delay from to
ping -I

Step 4. Definition of gateway to allow the IP forwarding by both modems.
route add -net gw
This command add a rule in the route table, which define as a gateway to access all network

Step 5 is only executed on remote terminal side, because PEPsal is only deployed on the user side.
Step 5. Implementation of routing rules in order to use PEPSal. Indeed PEPSal uses port 5000, consequently TCP flow must be redirected on this port.
iptables -t mangle -A PREROUTING -s --proto tcp --tcp-flags ALL SYN -j QUEUE
iptables -t nat -A PREROUTING -s --proto tcp -j REDIRECT --to-port 5000
iptables -t mangle -A PREROUTING -d --proto tcp --tcp-flags ALL SYN -j QUEUE
iptables -t nat -A PREROUTING -d --proto tcp -j REDIRECT --to-port 5000

PREROUTING chain is used because packets are redirected in a local machine. Table mangle is used to identify packets to be transfered and table nat is used to determine where packets must be forwarded.

Display all rules to verify
iptables -t mangle -t nat -L

Step 6. Execution of PEPSal on remote terminal side.
pepsal -a

Then a TCP flow is simulated thanks to the iperf command.

2.2. Post processing

In order to get information on TCP packets, the tcpdump commmand is executed. The save option is run and data are collected in a file.pcap.
Command is:
tcpdump tcp -w fileName.pcap

Files transfert from PC engine right to local computer as following:
scp labo@*.

The file generated by tcpdump command is compatible with wireshark. Wireshark is a free network protocol analyzer. It lets you see what's happening on your network at a microscopic level. Thanks to this tool, we could compare with and without PEPSal:
  • throughput,
  • sequence number packets,
  • windows size evolution.

Tests in terms of quality of usage, such as download a web browser, were planed. However due to difficulties in network configuration, those tests will not be run.