Router does not send Broadcast packet. that means it does not support broadcasting. but while sending packet from computer a to computer b which is not in the same network , computer a gets the mac address of default router through arp packets. and then router will send arp packets that it broadcast packets to know computer b's mac address. in this case how come router broadcast packets??? please reply as early as possibel
I think you are confusing the fact that a router will not forward broadcasts with the need for a router to use broadcasts.
If PC A and PC B are in different networks with a router in between, and PC A is sending something to PC B:
- PC A will use ARP to discover the MAC address of the default gateway, the router.
- PC A will create frames for the packets to PC B using the router's MAC address.
- PC A will send frames containing the packets destined for PC B to the router's MAC address.
- The router will strip off the frames, which contain the MAC addresses, to get to the packets.
- The router will look at the layer-3 addresses in the packets to determine to which interface it should send the packets.
- The router will use ARP to determine PC B's MAC address on the next network.
- The router will build new frames for the packets using PC B's MAC address.
- The router will send the frames to PC B on the next network.
Actually, router doesn't forward broadcast by default, when a router receive a frame with a destination mac address ff:ff:ff:ff:ff:ff wich is a broadcast.
- the router will compare the destination ip address to its routing
- if the router find the corresponding network on its routing table,
- it will send its mac address as a destination mac address to the sending host,
- the sending host will send the frame to the router,
- the router will use arp to request the the destination mac address of the pc on the other side of the network and send the frame.