It's my understanding that UDP broadcast messages are never transmitted across NAT. Can someone tell me if that is correct? Or, if it is possible, under what circumstances.
I am considering putting together some code which broadcasts messages. I'm trying to avoid broadcasting outside of the local network; I don't want to generate unneeded traffic.
Sorry for this simple-minded question. Any light you can shed on this topic is much appreciated.
Robert Dodier
Didn't find your answer? Ask the community — no account required.
A
Ansgar -59cobalt- Wiechers
A broadcast is directed to all hosts on the same subnet, whereas packets traversing a NATing device are directed to one or more hosts in some other network(s), which are by definition not on the same subnet. Thus the target of a broadcast can never be on the remote side of a NAT device.
cu
59cobalt
W
Walter Roberson
Some NAT devices (-possibly- most above the consumer level) allow destination address translation, in which an inside device addresses a packet to one IP and the NAT device accepts the packet and rewrites the destination -- perhaps as a different internal destination, but more likely as a different external (or DMZ) destination. (The more common function of NAT is to rewrite the *source* addresses as the packets go from a protected zone to a less protected zone.)
If one of the addresses that is to be rewritten falls within the subnet of the broadcast, then there is a logical or semantic question about whether the broadcast packet should be forwarded to the aliased address. In this situation, as far as the -source- is concerned, the destination is on the same subnet, so the
-source- is expecting the broadcast to reach the destination (in the usual unreliable "best efforts" UDP manor). But if the destination is really somewhere else, then what "should" happen is probably more a matter of context than of technology. There being, of course, sometimes quite a large gap between what "should' happen and what -can- technically happen.
H
Helge Olav Helgesen
Hello Robert,
Broadcasts are subnet local traffic.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.