CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@Sachin Jain • 05 Jan, 2011
I am having a doubt regarding broadcasting done by router or not ?

Suppose we are having this scenario.

LAN1 { , ,, } connected via S1
LAN2 { , , , } connected via S2

Now Consider Switch S1 and S2 and a router R.
See this :-

LAN1 <----S1----> R <-------S2----->LAN2

I Hope the scenario is clear.
Now if computer on LAN1 broadcasts a packet.
It will also reach the Router.
Packet is having IP address as broadcast address.

The Question is Will the Router check the address in the routing table ?
or simply drop the packet due to broadcast address.

Please reply...😛
@Reya • 05 Jan, 2011 Yeah router checks the destination address of the packet in the routing table, to send the packet to that particular address!
@Sahithi Pallavi • 05 Jan, 2011 yeah, pravee is right. It checks.
@Sachin Jain • 06 Jan, 2011 Thank You Guys 😀
Its clear now...
@durga ch • 06 Jan, 2011 Routers dont participate in broadcasting, they simply drop the packets as soon as they notice a broad cast address. In other words broadcast domains are restricted to layer 2 devices. Routers dont generally participate in broadcasting/ They rather drop the packet which is broadcasted, That is how you prevent the broadcast packets from one network in this case LAN1 , from reaching another network LAN2
@Sachin Jain • 06 Jan, 2011 @ Durga
Thanks 😀
But i have got some doubt.Please clarify it.

How does they notice that it is a broadcast address.
I am thinking they will check it with every other entry since no entry with broadcast address exist
So they drop the packet.
Please tell me the exact procedure do they follow in order to drop the packet. ?

Actually i was studying Vlans from this page
Virtual Local Area Networks

Please see 1st paragraph INTRODUCTION and 3rd Line it says
A Local Area Network (LAN) was originally defined as a network of computers located within the same area. Today, Local Area Networks are defined as a single broadcast domain. This means that if a user broadcasts information on his/her LAN, the broadcast will be received by every other user on the LAN. Broadcasts are prevented from leaving a LAN by using a router. The disadvantage of this method is routers usually take more time to process incoming data compared to a bridge or a switch.

If routers simply check it is a broadcast address then i dont think it takes more time to process incoming data.
Please answer how their processing power gets wasted ?

Thanks for your reply.
@durga ch • 06 Jan, 2011 Switches are simpler devices as compared to routers, when the destination address is something of Broadcasr kind, router knows its a broadcast packet and drops it.
Routers need to refer to routing tables, which have many more entries as compared to switching table. make forwarding decision unlike switches. Hence routers might look a little slow. But that was quite some time ago, these days we ahve faster processing L3 devices like L3 switches which can replace routers very s
@Sachin Jain • 06 Jan, 2011 @ Durga

Sorry if i am troubling you with my doubts but I am learning with this communication so please bear my doubts.
Doubt :-
Now Since routers check in the table, there might be a default entry in the routing table
So the broadcasted packet may go to the default address given in the routing table.
Please correct me
@Reya • 06 Jan, 2011 There is a default route in the routing table.Broadcast packet go to the default route only when no other routes for the destination of that particular broadcast packet is found!If a router cannot find a route for the destination,the default route is used.

You can come up with more questions if you have doubt.
@sahil.shaikh89 • 06 Jan, 2011 The broadcast address for an IPv4 host can be obtained by performing a bit wise logical OR operation between the bit component of the sub-net mask and the host's IP address.
@Sachin Jain • 06 Jan, 2011
There is a default route in the routing table.Broadcast packet go to the default route only when no other routes for the destination of that particular broadcast packet is found!If a router cannot find a route for the destination,the default route is used.

You can come up with more questions if you have doubt.
Take the same scenario as i mentioned in my first post.
Now, suppose user from LAN1 broadcasted a packet.Now it will reach the packet and it will check all the entries.
Now suppose the router has a default entry.
Since broadcast adress did not match with any of the entries.
It should go to default route set in routing table.
If it does then its wrong to say that router prevents broadcasting....

