Solved

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

Posted on 2010-08-24
3
1,715 Views
Last Modified: 2012-05-10
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


0
Comment
Question by:sunhux
3 Comments
 
LVL 15

Assisted Solution

by:greg ward
greg ward earned 150 total points
ID: 33513210
You need to put the ip address of a device on the same subnet as the network adapter.
And dont use -p until you have worked out the route is right!
route print to see hwat the table looks like.
 
Greg
0
 
LVL 4

Accepted Solution

by:
Dave773 earned 350 total points
ID: 33513339
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)
 
0
 

Author Comment

by:sunhux
ID: 33518753
Hi Dave,

Ok, I've just found out that before I can add a static route for the wired LAN/subnet,
the cable needs to be plugged into the wired LAN port first, otherwise I would get the
error below:

  c:\>route add 172.16.1.0 MASK 255.255.255.0 172.16.13.254 -p
The route addition failed: Either the interface index is wrong or the gateway do
es not lie on the same network as the interface. Check the IP Address Table for
the machine.



Hi Greg

The "route print" has been given earlier in the 1st post,
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to configure AT&T Netgate with Sonicwall Firewall 24 75
Viber-Only Restriction 6 57
ospf neighbors not coming up 6 59
Cisco 3560 Switch with Multiple Gateways 10 73
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question