Unusual ICMP error messages

363 views
Skip to first unread message

Peshal Nayak

unread,
Feb 3, 2015, 9:59:50 PM2/3/15
to ns-3-...@googlegroups.com
Hey guys,

I'm trying to simulate a network with a single AP and single station. The AP sends packets to the station.
In the pcap files (although packets are indeed being sent and received: saw flowmonitor output), I see these occasional ICMP errors saying:
Type: 3 (Destination Unreachable)
Code: 3 (Port Unreachable)

They generally occur after ARP packets are sent and so I believe that there is some problem in finding the station's MAC address.
But since both the station and the AP are static and well within each other's range, why does this error arise? And I can see it many number of times in the pcap file.
In a real network, I'm sure that the MAC address entries can be made static and so I believe that there should be a way of doing the same in ns 3.
However, I'm not able to find any line of code (or template) that works.
For my simulations, I don't want these entries.

Anyone has any idea how this can be done? Any suggestions?
If anyone has tried this already, can you please share the code lines so that I may get a hint.

Tommaso Pecorella

unread,
Feb 4, 2015, 1:41:38 AM2/4/15
to ns-3-...@googlegroups.com
Hi,

make sure that the server (the receiving endopoint) is "open" before sending a packet. These ICMPs usually are a sent when you start the client before the server.

Hope this helps,

T.

Peshal Nayak

unread,
Feb 4, 2015, 3:09:35 PM2/4/15
to ns-3-...@googlegroups.com
Hi Tommaso,

The source and the sink both have a start time. In my code the start time of the source is 30 seconds after the start time of the sink. Is that what you meant by keeping the endpoint open before sending a packet?

But despite doing this, as soon as the source starts transmitting the first entries in the pcap files are a bunch of ICMP error messages again.

Thanks.

Best,
Peshal

Tommaso Pecorella

unread,
Feb 4, 2015, 3:48:01 PM2/4/15
to ns-3-...@googlegroups.com
Hi,

yes, I meant that. And if the port is open, then the ICMPs are quite strange. Unless there's a routing issue, of course. Of course it may be a bug too.
If you can, please attach the simulation script and a pcap.
As usual, make sure to use the latest ns-3, it could be a bug already fixed...

Cheers,

T.

Peshal Nayak

unread,
Feb 5, 2015, 11:26:32 PM2/5/15
to ns-3-...@googlegroups.com
Hi Tommaso,

Thanks for your reply. Please let me know if you find any problems with the code. I've commented the code so that its easier for you to read it. Let me know if something is not clear. For internet stack installation, look at the InstallInternetStack() function declared in the code.
I don't think there is any routing issue. Let me know if you find any. Also, this is a very simple case scenario in which there is a single transmitter and a single receiver and both are static. There are no complications. I don't think there should be any issue with the ns-3 version as this is the most basic simulation code.

The code and pcap file is attached. Please respond as early as possible. I desperately need this simulation for one of my courses.

Thanks.

Best,
Peshal

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/tbmV8rR3_ls/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

wifiv1.cc
wifi-0-0.pcap

Peshal Nayak

unread,
Feb 5, 2015, 11:29:37 PM2/5/15
to ns-3-...@googlegroups.com
Also, I tried using point-to-point instead of wireless. It still creates those ICMP error messages.

Not sure what to do.

Peshal

Tommaso Pecorella

unread,
Feb 6, 2015, 2:44:07 AM2/6/15
to ns-3-...@googlegroups.com
Hi,

your issue may be:
1) a little confusion of what's a port (see http://en.wikipedia.org/wiki/Port_(computer_networking)) - unlikely
2) need of new glasses (perhaps)
3) more sleep (most probably).

ICMP port unreachable is what you get when your app sends packets to port 1025 and sink is open on port 1026.

Of course UDP will keep sending packets and TCP wouldn't open the connection at all.

Cheers,

T.

Peshal Nayak

unread,
Feb 6, 2015, 3:16:00 AM2/6/15
to ns-3-...@googlegroups.com
Hi Tommaso,

Thanks for your reply. That was indeed a stupid mistake!
I'm curious (or maybe still a bit sleep deprived): why does flow monitor show significant throughput even when the port numbers are wrong?

Thanks very much!

Best,
Peshal

Tommaso Pecorella

unread,
Feb 6, 2015, 3:31:14 AM2/6/15
to ns-3-...@googlegroups.com
Hi,

well, UDP is dumb enough to not consider these ICMP errors.
The UDP app sends packets blindly (UDP is connectionless). It could receive the ICMP errors and stop sending, but that's not UDP's responsibility, it's the App that should catch them and act accordingly. In ns-3, apps aren't really that smart.
As a consequence, the apps will keep sending packets, FlowMon will record the flow (there was a flow, indeed) and that's the story.

Cheers,

T.

Peshal Nayak

unread,
Feb 6, 2015, 10:26:23 AM2/6/15
to ns-3-...@googlegroups.com

Thanks very much.

Peshal

Reply all
Reply to author
Forward
0 new messages