[En-Nut-Discussion] Subnetmask confusion

Michael Jones Michael.e.Jones at web.de
Wed Nov 1 10:05:49 CET 2006


In this case check the subnetmask of the sending computer. If it is also
255.255.255.0 it will be sending the broadcasts to the gateway which might
or might not send them on.

The rule with netmask is:

   if( RemoteIp != 0xFFFFFFFF
   && (RemoteIp & mask) != (LocalIp & mask))
      send via Gateway
   else
      send locally

So once the message is sent to the gateway the message is lost to the local
network unless your gateway resends it into it, which is not very likely. 

Because of the above rule broadcasts don't work very well in large modern
network installations that use Level 3 routers (e.g. Cisco catalyst). Unlike
switches (level 2) which simply relays all (broadcast) traffic and therefore
allows you to hear and send messages across netmasks, Level 3 routers must
be accessed as gateways to bridge netmask boundaries.  

Cu,
Michael

-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of
EnNut at thezachariasgroup.com
Sent: Wednesday, November 01, 2006 6:58 AM
To: en-nut-discussion at egnite.de
Subject: [En-Nut-Discussion] Subnetmask confusion

Here is the situation:
The Ethernut Board Address is 192.168.1.90
The subnetmask is 255.255.255.0
The port Ethernut is listening on is 0x8022.
I'm sending a UDP broadcast message from a .NET C# program expecting 
the Ethernut Board to receive it.

Ethernut will receive a UDP packet directed to port 0x8022 on IP 
addresses 192.168.1.90 or 192.168.1.255 but not 192.168.255.255. Why?


   Thanks!
    Zack 

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion





More information about the En-Nut-Discussion mailing list