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,682 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:deepdraw
deepdraw 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now