2 Simulation program » History » Version 47

MERIOCHAUD, Antoine, 03/23/2016 11:41 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 47 MERIOCHAUD, Antoine
First simulation has been run without modems. 
6 1 MERIOCHAUD, Antoine
7 47 MERIOCHAUD, Antoine
Step 1. Configuration the network architecture (IP addresses and routes). Command lines are described in part II.3.
8 42 MOURA, Ninon
9 47 MERIOCHAUD, Antoine
Step 2. Addition of space delay to PEP interface. This has to be done also on the hub interface.
10 47 MERIOCHAUD, Antoine
@tc qdisc add dev p5p1 root netem delay 300ms@
11 35 MOURA, Ninon
12 47 MERIOCHAUD, Antoine
Step 3. Test connection and delay from 192.168.2.1 to 192.168.3.3
13 47 MERIOCHAUD, Antoine
@ping -I 192.168.2.1 192.168.3.2@
14 41 MOURA, Ninon
15 47 MERIOCHAUD, Antoine
Step 4. Implementation of routing rules in order to use PEPSal. Indeed PEPSal uses port 5000, consequently TCP flow must be redirected on this port. This step has to be executed on the PEP.
16 44 MOURA, Ninon
@iptables -t mangle -A PREROUTING -s 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
17 1 MERIOCHAUD, Antoine
iptables -t mangle -A PREROUTING -d 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
18 47 MERIOCHAUD, Antoine
iptables -t nat -A PREROUTING -s 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000
19 1 MERIOCHAUD, Antoine
iptables -t nat -A PREROUTING -d 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000@
20 47 MERIOCHAUD, Antoine
Table mangle is used to identify packets to be transfered and table nat is used to determine where packets must be forwarded.
21 1 MERIOCHAUD, Antoine
22 1 MERIOCHAUD, Antoine
Display all rules to verify
23 1 MERIOCHAUD, Antoine
@iptables -t mangle -t nat -L@
24 1 MERIOCHAUD, Antoine
25 47 MERIOCHAUD, Antoine
Step 5. Execution of PEPSal.
26 47 MERIOCHAUD, Antoine
@pepsal@ (add -d if you want to run on daemon mode)
27 24 MOURA, Ninon
28 1 MERIOCHAUD, Antoine
Then a TCP flow is simulated thanks to the iperf command.
29 4 MOURA, Ninon
30 4 MOURA, Ninon
h4. 2.2. Post processing
31 4 MOURA, Ninon
32 47 MERIOCHAUD, Antoine
In order to get information on TCP packets, tcpdump commmand is executed on the remote terminal. Data are collected in a .pcap file.
33 1 MERIOCHAUD, Antoine
Command is:
34 47 MERIOCHAUD, Antoine
@tcpdump -i p5p1 tcp -w fileName.pcap@
35 35 MOURA, Ninon
36 47 MERIOCHAUD, Antoine
Files transfer from PC engine to local computer is done as following:
37 47 MERIOCHAUD, Antoine
@scp labo@192.168.0.200:home/labo/fileName.pcap home/labo/Proj3 @
38 35 MOURA, Ninon
39 47 MERIOCHAUD, Antoine
The file generated by tcpdump command is compatible with Wireshark. Wireshark is a free network protocol analyzer. It lets you see what is happening on your network at a microscopic level. Thanks to this tool, we can compare with and without PEPSal :
40 47 MERIOCHAUD, Antoine
* evolution of sequence number
41 47 MERIOCHAUD, Antoine
* throughput
42 47 MERIOCHAUD, Antoine
* windows size evolution
43 47 MERIOCHAUD, Antoine
* RTT
44 1 MERIOCHAUD, Antoine
45 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.