Sorry but still having doubt 😔
@Reya • 06 Jan, 2011 Broadcasting is sending a copy of the packet to each destination.Then wats the purpose of looking into the routing table??

Unicasting is the one where you need to know the destination address of that packet in the routing table to send the packet to that particular destination.

If you are not clear you can feel free to ask doubts!
@Deepika Bansal • 06 Jan, 2011 Praveena. I can't get you. I too have the same doubt as BB. In case of broadcast packet, the router should forward it as per the default entry in its routing table. Why should the router drop a broadcast packet when it has the option of default enty..😕😕
@Reya • 06 Jan, 2011 Broadcasting is sending a data to all destinations that permits the router to send a copy of the data to each destination.

I'm wondering how you people think that broadcast packet may go to the default route when it dont find the route in the routing table??

Router identifies the packet is a broadcast type by seeing the ip address and it drops the broadcast packet.

In unicasting,you send a packet to one destination.In that case, the router checks the destination address and sends the packet to that destination.

In multicasting,you send a packet to multiple destinations.

Did you get me??
@Deepika Bansal • 07 Jan, 2011 For routers,broadcasting address is also an ip address similar to the unicasting one. For us, its the lan address.
so pravee does this means that routers maintains a seperat entry for broadcasting purpose..?
@Reya • 07 Jan, 2011 A broadcast address of an ip address can be calculated by taking the bit compliment of the subnet mask and then applying bitwise OR operation with it to the ip address.

say the ip address of the system is and the subnet mask is,calculating Bitwise OR operation after taking the compliment the broadcast address will be the router finds the packet is of broadcast type it drops it.It doesnt maintain a separate entry for broadcasting purpose.Did i clear your doubt??
@Sachin Jain • 07 Jan, 2011 Hey praveena
Does our packet contains our subnet mask.
If not then how does router know about the mask address ?
@durga ch • 06 Feb, 2011 sorry BB! I took a bit long to come up with appropriate reason
here I go

LAN1 <----S1----> R <-------S2----->LAN2

see when a computer in lan1 broadcasts , the packet looks this way


the computer will be knowing the destination IP by say our DNS server

so now we know SIP and DIP right?
SMAC is as well known but we are unaware of the destination MAC right?
that is when we do a BC right?ie DMAC will be FF:FF:FF:FF:FF

Now, Siwtch works in L2 and your beloved router works in L3.
now the BC packet reaches the router .
move up from OSI model upwards what happens?
its physical --> data link--> network right?
so, the router sees that its a broadcast mac , hence proceeds to open the packet to see what is the destination IP address. It sees that the DIP is NOT its IP and drops the packet!!! Yo we got a reason why our router drops my packet

Now lets talk about IP Broadcast which happens betwnee 2 routers like saay an DHCP or ICMP packet alright?
in this case the DIP would be and that when router braodcasts what IP address

