Jump to content
RESET Forums (homeservershow.com)
Sign in to follow this  
AlexF

"load balance" outgoing traffic from Windows client with multiple NICs

Recommended Posts

AlexF

Hi guys,

my understanding is that Windows 7 provides automatic load balancing of outgoing connections between NICs if those NICs have same InterfaceMetric and Gateway Metric.

 

I have 2 NICs in my machine:

C:\Windows\system32>netsh interface ip show address

Configuration for interface "TP-Link TG-3468 v2"
    DHCP enabled:                         Yes
    IP Address:                           192.168.1.5
    Subnet Prefix:                        192.168.1.0/24 (mask 255.255.255.0)
    Default Gateway:                      192.168.1.254
    Gateway Metric:                       256
    InterfaceMetric:                      10

Configuration for interface "Built-in"
    DHCP enabled:                         Yes
    IP Address:                           192.168.1.3
    Subnet Prefix:                        192.168.1.0/24 (mask 255.255.255.0)
    Default Gateway:                      192.168.1.254
    Gateway Metric:                       256
    InterfaceMetric:                      10

 

C:\Windows\system32>route print
===========================================================================
Interface List
 16...f8 1a 67 2f 99 1f ......Realtek PCIe GBE Family Controller #2
 12...1c 6f 65 ab 91 35 ......Realtek PCIe GBE Family Controller
  1...........................Software Loopback Interface 1
 15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 10...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.1.254      192.168.1.5    266
          0.0.0.0          0.0.0.0    192.168.1.254      192.168.1.3    266
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      169.254.0.0      255.255.0.0      192.168.1.4      192.168.1.5     11
      169.254.0.0      255.255.0.0      192.168.1.4      192.168.1.3     11
      192.168.1.0    255.255.255.0         On-link       192.168.1.5    266
      192.168.1.0    255.255.255.0         On-link       192.168.1.3    266
      192.168.1.3  255.255.255.255         On-link       192.168.1.3    266
      192.168.1.5  255.255.255.255         On-link       192.168.1.5    266
    192.168.1.255  255.255.255.255         On-link       192.168.1.5    266
    192.168.1.255  255.255.255.255         On-link       192.168.1.3    266
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link       192.168.1.5    266
        224.0.0.0        240.0.0.0         On-link       192.168.1.3    266
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link       192.168.1.5    266
  255.255.255.255  255.255.255.255         On-link       192.168.1.3    266
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
      169.254.0.0      255.255.0.0      192.168.1.4       1
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
 10     58 ::/0                     On-link
  1    306 ::1/128                  On-link
 10     58 2001::/32                On-link
 10    306 2001:0:4137:9e76:188c:159f:3f57:fefa/128
                                    On-link
 10    306 fe80::/64                On-link
 10    306 fe80::188c:159f:3f57:fefa/128
                                    On-link
  1    306 ff00::/8                 On-link
 10    306 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

 

So, my understanding is that this is perfect configuration for Windows 7 load-balancing. However, "Networking" tab of Windows Task Manager show utilization of just one, even though both are "Connected."

 

Internet is full of references to "RandomAdapter", however, my reading of Case 4 of TCP/IP: Load Balancing vs. Distributed Network Sessions and TCP/IP and NetBT configuration parameters for Windows 2000 or Windows NT is that this is for incoming connections, hence, not really what I want.

 

Help?

R's, Alex

PS. I am not expecting Link Aggregation (LACP) - I know Windows 7 doesn't natively support it.

Edited by AlexF

Share this post


Link to post
Share on other sites
ikon

Sorry, I don't have any wisdom to impart (not that I ever do), but I look forward to reading the responses.

Share this post


Link to post
Share on other sites
jmwills

You need to install a Network Loading Balancing NIC, if this works the same for outbound traffic as it would for inbound traffic.

Share this post


Link to post
Share on other sites
jem101

OK then there is nothing wrong with the setup, however I don't think that Windows 7 is going to behave in the way you expect.

 

Firstly what is important is not that the interface metric and the gateway metrics are the same for both interfaces but rather the sum of the two is the same on both. A connection's metric is a sort of cost associated with sending traffic down that link rather than another one. Secondly load balancing is more concerned with incoming connections from multiple sources being internally routed through different connections while to the outside world it appears as a single connection - if that makes any sense at all?

 

if you look at the first two entries of your route table

 

0.0.0.0 0.0.0.0 (ie default route, if I don't know of another way use this one), next hop address is 192.168.1.254 (which I guess is your router), interface addressees of .3 and .5 but they have the same metric so Windows has no reason to choose one connection over the other - so everything else being equal it will choose one interface and stick with it.

 

Were you trying to get faster speeds on your internal home network?

 

John

Share this post


Link to post
Share on other sites
AlexF

You need to install a Network Loading Balancing NIC, if this works the same for outbound traffic as it would for inbound traffic.

 

I believe what you're referring to is Link Aggregation (aka. 802.3ad), or as Microsoft/Intel calls it "Teaming" - this has a single logical IP address which is reachable via multiple NICs. That is not what I am referring to in my question.

Share this post


Link to post
Share on other sites
AlexF

... interface addressees of .3 and .5 but they have the same metric ...

 

Exactly, but my understand is that Windows 7 (unlike earlier versions) will distribute the connections, akin to Equal-cost multi-path routing (ECMP).

 

Now, I know that this works, because I did it in my VirtualBox - I specified two NATs for the Windows 7 client and I could then see connections distributed between the simulated "Intel PRO/1000 MT Desktop" interfaces (each with its own IP address). But I cannot achieve this in my physical box using above two physical RealTek NICs.

Edited by AlexF

Share this post


Link to post
Share on other sites
jmwills

I believe what you're referring to is Link Aggregation (aka. 802.3ad), or as Microsoft/Intel calls it "Teaming" - this has a single logical IP address which is reachable via multiple NICs. That is not what I am referring to in my question.

Nope, not teaming.  NLB is a mechanism, at least for web servers, to equally balance the incoming traffic among several servers.  I'm just wondering if it would work the same for outbound traffic.

 

"What's the end game"?

Share this post


Link to post
Share on other sites
jem101

I have never heard of W7 having this feature, multi-path routing isn't something I would expect to see on a desktop OS - but I'm more than happy to stand corrected if someone knows more about this.

 

Also just because it works in a simulated virtual environment doesn't mean that it will work in a physical one - I can see where you are coming from but I suspect it is the virtualisation host (Virtualbox) which is making it work rather than W7.

 

John



Let me vindicate myself, see Enable load balancing on Windows 7 with 2 or more NICs - I didn't imagine it.

Look carefully at the gateway addresses for the two connections in the example they give - the two are different. This is load balancing an internet or other external connection which is perfectly possible (if you have two separate gateways or internet connections) not quite the same as you have.

 

John

Share this post


Link to post
Share on other sites
AlexF

Look carefully at the gateway addresses for the two connections in the example they give - the two are different. This is load balancing an internet or other external connection which is perfectly possible (if you have two separate gateways or internet connections) not quite the same as you have.

I fail to see the difference. I mean, obviously I know the difference between accessing destinations on local subnet and accessing destination via the Gateway, or that Gateways for the NIC are different but I fail to see why it be "perfectly possible" in one case and not another.

 

My logic is simple, if metric to destination is same, then OS can choose which NIC to use and use it for the duration of the connection, irrespective of whether destination is on local subnet or via Gateway (to Internet or other local subnets).

Edited by AlexF

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  



×
×
  • Create New...