dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: Strange bind behavior on multihome system

Threaded View

  1. #1
    Join Date
    May 2008
    Posts
    2

    Strange bind behavior on multihomed system

    Hi guys,

    I'm actually programming in perl but believe this is a Windows programming gotcha.

    On a multihomed system I am sending packets over a raw socket. If I bind to an IP address with a higher metric in the route table, the packet actually goes out an interface with a lower metric in the route table. The IP src addr in the packet is still the bound IP address. I think I am hitting the route feature as described in the following.

    http://blogs.msdn.com/zhengpei/archi...omed-host.aspx

    Quoted from above link:

    "Even if you call bind() to bind the socket to a specific local address (which means connection manager's AutoLSP is not associated with the socket), still your packets on this socket are subject to the routing decision in terms of choosing which physical interface will be used. "

    Does anyone know if this is the case? Is there anyway around this? I'm trying to use Pcap to grab packets and am finding it impossible since my packets are going out a different interface than I expect!

    Thanks,

    Mona

    [Added] This is expected behavior, see "Windows Socket Connection from a Multiple-Homed Computer" at http://support.microsoft.com/kb/175396
    posted by MikeAThon in "Local socket binding on multihomed host in Windows XP does not work" thread.

    Still don't know if there is a workaround...
    Last edited by raboyd; May 5th, 2008 at 08:04 PM. Reason: Add partial solution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)