Re: Bind to specify sending NIC on multi-homed computer



Just my few cents in addition to Eugene's message...

"Koji Ishii" <KojiIshii@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FCF28BAA-2D4C-4DD9-A259-DFBCF90EA181@xxxxxxxxxxxxxxxx
>I found that even if I bind a socket to a local address, packets can go out
> from the other NIC. From the last paragraph of this KB:
> http://support.microsoft.com/kb/175396
> it looks like this is a by design.
>
> But my question is why.
> * Bind() is used to be used when dev wants to use a specific NIC. This
> design breaks developers' expectations by experiences.
No, metric is the king in the any RT embedded Os not only Windows use it to
decide
what is optimal path for sending data
> * Because of this design, non-Admin users can send UDP packets with their
> favorite source IP address.
Why not , that's what you want when you did bind()!
>Just plug two NICs and assign your favorite
> address to one NIC, then connect the other to Internet or Intranet. Isn't
> this a security probelm with current XP stack?
What ? Your packet send from different NIC that IP assigned , so what ?
> * When dev really wants to send packets from a NIC -- in my case, I want
> to
> seach an UPnP device connected to non-default NIC -- it's really hard to
> achieve. All search query packets go out from default NIC, and the device
> won't receive them, regardless I bind or not.
Are you sure ? Even packet went from default NIC the source IP is of one you
set so data will send back to that IP. OTOH M-SEARCH in SSDP from Control
Point went multicasted so if device announced itself before it have to
receive the M-SEARCH.
Arkady
>
> I originally thought this is a bug in the stack and queried KB. And this
> KB
> really surprised me. Does anyone have any opinions? Am I missing
> something?


.



Relevant Pages

  • Re: Bind to specify sending NIC on multi-homed computer
    ... > I found that even if I bind a socket to a local address, packets can ... > * Bind() is used to be used when dev wants to use a specific NIC. ... Just plug two NICs and assign your ... special cards and there is AFAIK no easy way to change this fact. ...
    (microsoft.public.win32.programmer.networks)
  • Bind to specify sending NIC on multi-homed computer
    ... I found that even if I bind a socket to a local address, packets can go out ... design breaks developers' expectations by experiences. ... Just plug two NICs and assign your favorite ...
    (microsoft.public.win32.programmer.networks)
  • Re: Ethernet card receiving influenced by CPU speed?
    ... it usually shows up in nics and video cards. ... Frames are the "packets" used to send ethernet signals/data on the ...
    (comp.os.linux.networking)
  • Re: [RFC v1] hand off skb list to other cpu to submit to upper layer
    ... I am investigating an ip_forward performance issue with 10G IXGBE NIC. ... The 2nd receives the packets from one NIC and forwards them out ... As NICs supports multi-queue, I bind the queues to different logical ... cpu of different physical cpu while considering cache sharing carefully. ...
    (Linux-Kernel)
  • Re: [RFC v1] hand off skb list to other cpu to submit to upper layer
    ... multiple receiving NICs scenario as I couldn't get enough hardware. ... The assumption is it's best to send out packets from the TX of the ... Or more direct speaking is we need send packets on the same cpu on ... The start point is that could reduce skb and data cache miss. ...
    (Linux-Kernel)