2 Simulation program » History » Version 10

MOURA, Ninon, 03/23/2016 12:23 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 4 MOURA, Ninon
Insertion des lignes de commandes SANS MODEM sur PEP right:
6 1 MERIOCHAUD, Antoine
7 9 MOURA, Ninon
#!/bin/bash
8 10 MOURA, Ninon
9 10 MOURA, Ninon
~~~bash
10 7 MOURA, Ninon
# Remote Terminal: ssh connexion
11 7 MOURA, Ninon
ssh labo@192.168.0.200
12 1 MERIOCHAUD, Antoine
# Super User Connexion 
13 1 MERIOCHAUD, Antoine
sudo su
14 10 MOURA, Ninon
~~~
15 8 MOURA, Ninon
16 3 MOURA, Ninon
# Definition of p5p1 IP adress
17 3 MOURA, Ninon
ifconfig p5p1 192.168.2.2
18 3 MOURA, Ninon
# Definition of p6p1 IP adress
19 3 MOURA, Ninon
ifconfig p5p1 192.168.3.1
20 3 MOURA, Ninon
21 3 MOURA, Ninon
# Add space delay to user interface
22 3 MOURA, Ninon
tc qdisc add dev p5p1 root netem delay 600ms
23 3 MOURA, Ninon
24 3 MOURA, Ninon
# Test connection and delay
25 3 MOURA, Ninon
# from 192.168.2.1 to 192.168.3.1
26 3 MOURA, Ninon
ping 192.168.3.1 -I 192.168.2.1
27 3 MOURA, Ninon
28 3 MOURA, Ninon
# Re-routing rule to in order to use PEPSal
29 3 MOURA, Ninon
iptables -t mangle -A PREROUTING -s 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
30 3 MOURA, Ninon
iptables -t nat -A PREROUTING -s 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000
31 3 MOURA, Ninon
iptables -t mangle -A PREROUTING -d 192.168.3.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
32 3 MOURA, Ninon
iptables -t nat -A PREROUTING -d 192.168.3.1 --proto tcp -j REDIRECT --to-port 5000
33 3 MOURA, Ninon
34 3 MOURA, Ninon
# Display all rules
35 3 MOURA, Ninon
iptables -t mangle -t nat -L
36 3 MOURA, Ninon
37 3 MOURA, Ninon
# Proxy PEPSal
38 1 MERIOCHAUD, Antoine
# pepsal -a 192.168.2.1
39 3 MOURA, Ninon
40 4 MOURA, Ninon
Then a TCP flow is simulated thanks to the iperf command.
41 3 MOURA, Ninon
42 4 MOURA, Ninon
43 1 MERIOCHAUD, Antoine
h4. 2.2. Post processing
44 1 MERIOCHAUD, Antoine
45 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.
46 4 MOURA, Ninon
Command is:
47 4 MOURA, Ninon
tcpdump tcp -w fileName.pcap
48 1 MERIOCHAUD, Antoine
49 4 MOURA, Ninon
# Files transfert from PC engine right to local computer
50 1 MERIOCHAUD, Antoine
scp labo@192.168.0.201:Proj3/*. 
51 4 MOURA, Ninon
52 4 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:
53 4 MOURA, Ninon
- throughput,
54 4 MOURA, Ninon
- sequence number packets,
55 4 MOURA, Ninon
- windows size evolution.
56 3 MOURA, Ninon
57 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.