locked
To:Biao Wang [MSFT] need more explanation RRS feed

  • Question

  • Once you answered to question"Is this possiable? Application based dynamic routing table using WFP", and in the last, you said:
    "Pining an connection to a particular NIC would restrict route lookup to be sourced form that NIC only if forwarding is not enabled. "
    Can you explain that more in detail ? I do not quite understand that ...
    If you forget that question, I re-organize it as followed:
    After I modify the soure IP using ALE_CONNECT_REDIRECT layers in Windows 7 , will all the packets I modified Directly go to the interface I specified
    or still look the route table and go to the dafault gateway?

    Thanks so much for your help.
    programmer
    Tuesday, November 3, 2009 2:12 PM

Answers

  • say you have two NICs with two IP addresses IP1 & IP2; and from either of which packet can be sent to a destination (IP3).

    If an application calls bind() with IP1, then the tcpip stack will try to find a route from IP1->IP3; Simiarly if it calls bind() with IP2 then IP2->IP3 will be attempted.

    A typical winsock app wouldn't bind to a specific address so the stack will pick a route.

    However WFP allows you to fill in a local address to bind() even if it's not specified (or WFP can change it if one is specified), hence allowing you to control which NIC a connection would go out from.

    Hope this helps,
    Biao.W.

    Thursday, November 5, 2009 8:51 AM

All replies

  • say you have two NICs with two IP addresses IP1 & IP2; and from either of which packet can be sent to a destination (IP3).

    If an application calls bind() with IP1, then the tcpip stack will try to find a route from IP1->IP3; Simiarly if it calls bind() with IP2 then IP2->IP3 will be attempted.

    A typical winsock app wouldn't bind to a specific address so the stack will pick a route.

    However WFP allows you to fill in a local address to bind() even if it's not specified (or WFP can change it if one is specified), hence allowing you to control which NIC a connection would go out from.

    Hope this helps,
    Biao.W.

    Thursday, November 5, 2009 8:51 AM
  • Hi Biao,
    I also sent this question to you through wfp@microsft.com.
    And I tried the method you mentioned to modify the local IP but some times the packets will not correctly routed out of my pc;
    (maybe it is because when I bind IP1, tcpip stack try but fail to find a route from IP1->IP3,  in this circumstances, I think I need to modify the route table)
    so,  can I modify the routing process using WFP, or I can only add or delete the route table to control the routing process?
    So can you share me some info. about refreshing the route table manually?
    When you are convenient you can also contact me by strongpan@163.com;
    Thanks so much.
    programmer
    Sunday, November 8, 2009 4:05 AM