lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Sending to broadcast address 192.168.2.255


From: David Empson
Subject: Re: [lwip-users] Sending to broadcast address 192.168.2.255
Date: Thu, 26 Aug 2010 10:17:36 +1200


----- Original Message ----- From: "Marco Jakobs" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Thursday, August 26, 2010 8:04 AM
Subject: Re: [lwip-users] Sending to broadcast address 192.168.2.255


Hi Kieran,

my netmask is a bit more extended, it's set to 255.255.240.0 as the PC's are in a different subnet and they must be able to access the devices by telnet, web and TFTP. So the decision for a broadcast is determined by the netmask and an octet of "255" and the end does not mean a broadcast to the subnet?

No. To broadcast to the subnet, your address must contain 1s in all bits corresponding to 0 bits in the subnet mask, and match the network address in all bits corresponding to 1 bits in the subnet mask.

In this case your subnet mask is 255.255.240.0, so your network is 192.168.0/20 using CIDR notation (20 bit network, 12 bit machine).

All addresses from 192.168.0.1 through 192.168.15.254 are specific machine addresses within your network, including 192.168.2.255. You cannot broadcast to part of the subnet, only the entire subnet. The correct subnet broadcast address in this case would be 192.168.15.255.

Every machine involved in the subnet must be using the same subnet mask in order to correctly interpret the subnet broadcast address.

The broadcast packets i've seen on the PC with the same netmask were caused by a different behaviour of windows: It also ARPs (i've not seen this in the previous trace), and then send it as a broadcast after the ARPs timed out. Not that good idea for LwIP as the packets must all be buffered until the ARP has timed out ...

Was the PC trying to broadcast on 192.168.2.255 or 192.168.15.255?

So i've changed it back to a general broadcast in my project ;-)

That's certainly easier.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]