UDP broadcast and NAT

Hello,

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

Reply to
Robert Dodier
Loading thread data ...

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
Reply to
Ansgar -59cobalt- Wiechers

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.

Reply to
Walter Roberson

Hello Robert,

Broadcasts are subnet local traffic.

Reply to
Helge Olav Helgesen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.