[collectd] Collectd opens UDP port

Enrico Tröger enrico.troeger at uvena.de
Sat Oct 9 16:03:28 CEST 2010


On Fri, 8 Oct 2010 23:24:18 +1100, Amos wrote:

>2010/10/8 Enrico Tröger <enrico.troeger at uvena.de>
>>
>> On Sun, 3 Oct 2010 06:41:14 +1000, Amos wrote:
>>
>> >That's the way UDP works.
>>
>> Thanks so far.
>> But could you be so kind to explain it a little further?
>> I'm not that familiar with UDP and don't see why the clients need to
>> open a listening UDP port to send data to the server.
>
>(Sorry, my previous reply was written on my mobile so it was short).
>
>For a reference, read a little about the UDP protocol -
>http://en.wikipedia.org/wiki/User_Datagram_Protocol
>
>Basically, the packet format calls for a "source port" which must be
>filled with a legitimate value. "man 7 udp" says:
>"In order to receive packets, the socket can be bound to a local
>address first by using bind(2).
>Otherwise the socket layer will automatically assign a free local port
>out of the range defined by
>/proc/sys/net/ipv4/ip_local_port_range and bind the socket to
>INADDR_ANY."
>
>I assume this happens when the first message is sent, if no port was
>assigned yet.
>
>So even if in this particular case there is only one-way traffic, the
>sender must have a port assigned to it.
>
>Hope this answers your question.

It does.
Thank you and Manuel for the information.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20101009/2ee6854d/attachment.pgp>


More information about the collectd mailing list