Index: /trunk/src/VBox/Main/include/netif.h
===================================================================
--- /trunk/src/VBox/Main/include/netif.h	(revision 35355)
+++ /trunk/src/VBox/Main/include/netif.h	(revision 35356)
@@ -68,4 +68,5 @@
     RTNETADDRIPV6  IPv6NetMask;
     BOOL           bDhcpEnabled;
+    BOOL           bIsDefault;
     RTMAC          MACAddress;
     NETIFTYPE      enmMediumType;
Index: /trunk/src/VBox/Main/win/NetIf-win.cpp
===================================================================
--- /trunk/src/VBox/Main/win/NetIf-win.cpp	(revision 35355)
+++ /trunk/src/VBox/Main/win/NetIf-win.cpp	(revision 35356)
@@ -62,5 +62,34 @@
 #define VBOX_APP_NAME L"VirtualBox"
 
-static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo)
+static int getDefaultInterfaceIndex()
+{
+    PMIB_IPFORWARDTABLE pIpTable;
+    DWORD dwSize = sizeof(MIB_IPFORWARDTABLE) * 20;
+    DWORD dwRC = NO_ERROR;
+    int iIndex = -1;
+
+    pIpTable = (MIB_IPFORWARDTABLE *)RTMemAlloc(dwSize);
+    if (GetIpForwardTable(pIpTable, &dwSize, 0) == ERROR_INSUFFICIENT_BUFFER)
+    {
+        RTMemFree(pIpTable);
+        pIpTable = (MIB_IPFORWARDTABLE *)RTMemAlloc(dwSize);
+        if (!pIpTable)
+            return -1;
+    }
+    dwRC = GetIpForwardTable(pIpTable, &dwSize, 0);
+    if (dwRC == NO_ERROR)
+    {
+        for (unsigned int i = 0; i < pIpTable->dwNumEntries; i++)
+            if (pIpTable->table[i].dwForwardDest == 0)
+            {
+                iIndex = pIpTable->table[i].dwForwardIfIndex;
+                break;
+            }
+    }
+    RTMemFree(pIpTable);
+    return iIndex;
+}
+
+static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo, int iDefault)
 {
     DWORD dwRc;
@@ -163,4 +192,5 @@
                     pInfo->enmMediumType = NETIF_T_ETHERNET;
                     pInfo->enmStatus = pAdapter->OperStatus == IfOperStatusUp ? NETIF_S_UP : NETIF_S_DOWN;
+                    pInfo->bIsDefault = (pAdapter->IfIndex == iDefault);
                     RTStrFree(pszUuid);
                     break;
@@ -906,5 +936,6 @@
 
 static int vboxNetWinAddComponent(std::list<ComObjPtr<HostNetworkInterface> > * pPist,
-                                  INetCfgComponent * pncc, HostNetworkInterfaceType enmType)
+                                  INetCfgComponent * pncc, HostNetworkInterfaceType enmType,
+                                  int iDefaultInterface)
 {
     LPWSTR              lpszName;
@@ -926,5 +957,5 @@
             memset(&Info, 0, sizeof(Info));
             Info.Uuid = *(Guid(IfGuid).raw());
-            rc = collectNetIfInfo(name, Guid(IfGuid), &Info);
+            rc = collectNetIfInfo(name, Guid(IfGuid), &Info, iDefaultInterface);
             if (RT_FAILURE(rc))
             {
@@ -937,5 +968,8 @@
             if (SUCCEEDED(iface->init(name, enmType, &Info)))
             {
-                pPist->push_back(iface);
+                if (Info.bIsDefault)
+                    pPist->push_front(iface);
+                else
+                    pPist->push_back(iface);
                 rc = VINF_SUCCESS;
             }
@@ -992,5 +1026,5 @@
                             if (!_wcsnicmp(pId, L"sun_VBoxNetAdp", sizeof(L"sun_VBoxNetAdp")/2))
                             {
-                                vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_HostOnly);
+                                vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_HostOnly, -1);
                             }
                             CoTaskMemFree(pId);
@@ -1037,5 +1071,5 @@
             pInfo->Uuid = *(guid.raw());
 
-            return collectNetIfInfo(name, guid, pInfo);
+            return collectNetIfInfo(name, guid, pInfo, getDefaultInterfaceIndex());
         }
     }
@@ -1404,4 +1438,5 @@
     IEnumNetCfgBindingInterface *pEnumBi;
     INetCfgBindingInterface *pBi;
+    int                  iDefault = getDefaultInterfaceIndex();
 
     /* we are using the INetCfg API for getting the list of miniports */
@@ -1459,5 +1494,5 @@
                                         if (uComponentStatus == 0)
                                         {
-                                            vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_Bridged);
+                                            vboxNetWinAddComponent(&list, pMpNcc, HostNetworkInterfaceType_Bridged, iDefault);
                                         }
                                     }
