| 1 |
To execute the ns emulation code |
| 2 |
make nse |
| 3 |
Run scripts as root. |
| 4 |
|
| 5 |
To originate a TCP connection from ns we need two machines. |
| 6 |
To use tcpemu.tcl perform the following steps: |
| 7 |
- Perform the following steps on machine A |
| 8 |
- Add a route to a dummy IP address assigned to ns TCP node using |
| 9 |
route add dummy_IP IP_where_nse_is_running |
| 10 |
- Disable IP redirects using |
| 11 |
sysctl -w net.inet.ip.redirect=0 |
| 12 |
- start a tcp server application on some machine A |
| 13 |
( TCP Application provided at www-scf.usc.edu/~alefiyah/application/tcp-server.tar.gz ) |
| 14 |
|
| 15 |
-Perform following steps on machine B |
| 16 |
- Disable IP forwarding using |
| 17 |
sysctl -w net.inet.ip.forwarding=0 |
| 18 |
- Configure tcpemu.tcl with address and port for TCP server application |
| 19 |
- run "nse tcpemu.tcl" |
| 20 |
|
| 21 |
To pass traffic through ns, we need three machines |
| 22 |
Machine A with start a TCP connection with Machine B via machine C which has nse running. |
| 23 |
To use thrutcp.tcl perform the following steps: |
| 24 |
- Perform following steps on machine A and machine B |
| 25 |
- Disable IP redirects |
| 26 |
- Disable IP forwarding |
| 27 |
|
| 28 |
- On machine A, add route to machine B via machine C |
| 29 |
route add B_IP C_IP |
| 30 |
|
| 31 |
- On machine B, add route to machine A via machine C |
| 32 |
route add A_IP C_IP |
| 33 |
|
| 34 |
- Configure the correct filters in thrutcp.tcl |
| 35 |
- run "nse thrutcp.tcl |
| 36 |
- Start any TCP application ( ie: ftp or rcp) between machines A and B |