0

I am new to networking. I have a small doubt. I am sending an alarm using SNMP to a target, but the alarm is not received at the target within the specified amount of time. I feel that the data may be lost or dropped.

Now my question is : on what basis should I conclude that there is a loss or drop? Or will there be any other reason for the trap not to be received?

k1eran
  • 3,293
  • 3
  • 38
  • 60
user3913114
  • 75
  • 2
  • 10
  • You don't. UDP is an protocol that directly exposes the unreliability of the network and therefore doesn't guarantee successful transmission of any datagram, sequence or even acknowledgement of reception - all that would be what TCP is for. – Lukas Graf Jan 07 '15 at 10:43
  • You might want to read up on [UDP vs TCP](http://www.skullbox.net/tcpudp.php) – Benjamin Diele Jan 07 '15 at 10:44
  • thank you for the reply.I asked this because if the data is dropped, i can see a message saying that packet is dropped(In my log file generated).Now, I have not received that alarm on the target and that value of dropped is =0. so am thinking that their may be packet loss and not drop. But i want a proof to conclude. – user3913114 Jan 07 '15 at 10:59
  • 1
    This question may help explain why UDP is suitable for SNMP : http://stackoverflow.com/questions/3565975/why-is-snmp-usually-run-over-udp-and-not-tcp-ip – k1eran Jan 07 '15 at 12:27
  • 1
    If you want reliable delivery of alarms, perhaps you can look into SNMP Inform messages, which provide a kind of delivery receipt functionality even when using UDP. – Jolta Jan 08 '15 at 01:23

1 Answers1

0

If I assume your definition of "lost" means one of the network equipment (switch, firewall, ...) didn't forward it to the next hop, and "dropped" means your network board didn't deliver it to your application (e.g. input buffer full, ...).

Under those assumptions, you have no way to know, in your application, that the packet has been "lost" or "dropped". If you want to be sure, you can install network sniffer such as Wireshark on your computer to make sure your packet is delivered (but maybe not processed by your application), or configure your network appliance (if you can) to log packets dropping (meaning "loss" accross the network).

Matthieu
  • 2,529
  • 4
  • 49
  • 80