I know that hubs send broadcast packets, so every packets is received by each node in the broadcast domain. I read that frames that are received but that aren't addressed to a NIC'S MAC address are dropped. But I mean if it is a broadcast packet, it shouldn't be accepted by each node?
Hubs are layer 1 devices. As they receive electrical impulses constituting a frame, they forward them out all ports other than the receiving port.
This is regardless of whether the l2 destination is unicast, multicast, or broadcast (ff:ff:ff:ff:ff:ff).
This may result in an Ethernet collision if multiple hosts transmit traffic to the hub simultaneously.
A host’s Ethernet adapter will pass certain received frames up the protocol stack for further processing ( generating a cpu interrupt)
- Unicast frames which match its Ethernet unicast address
- Multicast frames destined to any l2 multicast address which the host is “listening” to
- All broadcast l2 frames
If the l2 frame includes a l3 packet, the host cpu will de-encapsulate and process it.
If the interface is placed in “promiscuous mode” ( by tcpdump for example) it is possible for all received Ethernet frames to be sent up the protocol stack and generate interrupts.
I know that hubs send broadcast packets
Hubs don't send anything (by themselves). They forward bits (or symbols) on the wire, regardless of framing and addressing.
so every packets is received by each node in the broadcast domain.
Every frame is forwarded to each hub port and ending up on each node in the broadcast domain, yes. With a repeater hub, the broadcast domain is identical to the collision domain.
I read that frames that are received but that aren't addressed to a NIC'S MAC address are dropped.
By the NIC, yes.
But I mean if it is a broadcast packet, it shouldn't be accepted by each node?
A NIC (not in promiscuous mode) processes frames addressed to its MAC or the broadcast address or a multicast address that it was configured for. All other frames are dropped/ignored.
Early Ethernet relied on the NICs sorting out unwanted frames as the shared wire transmitted each frame to all the nodes on the wire. A repeater hub replicates that behavior in that it copies each bit from the receiving port to all other ports. Only one port can be receiving at any time, anything else received causes a collision. It doesn't make any difference to where that bit's frame is addressed to as a repeater (hub) has no concept of frames and addressing.
Addressing does make a difference with switches that selectively forward unicasts by MAC address. They handle broadcasts similar to how a repeater handles everything: the broadcast is "flooded" out of all ports but the one it was received on.