Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
update fd-tap-ping.cc instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alina Quereilhac committed Jun 15, 2014
1 parent 14ee321 commit e6fc8c2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/fd-net-device/examples/fd-tap-ping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@
// | 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.
// For this you need to provide the network address to allocate IP addresses
// 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
Expand Down

0 comments on commit e6fc8c2

Please sign in to comment.