Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A host sends UDP broadcast, but its UDP packets are not received by any other hosts in the same subnet. However, its TCP traffic with others hosts are OK. I observed this using tcpdump.

Could it be related with the small buffer size? This host's maximum buffer size is just 131k. Its UDP traffic is pretty low.

share|improve this question
3  
When you say "are not received", what does that mean? Do you mean a listening application doesn't receive them? Do you mean a raw packet dumping tool looking at the interface doesn't see them? Or something else? –  David Schwartz Apr 11 '13 at 19:10
    
I believe there are special conditions for broadcasting to work properly. If you are in the 192.168.0.0/24 subnet and you send a datagram packet to 192.168.0.255 all other machines in the Network will receive it, but by default every packet that is not specifically addressed to your machine is dropped. Thats why you can't ping 192.168.0.255 for instance, nobody will answer. I have no experience in this topic, but maybe when you bind() your socket to listen to a port you should set some flags or set the address to listen as 192.168.0.255. –  Havenard Apr 11 '13 at 20:13
    
Turn off the firewall momentarily and try again. Does the broadcast work? iptables often has separate entries for TCP and UDP traffic. –  Stefan Lasiewski Apr 11 '13 at 20:22
    
@Stefan broadcast did not work. I will check the iptables. Thanks, –  Max Fan Apr 17 '13 at 2:54
add comment

1 Answer

How many packets are lost? If it's only a few its worth remembering that UDP does not provide a guarantee of delivery, ordering or duplication protection. All error detection and correction will need to be done in the Application Layer.

If you're not receiving any packets at all you should look for an intermediary device or the hosts firewall that is filtering the packets out. Some less sophisticated IDS systems will interrupt bursts of UDP broadcast traffic as a Denial of Service attack.

share|improve this answer
    
It's the same subnet. I will check firewall. Thanks, –  Max Fan Apr 17 '13 at 3:04
    
@MaxFan - Do you lose all the packets? Or just a few? –  kce Apr 17 '13 at 16:09
    
all actually, at least to the ports I examined... –  Max Fan Apr 17 '13 at 19:42
    
@MaxFan - It's probably a firewall then. –  kce Apr 17 '13 at 21:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.