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