2. Simulation program¶
2.1. Simulation¶
First simulation has been run without modems.
Step 1. Configuration the network architecture (IP addresses and routes). Command lines are described in part II.3.
Step 2. Addition of space delay to PEP interface. This has to be done also on the hub interface.tc qdisc add dev p5p1 root netem delay 300ms
Step 3. Test connection and delay from 192.168.2.1 to 192.168.3.3ping -I 192.168.2.1 192.168.3.2
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.iptables -t mangle -A PREROUTING -s 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
iptables -t mangle -A PREROUTING -d 192.168.2.1 --proto tcp --tcp-flags ALL SYN -j QUEUE
iptables -t nat -A PREROUTING -s 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000
iptables -t nat -A PREROUTING -d 192.168.2.1 --proto tcp -j REDIRECT --to-port 5000
Table mangle is used to identify packets to be transfered and table nat is used to determine where packets must be forwarded.
Display all rules to verifyiptables -t mangle -t nat -L
Step 5. Execution of PEPSal.pepsal
(add -d if you want to run on daemon mode)
Then a TCP flow is simulated thanks to the iperf command.
2.2. Post processing¶
In order to get information on TCP packets, tcpdump commmand is executed on the remote terminal. Data are collected in a .pcap file.
Command is:tcpdump -i p5p1 tcp -w fileName.pcap
Files transfer from PC engine to local computer is done as following:scp labo@192.168.0.200:home/labo/fileName.pcap home/labo/Proj3
- evolution of sequence number
- throughput
- windows size evolution
- RTT
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.