wow! this question was nice, it got me thinking real hard and i took almost a month to answer it. Let me know if you still have doubt
@silverscorpion • 06 Feb, 2011 well, everything said above was clear.. but one thing.. isnt FF.FF.FF.FF and the same? then how does broadcasting happen between routers?
@jeethu • 08 Feb, 2011 @durga
When a broadcast packet(from LAN1) is received by a router, Why is it dropping it ? I mean it should forward to the rest of the nodes in the same LAN 1. doesn't it ? Or is it sent directly between the nodes without router coming into picture?
If it is not directly sent between the nodes and is sent through the router, where are the packets getting duplicated ?
@durga ch • 08 Feb, 2011
well, everything said above was clear.. but one thing.. isnt FF.FF.FF.FF and the same? then how does broadcasting happen between routers?
they are not really same, one is L2 broadcast address ( FF:FF:FF:FF😀 saying broadcast it to all the MAcs within the LAN and is a L3 broadcast address ( for broadcasting between routers)
@durga ch • 09 Feb, 2011 "When a broadcast packet(from LAN1) is received by a router, Why is it dropping it ?"

please refer to the recent post, I think we have already dealt with this question. L2 broadcast happens with the help of a switch and not a router hence router wont come inot picture unless we are talking about L3 BC.
@Sachin Jain • 10 Feb, 2011 @ Durga
Thanks a lot for taking so much pain...
You rock...!!
@abdul qadir • 10 Dec, 2018 • 2 likes

It depends whether the packet is for the same subnet or for the different subnet. If pc1 wants to ping pc 2 in the same subnet, the pc1 will check that packet is for the same subnet with the help of subnet mask, the pc1 will generate icmo echo request, in icmp header source ip and destination ip information is known and source mac address is also know but dest mac address is unknown.

In order to commuicate in same network mac address is required so pc will check its arp table,in the arp table if the destination mac is not found then pc1 will gwnerate ARP request to find the mac address of pc2. Arp rqst will always be broadcasted in a network. 

In ARP Header sip, dip and smac is known but dmac will set to ffffffffffff, as broadcast address. The arp rqst will go to switch and switch will update its mac table with source mac addrss. Means if pc 1 is connected to port1 of switch so the switch will update its mac address table as pc1 is connected with port1.

Now when the switch will the the destination address us broadcatst of packed arrived on port1 then the switch will also broadcast the packet to all ports except port1. If one of the port is connected to router, so router will check that this is Arp rqst so router will drop the packet and will forward to other network

The same arp rqst from switch will go to the pc 2 connected with switch in same network. 

Pc2 will rcv the arp rqst and check the destination ip address which is the ip address of pc2 itslef so pc 2 will update its arp table. In the arp table, pc2 will upadte pc1,s mac address which is mentioned in arp header, and  in the destination ip adress pc 2's ip address is mentioned. 

Now pc2 will generate arp reply. In Arp reply SIP, DIP,SMAC AND DMAC are mentione, then switch will again update its mac address table, because pc 2 is connectwd with one of the port of switch, so switch will update the mac address of pc2 with the associated port. And and switch will also check the destion mac address of the packet is connected with port1 so the switxh will forward this arp reply to port1 .

With this port1, pc1 is connected so the pc1 will rcv the arp reply and pc1 will update its arp table because pc1 requested for mac address of pc2 throguh arp rqst.

Now pc1 has the information of the mac address of pc2, so pc1 will generate icmp echo request which is nothing but a protocol which is used for ping. That means pc1 will ping pc2. 

Icmo rqst will be rcvd by switch, switch will check for dest. Mac address and found this time that dest mac address is connected with one of its port so the switch will unicast the packet to pc2.

Pc2 will rcv the icmp echo rqst and then it will generate icmo echo reply.

This is called a packet flow in same subnet.

Hope answered your question.... :)


Related Posts

@sasikumar.p · Sep 9, 2012

Why do logic gates only work on DC? Why can't we use AC in those components? I want to know the reasons behind it. Please explain in detail.

@Ankita Katdare · Apr 29, 2014

What this young researcher from Vanderbilt University has achieved can make it possible to develop nanowires way thinner than human hair using electron beams. Junhao Lin, A Ph.D. student at...

@ashok98107 · Aug 5, 2012

i want to trace my wife having mobile number my business in delhi and my wife lives in mahenderagarh (haryana)

@Ankita Katdare · May 23, 2013

The two versions of Amazon Kindle's tablet - Kindle Fire HD and Kindle Fire HD 8.9'', which could only be bought till date in theUS, the UK, Germany, France, Spain,...

@Kaustubh Katdare · Jul 18, 2011

I stumbled upon a photo of proposed Infosys campus in Kuwait and it looks like this - ...can someone from Infosys confirm this? I bet it's going to consume half...