tags:

views:

35

answers:

1

I'm writing service in python that async ping domains. So it must be able to ping many ip's at the same time. I wrote it on epoll ioloop, but have problem with packets loss. When there are many simultaneous ICMP requests much part of replies on them didn't reach my servise. What may cause this situation and how i can make my service ping many hosts at the same time without packet loss?

Thanks)

A: 

A problem you might be having is due to the fact that ICMP is layer 3 of the OSI model and does not use a port for communication. In short, ICMP isn't really designed for this. The desired behavior is still possible but perhaps the IP Stack you are using is getting in the way and if this is on a Windows system then 100% sure this is your problem. I would fire up Wireshark to make sure you are actually getting incoming packets, if this is the case then I would use libpcap to track in ICMP replies. If the problem is with sending then you'll have to use raw sockets and build your own ICMP packets.

Rook
I'm writing this in python on CentOs.And i'm using raw sockets to work with ICMP protocol.I sniffed packet.. and now can say that they real lost somewhere on the net. Can i solve this without setting timeouts.. or i haven't another way?thanks for fast answer))
Creotiv
Problem was on up level system that have ICMP sharper for all server with 100kBytes. When we moved to server with personal channel problem disappear
Creotiv