May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
System Design Masterclass · Load Balancing Proxies
Free preview: the first 2 parts of this 9-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$35 once, by card or PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$35 once, by card or PayPal
See the System Design coursein Load Balancing Proxies
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
Here is a problem with no obvious solution. A laptop joins a network. To send a message to anybody, it needs their address. To get an address of its own, it needs to ask a server. To ask the server, it needs the server's address.
It has none of these. It has not been told anything at all.
Broadcast is the answer, and it is the only answer: send a message addressed to everybody, on the assumption that whoever can help will notice. Every machine on the local network receives it, almost all of them ignore it, and one of them replies.
That sounds wasteful and it is. It is also the mechanism holding up the bottom of every network you have ever used, and it is worth understanding properly rather than as an analogy, because two of the failures it causes look identical and are not.

The cost of broadcast is not the . One small frame is nothing. The cost is that every machine's network card accepts it and every machine's kernel has to decide what to do with it.
That is a tiny interrupt per host per frame, which is nothing at all until there are several thousand hosts.
You will often see "the broadcast address is the last address in the subnet". That is true, and it is a rule to memorise rather than something to understand. It is actually arithmetic, and doing it once removes the need to remember it ever again.

The mask says how many leading bits are the network part. AND the address with the mask and the host bits go to zero, which is the network itself. OR it with the inverted mask and the host bits go to one, which is the broadcast.
Both of those addresses are reserved, which is why a /24 holds 254 usable hosts rather than 256.
That arithmetic is not a claim. It can be checked on any machine in about twenty seconds.

Everything below the first line is derived from the two numbers on it.
The last part is where this matters in practice. A /30 leaves two usable addresses, which is exactly a point-to-point link between two routers. A /31 leaves none at all.

The two reserved addresses are a fixed cost regardless of how large the block is, which means they are invisible on a /16 and fatal on a /31.
RFC 3021 resolves the /31 case by declaring that a point-to-point link has no broadcast address at all, so both of its addresses become usable.
That is why you will see a /31 on router-to-router links and never on a network with hosts on it.
It is easy and good
“It is really nice and good Please join the course”