2 Simulation program » History » Version 26

MOURA, Ninon, 03/23/2016 12:57 AM

1 2 MERIOCHAUD, Antoine
h3. 2. Simulation program
2 1 MERIOCHAUD, Antoine
3 2 MERIOCHAUD, Antoine
h4. 2.1. Simulation
4 1 MERIOCHAUD, Antoine
5 25 MOURA, Ninon
Fisrt simulation as been run without modem.
6 1 MERIOCHAUD, Antoine
7 25 MOURA, Ninon
Line commands on PEP-right are described hereafter, note that commands for PEP-left are similar.
8 24 MOURA, Ninon
9 26 MOURA, Ninon
# Connexion in SSH to remote terminal.
10 1 MERIOCHAUD, Antoine
~
11 1 MERIOCHAUD, Antoine
ssh labo@192.168.0.200
12 24 MOURA, Ninon
~
13 24 MOURA, Ninon
14 26 MOURA, Ninon
# Connexion in PEP-right as super user
15 24 MOURA, Ninon
~
16 1 MERIOCHAUD, Antoine
sudo su
17 1 MERIOCHAUD, Antoine
~
18 24 MOURA, Ninon
19 26 MOURA, Ninon
# Definition of IP adresses of interfaces
20 24 MOURA, Ninon
~
21 1 MERIOCHAUD, Antoine
ifconfig p5p1 192.168.2.2
22 26 MOURA, Ninon
ifconfig p6p1 192.168.3.1
23 24 MOURA, Ninon
~
24 1 MERIOCHAUD, Antoine
25 26 MOURA, Ninon
# Addition of space delay to user interface (p5p1)
26 24 MOURA, Ninon
~
27 26 MOURA, Ninon
tc qdisc add dev p5p1 root netem delay 600ms
28 1 MERIOCHAUD, Antoine
~
29 24 MOURA, Ninon
30 26 MOURA, Ninon
# Test connection and delay from 192.168.2.1 to 192.168.3.1
31 1 MERIOCHAUD, Antoine
~
32 26 MOURA, Ninon
ping 192.168.3.1 -I 192.168.2.1
33 3 MOURA, Ninon
~
34 1 MERIOCHAUD, Antoine
35 26 MOURA, Ninon
# Implementation of routing rules in order to use PEPSal. Indeed PEPSal uses port 5000, consequently TCP flow must be redirected on this port.
36 1 MERIOCHAUD, Antoine
~
37 24 MOURA, Ninon
iptables -t mangle -A PREROUTING -s 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
38 1 MERIOCHAUD, Antoine
iptables -t nat -A PREROUTING -s 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000
39 1 MERIOCHAUD, Antoine
iptables -t mangle -A PREROUTING -d 192.168.3.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
40 1 MERIOCHAUD, Antoine
iptables -t nat -A PREROUTING -d 192.168.3.1 --proto tcp -j REDIRECT --to-port 5000
41 3 MOURA, Ninon
~
42 24 MOURA, Ninon
43 26 MOURA, Ninon
Display all rules to verify
44 24 MOURA, Ninon
~
45 24 MOURA, Ninon
iptables -t mangle -t nat -L
46 3 MOURA, Ninon
~
47 26 MOURA, Ninon
48 26 MOURA, Ninon
# Execution of PEPSal on port 
49 24 MOURA, Ninon
~
50 24 MOURA, Ninon
pepsal -a 192.168.2.1
51 24 MOURA, Ninon
~
52 3 MOURA, Ninon
53 4 MOURA, Ninon
Then a TCP flow is simulated thanks to the iperf command.
54 1 MERIOCHAUD, Antoine
55 1 MERIOCHAUD, Antoine
56 4 MOURA, Ninon
h4. 2.2. Post processing
57 4 MOURA, Ninon
58 4 MOURA, Ninon
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.
59 1 MERIOCHAUD, Antoine
Command is:
60 4 MOURA, Ninon
tcpdump tcp -w fileName.pcap
61 1 MERIOCHAUD, Antoine
62 4 MOURA, Ninon
# Files transfert from PC engine right to local computer
63 4 MOURA, Ninon
scp labo@192.168.0.201:Proj3/*. 
64 14 MOURA, Ninon
65 14 MOURA, Ninon
The file generated by tcpdump command is compatibile 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:
66 14 MOURA, Ninon
* throughput,
67 3 MOURA, Ninon
* sequence number packets,
68 1 MERIOCHAUD, Antoine
* windows size evolution.
69 1 MERIOCHAUD, Antoine
70 1 MERIOCHAUD, Antoine
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.