1. Home >
  2. Apps >
  3. Groups >

Does Router Broadcast or not ?

Question asked by Sachin Jain in #Coffee Room on Jan 5, 2011
Sachin Jain
Sachin Jain · Jan 5, 2011
Member of CrazyEngineers
Friends,
I am having a doubt regarding broadcasting done by router or not ?

Suppose we are having this scenario.

LAN1 { 172.19.1.1 ,172.19.1.2 ,172.19.1.4,172.19.1.8 } connected via S1
LAN2 { 172.17.12.1 , 172.17.12.5 , 172.17.12.7 , 172.17.12.9 } 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...😛 Posted in: #Coffee Room
Reya
Reya · Jan 5, 2011
Member of CrazyEngineers
Yeah router checks the destination address of the packet in the routing table, to send the packet to that particular address!
Sahithi Pallavi
Sahithi Pallavi · Jan 5, 2011
Member of CrazyEngineers
yeah, pravee is right. It checks.
Sachin Jain
Sachin Jain · Jan 6, 2011
Member of CrazyEngineers
Thank You Guys 😀
Its clear now...
durga ch
durga ch · Jan 6, 2011
Member of CrazyEngineers
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
Sachin Jain · Jan 6, 2011
Member of CrazyEngineers
@ 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
durga ch · Jan 6, 2011
Member of CrazyEngineers
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
Sachin Jain · Jan 6, 2011
Member of CrazyEngineers
@ 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
Reya · Jan 6, 2011
Member of CrazyEngineers
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
sahil.shaikh89 · Jan 6, 2011
Member of CrazyEngineers
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
Sachin Jain · Jan 6, 2011
Member of CrazyEngineers
praveena211
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.
Praveena
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
Reya · Jan 6, 2011
Member of CrazyEngineers
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
Deepika Bansal · Jan 6, 2011
Member of CrazyEngineers
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
Reya · Jan 6, 2011
Member of CrazyEngineers
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
Deepika Bansal · Jan 7, 2011
Member of CrazyEngineers
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
Reya · Jan 7, 2011
Member of CrazyEngineers
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 192.168.12.220 and the subnet mask is 255.255.255.128,calculating Bitwise OR operation after taking the compliment the broadcast address will be

192.168.12.255.when 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
Sachin Jain · Jan 7, 2011
Member of CrazyEngineers
Hey praveena
Does our packet contains our subnet mask.
If not then how does router know about the mask address ?
durga ch
durga ch · Feb 6, 2011
Member of CrazyEngineers
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

SIP|DIP|SMAC|DMAC

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 255.255.255.255 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
silverscorpion · Feb 6, 2011
Member of CrazyEngineers
well, everything said above was clear.. but one thing.. isnt FF.FF.FF.FF and 255.255.255.255 the same? then how does broadcasting happen between routers?
jeethu
jeethu · Feb 8, 2011
Member of CrazyEngineers
@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
durga ch · Feb 8, 2011
Member of CrazyEngineers
silverscorpion
well, everything said above was clear.. but one thing.. isnt FF.FF.FF.FF and 255.255.255.255 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 255.255.255.255 is a L3 broadcast address ( for broadcasting between routers)
durga ch
durga ch · Feb 9, 2011
Member of CrazyEngineers
"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
Sachin Jain · Feb 10, 2011
Member of CrazyEngineers
@ Durga
Thanks a lot for taking so much pain...
You rock...!!
abdul qadir
abdul qadir · Dec 10, 2018
Member of CrazyEngineers

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.... :)

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up