Question : concurrent connection to Wireless / WiFi & wired LAN : difference between Windows route add , Unix route add & Cisco ip route

I have a laptop which is connected to the wired LAN but whenever I wanted
to use WiFi, I have to detach the wired LAN &  otherwise the WiFi signal
will affected / dropped.  Looks like at any one time only one can be used.

I want to have both connections on at the same time & found the following
thread in EE about tweaking the routing table to enable this:
(I suppose from the article below, since the wired LAN is only for access to a few
 private internal subnets while the WiFi is for numerous subnets access, I should
 set a static route for the wired LAN & a default gateway for the WiFi) :


> XP itself allows you to use wireless and wired connections simultaneously. Are the connections
> physically dropping or is it that you cannot access one  network once connecting to the other
> network? When you are connected to two networks on separate network adapters, you should
> ensure only one adapter has a default gateway or your laptop will get confused where to route
> unknown networks.

> On your wired LAN connection with the static address, remove the gateway.

> Then add a persistent static route for your wired LAN at Windows prompt
>   Start--> Run --> CMD
>   route ADD 172.16.2.0 MASK 255.255.255.0  172.16.13.254 -P
>                              ^destination network                    ^ next hop address (gateway)

Problem is the above "route add ..." command fails with the error message below where
172.16.13.254 is the next hope gateway for my wired LAN's subnet:
    The route addition failed: Either the interface index is wrong or the gateway
    does not lie on the same network as the interface. Check the IP Address Table
    for the machine.


However, if I use the IP addr of the wired NIC as gateway in the "route add..." command
as follows, Windows allows me to add, ie :
  route add 172.16.2.0 MASK 255.255.255.0 172.16.13.184 -P

But the above static/persistent route does not help me gain access to a svr
 on the 172.16.2.0 subnet, eg I'm trying ssh to 172.16.2.6.  The moment
I set the default gateway as 172.16.13.254 on the wired LAN NIC, ssh
access to 172.16.2.6 (or 172.16.2.0/24 subnet) works.


So I believe the reason why my laptop can't access the wired private LAN &
WiFi together at the same time because the type of "static routes" or persistent
route that are seen in Unix or Cisco router ( ie whereby the next hop default
gateway is used in static routes) are not permitted in Windows XP

Below is the routing table from "route print" command :
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.205.1  192.168.207.172      25
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
      169.254.0.0      255.255.0.0  192.168.207.172  192.168.207.172      20
       172.16.0.0      255.255.0.0    172.16.13.184   172.16.13.184       20
    172.16.13.184  255.255.255.255        127.0.0.1       127.0.0.1       20
   172.16.255.255  255.255.255.255    172.16.13.184   172.16.13.184       20
    192.168.205.0    255.255.252.0  192.168.207.172  192.168.207.172      25
  192.168.207.172  255.255.255.255        127.0.0.1       127.0.0.1       25
  192.168.207.255  255.255.255.255  192.168.207.172  192.168.207.172      25
        224.0.0.0        240.0.0.0    172.16.13.184   172.16.13.184       20
        224.0.0.0        240.0.0.0  192.168.207.172  192.168.207.172      25
  255.255.255.255  255.255.255.255    172.16.13.184   172.16.13.184       1
  255.255.255.255  255.255.255.255    172.16.13.184           20005       1
  255.255.255.255  255.255.255.255  192.168.207.172  192.168.207.172      1
Default Gateway:     192.168.205.1
===========================================================================
Persistent Routes:
  None

What I can't figure out was :
if I use a Unix box instead of my Win XP PC, I'm able to add the
static (ie Persistent route in Windows) route as follows :
  route add 172.16.2.0 mask 255.255.255.0 172.16.13.254
but the above command (with -P at the end) won't be accepted
in Windows.


So anyone has any suggestions to enable my laptop to be able
to access the wired private LAN & the WiFi at the same time


Answer : concurrent connection to Wireless / WiFi & wired LAN : difference between Windows route add , Unix route add & Cisco ip route

The solution is fairly simple... for every network/host you want to access through the wired or wireless LAN, you will have to add a static route pointed to the respective gateway of the connection through which you want the traffic to go through.

The only thing left to choose is traffic that needs to take a default gateway. You can only have one default gateway if your wired/wireless connections are on two different networks. If you're using DHCP, the default gateway will be chosen for you, unless you use static IPs and configure the default gateway manually.

Oh, and if you want to make a static route persistent in Windows, it's -p (Lowercase P)

Random Solutions  
 
programming4us programming4us