2 Simulation program » History » Version 42
MOURA, Ninon, 03/23/2016 10:50 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 | 38 | MOURA, Ninon | Step 1. Configuration of both PC engines. Line commands to configure the PC engines are described in part II.3. |
8 | 1 | MERIOCHAUD, Antoine | |
9 | 42 | MOURA, Ninon | Steps 2 to 4 must be executed in both PC engines. |
10 | 38 | MOURA, Ninon | Step 2. Addition of space delay to user interface and hub interface. |
11 | 1 | MERIOCHAUD, Antoine | @tc qdisc add dev p5p1 root netem delay 300ms @ |
12 | 35 | MOURA, Ninon | |
13 | 39 | MOURA, Ninon | Step 3. Test connection and delay from 192.168.2.1 to 192.168.3.1 |
14 | 35 | MOURA, Ninon | @ping 192.168.3.1 -I 192.168.2.1@ |
15 | 35 | MOURA, Ninon | |
16 | 41 | MOURA, Ninon | Step 4. Definition of gateway to allow the IP forwarding by both modems. |
17 | 41 | MOURA, Ninon | @route add -net 192.168.3.0/24 gw 192.168.2.2@ |
18 | 42 | MOURA, Ninon | This command add a rule in the route table, which define 192.168.2.2 as a gateway to access all network 192.168.3.0/24. |
19 | 41 | MOURA, Ninon | |
20 | 42 | MOURA, Ninon | Step 5 is only executed on remote terminal side, because PEPsal is only deployed on the user side. |
21 | 41 | MOURA, Ninon | 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. |
22 | 35 | MOURA, Ninon | @ |
23 | 1 | MERIOCHAUD, Antoine | iptables -t mangle -A PREROUTING -s 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE |
24 | 24 | MOURA, Ninon | iptables -t nat -A PREROUTING -s 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000 |
25 | 3 | MOURA, Ninon | iptables -t mangle -A PREROUTING -d 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE |
26 | 1 | MERIOCHAUD, Antoine | iptables -t nat -A PREROUTING -d 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000 |
27 | 24 | MOURA, Ninon | @ |
28 | 40 | MOURA, Ninon | 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. |
29 | 24 | MOURA, Ninon | |
30 | 35 | MOURA, Ninon | Display all rules to verify |
31 | 1 | MERIOCHAUD, Antoine | @iptables -t mangle -t nat -L@ |
32 | 26 | MOURA, Ninon | |
33 | 41 | MOURA, Ninon | Step 6. Execution of PEPSal on remote terminal side. |
34 | 24 | MOURA, Ninon | @pepsal -a 192.168.2.1@ |
35 | 1 | MERIOCHAUD, Antoine | |
36 | 4 | MOURA, Ninon | Then a TCP flow is simulated thanks to the iperf command. |
37 | 4 | MOURA, Ninon | |
38 | 4 | MOURA, Ninon | h4. 2.2. Post processing |
39 | 1 | MERIOCHAUD, Antoine | |
40 | 1 | MERIOCHAUD, Antoine | 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. |
41 | 4 | MOURA, Ninon | Command is: |
42 | 35 | MOURA, Ninon | @tcpdump tcp -w fileName.pcap@ |
43 | 31 | MOURA, Ninon | |
44 | 1 | MERIOCHAUD, Antoine | Files transfert from PC engine right to local computer as following: |
45 | 35 | MOURA, Ninon | @ scp labo@192.168.0.201:Proj3/*. @ |
46 | 14 | MOURA, Ninon | |
47 | 38 | MOURA, Ninon | 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: |
48 | 14 | MOURA, Ninon | * throughput, |
49 | 3 | MOURA, Ninon | * sequence number packets, |
50 | 1 | MERIOCHAUD, Antoine | * windows size evolution. |
51 | 1 | MERIOCHAUD, Antoine | |
52 | 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. |