Networking Forums

Networking Forums > Computer Networking > Linux Networking > recv buffer for each network card?

Reply
Thread Tools Display Modes

recv buffer for each network card?

 
 
Pei Zheng
Guest
Posts: n/a

 
      04-30-2007, 12:33 AM
Let's say i have two ethernet cards connected to the same subnet.

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.

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?

Thanks in advance!

 
Reply With Quote
 
 
 
 
Robert Harris
Guest
Posts: n/a

 
      04-30-2007, 09:25 AM
Pei Zheng wrote:
> Let's say i have two ethernet cards connected to the same subnet.
>
> 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. Generally (i.e. excepting broadcast frames, multicast frames and
cards operating in promiscuous mode) ethernet cards are programmed to
receive only frames addressed to their own MAC address.

Robert

>
> 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?
>
> Thanks in advance!
>

 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      05-01-2007, 02:58 AM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recv() problem, need help!! michal.shmueli@gmail.com Linux Networking 4 04-10-2006 04:33 PM
recv() problem? michal.shmueli@gmail.com Linux Networking 8 01-11-2006 08:14 PM
recv() problem? michal.shmueli@gmail.com Linux Networking 1 01-09-2006 04:33 AM
How to set Max UDP Receive Buffer Size and Max UDP Transmit Buffer Size under Windows 2000 and Windows 2003 ? msnews.microsoft.com Windows Networking 0 09-14-2005 07:20 PM
recv()==0 question Bonny Gijzen Linux Networking 5 06-17-2004 07:41 PM



1 2 3 4 5 6 7 8 9 10 11