Peculiar case of V4Ping

20 views
Skip to first unread message

Hessam Alizadeh

unread,
Jul 3, 2020, 3:06:49 AM7/3/20
to ns-3-users
I see this rather weird behavior with V4Ping application that I can't explain. the  Here's the scenario:
  1. Connected two nodes by PointToPointHelper (like the regular examples)
  2. Set up IP addresses. The two nodes have different network addresses (10.1.1.3 and 10.1.2.15)
  3. Installed the V4Ping on the node with 10.1.1.3, and started pinging 10.1.2.15.
  4. EnablePcapAll on the PointToPointHelper
pcap file is empty after running this..
If I use a remote IP on the same network as the sender's IP (10.1.1.x), then the pcap file is filled with entries. Ping requests are sent (and response is saved if an existing IP is pinged).
However, if the remote IP is not on the same network as the sender's, then pcap is empty.

I tried all the above variations with Ipv4GlobalRoutingHelper::PopulateRoutingTables();. Having all routing tables populated, packets are saved into the pcap. I can see the requests sent (and responses as well if an existing IP is pinged) in the pcap file.

Why is this? Am I doing anything wrong?

Chengjun Jia

unread,
Jul 9, 2020, 10:25:48 PM7/9/20
to ns-3-users
I guess that it is about the IPv4 protocol standard.

If two devices are connected under the same subnet when you configure the netdevice,  they can comunicate directly (they know that they are neighbours). For example, A(10.1.1.3, 255.255.255.0) can directly communicate with B(10.1.1.4, 255.255.255.0). However, if A wants to communicate with C(10.1.2.15, 255.255.255.0), A must know how to reach C.  If you do not run ' Ipv4GlobalRoutingHelper::PopulateRoutingTables()',  A will have no idea about  how to reach C and may directly drop the ICMP packet.


Best wishes

Jake
Reply all
Reply to author
Forward
0 new messages