dynamic network adaptor selection?
When at home I generally have my laptop connected over WiFi but sometimes I need to transfer a lot of files with my desktop so I use a direct gigabit ethernet connection for that. I've set up the gigabit ethernet to use a static IPs on a different subnet from my home network then need to connect through the shared folder using this IP explicitly. What would be better is if I could just use the computer name to connect and have Windows 7 automatically use the gigabit adapter if it's connected, or fall back to WiFi if it's not. Is there any way to do this? Thanks.
November 9th, 2009 7:03pm

Does your gigabit ethernet adapter have a default gateway address configured? If so - remove it.Use the ROUTE ADD command using the Microsoft Command Window to create persistent routesfor the local network serviced by your gigabit ethernet. Then when the wireless interface getsits default route, you may be able to use both networks.Good systems are supportable
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2009 4:33am

Does your gigabit ethernet adapter have a default gateway address configured? If so - remove it. Use the ROUTE ADD command using the Microsoft Command Window to create persistent routes for the local network serviced by your gigabit ethernet. Then when the wireless interface gets its default route, you may be able to use both networks. Good systems are supportable Hi, If I use ROUTE ADD then won't the laptop always use the gigabit adaptor to try and reach the desktop? I'd like that to happen when the 2 computers are connected by the gigabit, but if they are not, I'd still like the laptop to fall back to the WiFi network to reach the desktop. Is that possible? I was thinking I could try and bind the desktop's gigabit adaptor and WiFi adaptor (the desktop connects to the Internet and the rest of the network over WiFi) together, then when I connect the laptop to the desktop, I can manually disable the laptop's WiFi. The idea then, is when the laptop is connected to the desktop all network traffic will get routed through the desktop. Would this work? Thanks.
November 10th, 2009 6:00pm

Routing Table Guide - Computers with Multiple Network InterfacesA destination of 0.0.0.0 and netmask of 0.0.0.0is a default gateway route and should only be used with specific interfaces (namely your WiFi). The default gateway route is usually supplied by DHCP or configured specific to an interface. You should not add the default gateway route using ROUTE ADD. Other reachable subnets that are reachable by routers or firewall appliances attached to your gigabit wired network should be added to the route table using ROUTE ADD.The gigabit wired network already knows of the attached network segment and subnet mask assuming that you supply static IP. If you enable DHCP on your gigabit wired network, such address assignments may make your WiFi temporarily unusable - especially if the DHCP supplies a default gateway route on your gigabit wired network.Assume that your WiFi interface is on network 192.168.100.0/24 and the WiFi router (access point) is 192.168.100.1. The WiFi card in your computer may be given an IP address of 192.168.100.62. This is usually configured with a DHCP configuration on your WiFi router. A default route will be configured for you to reach theInternet by the WiFi router: Destination = 0.0.0.0 Netmask = 0.0.0.0 Gateway = 192.168.100.1 Interface = 192.168.100.62Assume that your gigabit wired networkuses a static IP and netmask, IP address of 192.168.1.23 and netmask of 255.255.255.0, thefollowing route will be shown using ROUTE PRINT. Destination = 192.168.1.0 Netmask = 255.255.255.0 Gateway = 192.168.1.23 Interface = 192.168.1.23This allows all hosts on the 192.168.1.0/24 subnet to be accessed through the gigabit wired interface. Windows assigns this route automatically.A subnet broadcast route entry is usually entered automatically to assist in Windows browse list discovery. Destination = 192.168.1.255 Netmask = 255.255.255.0 Gateway = 192.168.1.23 Interface = 192.168.1.23If you have additional network segments that should be reachable by routers or firewalls on the gigabit wired interface, you should add Static Routes for those network segments and specify the Gateway address of the attached router or firewall by which those network segments are reachable.If you have a 10.10.0.0/16 network with netmask of 255.255.0.0 that is accessable using a routing appliance 192.168.1.2 on your subnet, then you should use ROUTE ADD to supply the following: Destination = 10.10.0.0 Netmask = 255.255.255.0 Gateway = 192.168.1.2 Interface = 192.168.1.23You may also wish to add a routable subnet broadcastto assist in Microsoft browse list discovery Destination = 10.10.255.255 Netmask = 255.255.255.0 Gateway = 192.168.1.2 Interface = 192.168.1.23Slightly off-subject, but has become a significant issue in some of my environments:Most computers do not make the default gateway route persistent (Except Microsoft since Vista, Win-7, 2008). According to network best practices,the default gateway route should only be bound to the interface and not be made persistent in a routing table. The persistent default gateway route can cause phantom "unidentified network" problems that are difficult to correct without issuing the ROUTE DELETE 0.0.0.0 command.Good systems are supportable
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2009 7:47pm

