Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:45:08+00:00 2026-05-13T13:45:08+00:00

Is there a reliable way in Windows, apart from changing the routing table, to

  • 0

Is there a reliable way in Windows, apart from changing the routing table, to force a newly created socket to use a specific network interface? I understand that bind() to the interface’s IP address does not guarantee this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:45:08+00:00Added an answer on May 13, 2026 at 1:45 pm

    (Ok second time lucky..)

    FYI there’s another question here perform connect() on specific network adapter along the same lines…

    According to The Cable Guy

    Windows XP and Windows Server® 2003
    use the weak host model for sends and
    receives for all IPv4 interfaces and
    the strong host model for sends and
    receives for all IPv6 interfaces. You
    cannot configure this behavior. The
    Next Generation TCP/IP stack in
    Windows Vista and Windows Server 2008
    supports strong host sends and
    receives for both IPv4 and IPv6 by
    default on all interfaces except the
    Teredo tunneling interface for a
    Teredo host-specific relay.

    So to answer your question (properly, this time) in Windows XP and Windows Server 2003 IP4 no, but for IP6 yes. And for Windows Vista and Windows 2008 yes (except for certain circumstances).

    Also from https://forums.codeguru.com/showthread.php?487139-Socket-binding-with-routing-table

    On Windows, a call to bind() affects
    card selection only incoming traffic,
    not outgoing traffic. Thus, on a
    client running in a multi-homed system
    (i.e., more than one interface card),
    it’s the network stack that selects
    the card to use, and it makes its
    selection based solely on the
    destination IP, which in turn is based
    on the routing table. A call to bind()
    will not affect the choice of the card
    in any way.

    It’s got something to do with
    something called a "Weak End System"
    ("Weak E/S") model. Vista changed to a
    strong E/S model, so the issue might
    not arise under Vista
    . But all prior
    versions of Windows used the weak E/S
    model.

    With a weak E/S model, it’s the
    routing table that decides which card
    is used for outgoing traffic in a
    multihomed system.

    See if these threads offer some
    insight:

    "Local socket binding on multihomed
    host in Windows XP does not work" at
    http://www.codeguru.com/forum/showthread.php?t=452337

    "How to connect a port to a specified
    Networkcard?" at
    http://www.codeguru.com/forum/showthread.php?t=451117.
    This thread mentions the
    CreateIpForwardEntry() function, which
    (I think) can be used to create an
    entry in the routing table so that all
    outgoing IP traffic with a specified
    server is routed via a specified
    adapter.

    "Working with 2 Ethernet cards" at
    http://www.codeguru.com/forum/showthread.php?t=448863

    "Strange bind behavior on multihomed
    system" at
    http://www.codeguru.com/forum/showthread.php?t=452368

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a reliable way to determine where a user is coming from in
In Windows, is there a fairly reliable way to keep a window in front
Is there a reliable way to access the client machine's clipboard using Javascript? I
Is there a reliable way to know what executable has called my executable? I
Is there a reliable, cross-platform way to do IPC (between two JVMs running on
Is there a reliable way to determine if the Microsoft XPS Document Writer is
I'm wondering if there's a way to reliably retrieve all open VALID windows in
Is there any way to reliably capture all changes made to the win32 console
Are there reliable open source libraries written in c++ to implement SIP and RTP
Is there any reliable and simple priority queue (linked list preferred, not necessary) implementation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.