update fd-tap-ping.cc instructions ns-3.20
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 15 Jun 2014 08:54:48 -0700
changeset 10813 da0eb48df23f
parent 10812 26cf5449be0a
child 10814 b5d041efdcef
update fd-tap-ping.cc instructions
src/fd-net-device/examples/fd-tap-ping.cc
--- a/src/fd-net-device/examples/fd-tap-ping.cc	Thu Jun 12 12:36:44 2014 -0700
+++ b/src/fd-net-device/examples/fd-tap-ping.cc	Sun Jun 15 08:54:48 2014 -0700
@@ -37,9 +37,9 @@
 //   |       1.2.3.4                 |     |
 //   +-------------------------------|-----+ 
 //                                   |
-//                                   |
-//                                   ------------ (Internet) -----                             
-//
+//                                   |                             +-------------+
+//                                   ------------ (Internet) ----- | Remote host |                            
+//                                                                 +-------------+
 //
 // To use this example:
 //  1) ns-3 will create the TAP device for you in the host machine.
@@ -47,15 +47,15 @@
 //     for the TAP device and the ns-3 FdNetDevice.
 //
 //  2) Take into consideration that this experiment requires the host to be able
-//     to forward the traffic generated by the simulation to the Internet.
+//     to forward traffic generated by the simulation to the Internet.
 //     So for Linux systems, make sure to configure:
 //     # echo 1 > /proc/sys/net/ipv4/ip_forward
 //
-//     Also enable natting so the traffic sent on the Internet are able to 
-//     reach back the TAP. 
+//     Also enable natting so the ICMP replys from the remote host can reach 
+//     back the TAP. 
 //     - TAP-network-address is the same as 'tapNetwork'
-//     - net-device-ip is be the IP address of the network device connected to the internet
-//     # iptables -t nat -A POSTROUTING -s <TAP-network-addres>/24 -j SNAT --to-source <net-device-ip>
+//     - TAP-network-mask is the same as 'tapMask'
+//     # iptables -t nat -A POSTROUTING -s <TAP-network-address>/<TAP-network-mask> -j MASQUERADE
 //
 //  3) Before running the example make sure that the tap creator binary has root suid.
 //     If the --enable-sudo option was used to configure ns-3 with waf, then the following