On Apr 29, 5:33 pm, Pei Zheng <zheng...@gmail.com> wrote:
> Let's say i have two ethernet cards connected to the same subnet.
You mean that you are bridging? Are we talking a typical IP world?
> So when someone sends an ethernet framework to this host, it will be
> picked up by both network cards, right? So there will be two
> interrupts.
No for several reasons. The most obvious is this: Consider a switch
with 8 ports. A packet is sent from port 1 to port 8. Port 2 is
connected to the same subnet as port 8, but a packet sent to the
machine on port 8 will not always be seen by a machine connected to
port 2.
A subnet is a high-level logical construct that doesn't map 1-to-1 to
the physical wiring layer.
> How does the driver figure out these two frames are actually the same
> one? Specifically, is there a seperate recv buffer for each card?
> Maybe the driver does not bother to do that, and just pass it to the
> ip stack?
In the vast majority of legal configurations, it won't receive both
frames. For example, if STP and bridging is used, one port will be
disabled. If the two bridge ports go to different logical segments of
the LAN, the frame will only be seen on the interface that faces the
side that generated the frame.
DS
|