Router – How to Filter Broadcast Frames on a Router

iprouter

Hi I'm a newbie in Networking, still confused about some basic concepts. If given a picture below:
enter image description here

My questions is:

Let's say node C wants to send a datagram to node A but node C doesn't know node A's MAC address. So node C passes an ARP query packet which contains MAC broadcast address FF-FF-FF-FF-FF-FF and node A's IP address. I know node A will return its MAC address when it receives the packet.
But what happen if the LAN use private IP address? what will the router do when it receive the packet? since the router's other interface might connect to some other node or even another switch, will the router broadcast the packet to all its interfaces?

Best Answer

Let's say node C wants to send a datagram to node A but node C doesn't know node A's MAC address. So node C passes an ARP query packet which contains MAC broadcast address FF-FF-FF-FF-FF-FF and node A's IP address. I know node A will return its MAC address when it receives the packet.

This is a correct description of ARP for IPv4.

But what happen if the LAN use private IP address?

It doesn't matter what IP range the LAN uses as long as it forms one subnet.

what will the router do when it receive the packet?

When the (broadcast) ARP request doesn't ask for the router's LAN IP address the request is just dropped.

since the router's other interface might connect to some other node or even another switch, will the router broadcast the packet to all its interfaces?

No, a router does not forward L2 broadcasts that are used with ARP.

If node C wants to send an IP packet to a destination outside the LAN, its routing table tells it to pass the packet to the router as gateway. The packet is encapsulated by an L2 frame addressing the router's MAC. The router then receives the frame with the packet and forwards the latter according to its own routing table.

If the destination is local to the router, the router ARPs the destination IP and uses the discovered MAC for the Ethernet frame (assuming Ethernet is used). If the destination isn't local to the router it will use the next hop's MAC as local L2 destination in the frame.

Related Topic