In TCP/IP networks, the broadcast address is used to talk to all machines on the network. If you aren't on a switched network (if you are still using hubs), all machines actually see every packet; they just ignore packets that aren't tagged with their address.
The broadcast is (nowadays anyway) an address with the host portion set to all 1's. For a 192.168.2 network, that would be 192.168.2.255. On old BSD machines, the broadcast was 0 instead, but that's pretty much gone now.
The broadcast is critical for two reasons: establishing initial communications with another host, and for dhcp and the like assignments of ip addresses. In the first case, it's necessary because your packets need to have the low-level MAC address to send packets to a machine on your local network. (the only place you really ever send anything is locally; a local router or gateway may send them on somewhere else, but your communication is always local). You have an ip address, possibly obtained from querying a DNS server, but you don't yet have the MAC address that belongs to. So you broadcast a packet that effectively asks "who the heck has been assigned ip address 192.168.2.39?". Every machine on the network picks up that packet and the one that is 192.168.2.39 will respond to you ( both your MAC and IP addresses are in the packet you sent).
DHCP is the opposite, but very similar. A machine without an ip address broadcasts looking for one. Most machines will just ignore that, but a server may respond with "Sure, I could give you an address". The dance between the two machines is a little more complicated than I've let on here: the server has to broadcast its answer too, because until the client actually has an ip address, that's the only way to talk to it..
At one time, it was common for machines to respond to broadcast pings: ping 192.168.2.255, for example. That was a quickk and easy way to find out what machines were alive. Most systems nowadays ignore broadcast pings as that was an obvious DOS (denial of service) attack if misused.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-05 Tony Lawrence