none
Load balancing with intermediate Driver IM RRS feed

  • Question

  • Hello Everyone,

    Im Completely Lost now, im pretty new to WDK and im trying to understand the best way to implement the following :

    Problem : I want to send Traffic across multiple interfaces as per a loadblancing algorithm that i will make, its UnEqual Loadbalancing , So all of the traffic for example coming from my system (just say like vpn solution) will go through the load balancing algorithm.

    My Solutions which are not Right for sure !

    -------

    Sol1. IM Driver Mux that will do 1-N , in here i have to create a protocol Driver as well and Attach my IM to the protocol and the minport on each interface i Want to use in my Load balancing .

    How to tie all of the traffic on my system to have a next hop being my Load balancer , do i need a virtual miniport and change the routing table of my system as well ?

    --------

    Sol2. Make a protocol Driver Attach it to the physical interfaces, then make a virtual miniport Adapter, Bind it to the protocol Drivers on many physical interfaces as i want, then implement the Load balancing by send specific traffic to each protocol seperatly .

    Making here the virtual miniport as the next hop of my system by modifying the routing table , then the virtual miniport will take care of the load balancing alogrithm !!

    ----------

    Finally ... Why Do I need to create a protocol Driver while the tcp/ipv4 protocol already installed on the system and present in our physical interfaces already is Enough for me ?? Can I bind to that protocol driver ?

    What I described above is what my level of knowledge drove me into, your feedback will REALLY help understand and get out of he confusion .

    Best Regards,






    • Edited by HGBTester Friday, February 7, 2014 3:20 PM
    Friday, February 7, 2014 3:14 PM

Answers

  • Typically, you'd use a MUX-IM driver to implement load balancing.

    You don't need to meddle with routing tables to force traffic through your IM driver.  Instead, use a notify object to unbind TCPIP from the physical NIC.  TCPIP will then only be able to bind to your IM driver's virtual miniport edge.

    Note that IM drivers are not easy to write.  This is a large task for even an experienced developer who is already familiar with NDIS.

    Friday, February 7, 2014 7:02 PM

All replies

  • Typically, you'd use a MUX-IM driver to implement load balancing.

    You don't need to meddle with routing tables to force traffic through your IM driver.  Instead, use a notify object to unbind TCPIP from the physical NIC.  TCPIP will then only be able to bind to your IM driver's virtual miniport edge.

    Note that IM drivers are not easy to write.  This is a large task for even an experienced developer who is already familiar with NDIS.

    Friday, February 7, 2014 7:02 PM
  • Thank you very much for the reply, 

    ---------

    Now unbinding the tcp/ip protocol from one physical interface then bind it to my virtual miniport, does that mean the system wont accept the packets of TCP/IP directly to be received on the other NICs i have except the virtual miniport ? Then when i want to redirect the traffic to get out via one specific interface at a time, I thought the TCP/IP protocol has to be present on that physical interface as well .

    ----------

    Is that the easiest way to implement such feature ? sending tcp/ip packets via specific interface/interfaces with no performance degradation .

    Best Regards


    • Edited by HGBTester Saturday, February 8, 2014 4:40 AM
    Saturday, February 8, 2014 4:39 AM
  • It's the easiest way to implement this. There will be a performance degradation, since you're adding a layer of abstraction to the datapath.  But if you're careful, the degradation will be small. 
    Monday, February 10, 2014 1:10 AM
  • No its not a fail-over, my plan was to achieve an unequal-loadbalancing, so say i have 1 ethernet connected to the internet with 100mbps and another 4G usb adapter connected to the same PC, now i have 2 internet connetions on my PC with 2 adapters .the windows is not going to use them both but actually use one and leave the other idle , i want my IM to use them both so all of the connections coming from my PC are going to be loadbalanced per connection "for now not per packet coz per packet wont work on the internet" .

    So if im doing a torrent download for example the download actual speed will use both connections in accounting . 

    Later level i will adjust the algorithm for testing purposes todo loadbalancing per packet and treat them in the other side before it get used .

    Tuesday, February 11, 2014 8:49 AM
  • Hello HGBTester

    Interesting problem there, Did you find a solution to it ?

    Do share

    Regards


    ___________ Regards Umar Yaqoob ___________

    Saturday, March 28, 2015 8:42 PM
  • any updates on this Jeffrey?

    ___________ Regards Umar Yaqoob ___________

    Wednesday, July 27, 2016 2:26 PM
  • This is not a network driver issue. It looks like a general application issue. Applications are not aware of multiple interfaces and just ask to connect thru "default" one, and obviously Windows gives the interface with highest throughput. So this can be addressed in the app itself (especially, for apps like torrent clients). Also, try to ask at Technet networking forums whether such kind of connection balancing already exists in Windows.

    Regards,

    - pa

    Wednesday, July 27, 2016 3:59 PM
  • An application is unaware about the networking configuration of a system, so it just calls connect for which the OS selects an interface based on the destination address, but if a driver specifies the local-address for this socket, the OS may choose that particular localaddress interface as the interface for that socket. So yes its a driver issue.


    ___________ Regards Umar Yaqoob ___________

    Wednesday, July 27, 2016 5:13 PM