So guys next we will going to discuss the concept of broadcast address
So, when do we use the broadcast address
We will use the broadcast address when we want
Certain set of machines to receive and process the same packet
So all receivers in the domain should receive the packet through broadcast address
so domain here means
the same broadcast domain that is
all the machines present in the same subnet
Right. So broadcast address is used when we want all the machines present in the same subnet to receive and process
the packet
now there are two types of broadcast addresses. The mac layer broadcast address and the
network layer broadcast address. The mac layer broadcast address is
All bits ones so the mac layer broadcast address is very simple
It has all its 48 bit as one
So in hexadecimal notation, we represent the mac layer broadcast address as all F's
Right. It means all 48 bits of broadcast address will be one
Whereas in network layer
we have already discussed that given a
IP address and the mask value how to calculate the broadcast address of that particular subnet
So in our topology, we have shown a subnet in which the machine A B C and D are present
So what will be the broadcast address of this subnet? The broadcast address will be
11.1.1.
255/
24. this will be the broadcast address of this subnet. And of course the network ID will be
11.1.1.0/
24. This is the network ID. Whereas, this is broadcast address for this subnet
Now let us suppose that in this subnet the machine A
Wants to send an IP packet such that all nodes in the same subnet receives and process it
Right. So in order to do so
Node A should specify
destination MAC address as
broadcast address which is simple all bits as ones and
the network layer broadcast address will be 11.1.1.
255
if the machine A
Generates a packet in which the destination MAC address specified is
this value and the network layer IP address and
The network layer destination IP address specified is 11.1.1.255
Then all the machines in the same subnet will going to process the packet
Why they will going to process the packet? Let's see in brief
Now as you know that every machine runs a tcp/ip stack
When the machine receives the packet the packet is picked up by the physical layer and is handed over to the datalink layer
Now datalink layer uses the Mac layer rule
To decide whether to accept the packet or to reject the packet. The Mac layer rule says that if
destination MAC address in the packet is equal to the MAC address of the receiving interface or
Destination MAC address is a broadcast address
Then data link layer accepts the packet. if this criteria is not met then data link layer
Rejects the packet. Now when data link layer accepts a packet
it means data link layer chops off the Mac header and handover and
Handover the rest of the packet to the network layer
Right, so this happens when the data link layer accepts a packet and
When the network layer receives the packet from the datalink layer, the network layer
Imposes IP rule on the packet to decide whether to accept the packet or to reject the packet
So if so, the IP layer rule says that if destination IP address is equal to IP address of the receiving interface
or
destination IP address is a broadcast address then accept the packet else
reject the packet
so here accept the packet means that the network layer will chop off the network layer header and
Passes the rest of the packet to the layer above it. That is the transport layer
Right. So whenever the machine receives the packet the machine imposes the Mac layer rule on the datalink layer and
the network layer
imposes the IP layer rule at the network layer of the tcp/ip stack
Right, so if the machine A generates a packet such that the destination MAC address is specified in the packet is a broadcast address and
The destination IP address is specified in the packet is also a broadcast address for that subnet
Then rest of the machines in that subnet will going to accept and process the packet
So this is how broadcast is done. You have to specify the broadcast address at
Two levels that is at data link layer level as well as at network layer level
So finally we will take a look
That is at the holistic view of a network that is how networks are usually formed and organized
You can see that in this example
There are three subnets
so this is the subnet A which has the subnet ID 11.1.1.
0/24 and you have a subnet B which has the network ID
12.1.1.0/
24 and you have a subnet C, which is actually a subnet on a point-to-point link and
It has a network ID 13.1.1.0/30
Right, so you can see that the mask value for subnet A being used is 24. It means maximum
254 machines or devices can be attached to that subnet and the same is true for the subnet B
And for the subnet C the mask value being used is 30
So in this subnet C strictly 2 devices can be present
right
so subnet 11.1.1.0/24 that is subnet A and
subnet B can have maximum of
254 machines and
Because we are using the mask value 30 for a subnet C
We cannot attach any other machine to subnet C
Why because we are using point-to-point link. So practically the point-to-point link will not allow us to attach a third machine and
conceptually also using a mask value 30, we are debarred from
Attaching the third device to the point-to-point
subnet
Because we do not have any assignable IP address left to be assigned to that third machine
So if packet with the destination IP address is equal to 11.1.1.255
and MAC address is equal to the broadcast address arrives in subnet A
It will be accepted by all the machines in subnet A that is machine A machine B and
Machine C as well as the router
will going to receive the packet and will going to process it because
The packet is being broadcasted in that particular subnet
So we are done with the IP address mathematics and in the next module, we will going to discuss the l2 routing
Thanks guys