UDP broadcast and NAT
am 26.10.2006 19:00:19 von Robert Dodier
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
Re: UDP broadcast and NAT
am 26.10.2006 19:17:58 von Ansgar -59cobalt- Wiechers
Robert Dodier wrote:
> It's my understanding that UDP broadcast messages are never
> transmitted across NAT. Can someone tell me if that is correct?
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
--
"If a software developer ever believes a rootkit is a necessary part of
their architecture they should go back and re-architect their solution."
--Mark Russinovich
Re: UDP broadcast and NAT
am 26.10.2006 19:50:56 von roberson
In article <4qc8u6Fmffe0U1@individual.net>,
Ansgar -59cobalt- Wiechers wrote:
>Robert Dodier wrote:
>> It's my understanding that UDP broadcast messages are never
>> transmitted across NAT. Can someone tell me if that is correct?
>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.
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.