If you wish to make the same network segment or computers reachable by two separate interfaces, you can ROUTE ADD the subnet or host to different interfaces or gateways. The route having the lower metric value will be the preferred route. The route having the higher metric value will be a secondary route if the primary route is unavailable.Good systems are supportable
November 10th, 2009 7:54pm

Wow, thanks for the detailed post! I'll give that a try.
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2009 8:28pm

Hi, Regarding this, I would like to share the following with you: The IP routing table Understanding the IP routing table Each network adapter has its routes; however, in this situation, only one default route is actually used. Therefore, the connection may just work with one NIC. To switch between the wireless NIC and the wired NIC, you may need to disable one of them; if you want to use the wireless connection, please just unplug the network cable. If you want to user the wired connection, please also disable the wireless NIC. Thanks. Nicholas Li - MSFT
November 11th, 2009 11:34am

What I ended up doing was enabling ICS on the desktop's WiFi adaptor and sharing it with the gigabit adaptor. The gigabit adaptor on the desktop is only being used to connect with the laptop plus I find that the desktop generally gets a bitter WiFi signal to the router so routing the laptops internet connection through the desktop when they are directly connected make sense. I thought originally just binding the 2 adaptors would be enough and allow the laptop to gets its IP address from the WiFi router but this didn't work. Using ICS it does and I don't need to set a static IP on the laptop's gigabit adaptor, which is good because I sometimes use it outside of home for network connections so this way I don't need to manually adjust the settings each time I change location. With this setup my WiFi router is 192.168.1.1 and the desktop's ICS is 192.168.137.1. When the laptop is connected it recognizes the desktop's computer name as 192.168.137.1 so the gigabit connection is used when it is available. I did set the gigabit adaptor on the laptop as the preferred adaptor under advanced settings. What didn't work with this setup was accessing other computers on the local WiFi lan since they are 192.168.1.x. However, when I added 192.168.137.0 to my ROUTE table everything worked fine. Well, mostly. It's not clear that it always chooses the right IP for a computer name, although manually pinging the IP usually fixes this. I also tried adding 192.168.137.255 but this didn't seem to help much. I'm not sure if I'm supposed to also add 0.0.0.0 using 192.168.137.1 as the gateway but maybe I'll try that later. In any case, for the most part it's working fine the way I need, so thanks for the help! Nicholas, as it happens I don't seem to need to disable the WiFi or vice versa. I'm finding the way I've got it set up if the cable is plugged in, it will be used preferentially for connection to the desktop but WiFi will be used for other connections. If I either add the ROUTE entries OR disable the WiFi, then all connections go through the cable. Of course, this works because ICS is enabled. If it wasn't, then I think you're right that the internet connection would try to go through the cable and fail. I suspect it depends exactly how you use the ROUTE table. If ICS was disabled, but the gigabit adaptor had a static IP and I added only that IP to the ROUTE table, then it should still use the WiFi adaptor for everything except the desktop connection when the cable is plugged in (although the WiFi adaptor may need to be the preferred adaptor in this case). Thanks again.
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2009 4:46pm

Hi, I am glad to know this works. Thank you for your sharing and your efforts on investigation. I also hope this information and what you experienced can be a good reference and it will benefit some other users who meet the similar issues. In the future, if you experience any issues regarding our products or if you have any feedback, you are also welcome to post a new thread in our forum. Thanks again!Nicholas Li - MSFT
November 12th, 2009 6:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics