APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

broadcast address

© October 2003 Tony Lawrence

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 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". Every machine on the network picks up that packet and the one that is 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, 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.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> broadcast address

Inexpensive and informative Apple related e-books:

Take Control of Upgrading to El Capitan

Take Control of iCloud

Take Control of iCloud, Fifth Edition

Photos: A Take Control Crash Course

Sierra: A Take Control Crash Course

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

Two years from now, spam will be solved. (Bill Gates, 2004)

Linux posts

Troubleshooting posts

This post tagged:



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode