Running fd-emu-ping.cc with the wireless interface

42 views
Skip to first unread message

Mohamed Bouti

unread,
Jun 13, 2023, 5:35:44 AM6/13/23
to ns-3-...@googlegroups.com
Help !!🙏🙏🙏

Hello,👏👏

I hope everyone is doing well, i'm trying to use ns3 in emulation environment so i found this example called fd-emu-ping.cc that can make a ns3 node ping a real host in order to use it i tried to run the ping worked correctly with ethernet cable, so i tried to use it with the wireless interface with the same gateway, i changed the daresse of the host ,the remot and the gateway with the real ones however ones i run it the ping didn't reach the other host
 
PING 192.168.1.19 - 56 bytes of data; 84 bytes including ICMP and IPv4 headers.

--- 192.168.1.19 ping statistics ---
21 packets transmitted, 0 received, 100% packet loss, time 21000ms

Since I'm new to NS3 I hope you can help me to understand how I can make it work with the wireless interface as it did work with the ethernet one.
Or if you know some examples that did something similar that would be great!
you can find below the code.

Best regards🙏

fd-emu-ping.cc

Mohamed Bouti

unread,
Jun 13, 2023, 9:56:08 AM6/13/23
to ns-3-...@googlegroups.com
fd-emu-ping.cc

Tom Henderson

unread,
Jun 13, 2023, 11:04:40 AM6/13/23
to ns-3-...@googlegroups.com, Mohamed Bouti
I do not know offhand but you should try to use tcpdump on both ends of
the connection (if you can) to determine where packets are being lost or
not received. Do the ICMP echo request packets get sent? Are they
received and do they result in an ICMP echo reply being sent? Is the
echo reply visible in tcpdump output on that wireless interface, but not
in ns-3? Understanding where the packets are lost may give a clue as to
what is wrong.

- Tom
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ns-3-users/CAH-KihfM-39x6524Ve2%2BFTYy%2BKvtmos5qAKD0vzs1VPh2pKHkg%40mail.gmail.com <https://groups.google.com/d/msgid/ns-3-users/CAH-KihfM-39x6524Ve2%2BFTYy%2BKvtmos5qAKD0vzs1VPh2pKHkg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Mohamed Bouti

unread,
Jun 14, 2023, 8:04:07 AM6/14/23
to Tom Henderson, ns-3-...@googlegroups.com
Thank you very much for your response Tom, it did help me to see if the packets are reaching the gateway or not .

Actually I used tcpdump on both ends and I run the code when I am using ethernet cable I can clearly see the source and destination.

Then I used one ethernet cable between the node in host 1(source) and the gateway then a wireless connection between host 2 (destination) and  the gateway. This time the ping worked correctly, so I'm starting to think that the NS3 node when I change the interface name and address to a wireless one may not work the same as it does with the ethernet.
PS: the code was made to work with the ethernet interface. I'm trying to make the NS3 node do the same (ping application) over wifi. 
I really want to confirm with you if this approach is possible and if I need to make some changes in the code to make it work with wifi interface! 

Thank you in advance for your help. I very much appreciate it!

 
Best regards.
Reply all
Reply to author
Forward
0 new messages