Solved

Simultaneous connection to Wireless / WiFi & wired LAN

Posted on 2010-08-19
13
1,315 Views
Last Modified: 2012-06-27


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.1.0 MASK 255.255.255.0  172.16.13.254 -P
>                              ^destination network                    ^ next hop address (gateway)

> So default gateway have to be substituted with static route (ie persistent route) on the
> wired LAN.  WiFi side (ie WiFi gateway) can't be amended as need to access Internet
> which is a whole lot of subnets out there


Problem is, I'm not able to add the persistent static routes after removing the default
gateway on the wired LAN, regardless of whether I used Class B or C masks :

So how do I fix this to enable simultaneous access.  In the routing tables & "route add"
screen shots below, 192.168.x.y is the WiFi subnets while 172.16.a.b is the wired
private LAN subnets (addresses below sanitized) :




O:\>route add 172.16.0.0 MASK 255.255.0.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.

O:\>route add 172.16.13.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.

O:\>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.


O:\>route add 172.16.0.0 MASK 255.255.0.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.

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
    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  192.168.207.172  192.168.207.172      25
  255.255.255.255  255.255.255.255  192.168.207.172  192.168.207.172      1
  255.255.255.255  255.255.255.255  192.168.207.172               3       1
  255.255.255.255  255.255.255.255  192.168.207.172           20005       1
Default Gateway:     192.168.205.1
===========================================================================
Persistent Routes:
  None



===========================================================================
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


When cable connected & mask is 255.255.255.0 :

===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    172.16.13.254   172.16.13.184       1
          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.13.0    255.255.255.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:     172.16.13.254
===========================================================================
Persistent Routes:
  None
0
Comment
Question by:sunhux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 4
13 Comments
 
LVL 5

Accepted Solution

by:
stermeau earned 500 total points
ID: 33473621
What is your ip on the wired lan?
I guess it is : 172.16.13.184
You can try to do :
  route add 172.16.0.0 MASK 255.255.0.0 172.16.13.184 -P

Or you can also use the interface number
  route add 172.16.0.0 MASK 255.255.0.0 IF 1 -P
0
 

Author Comment

by:sunhux
ID: 33473932

> route add 172.16.0.0 MASK 255.255.0.0 172.16.13.184 -P
Yes, the above works, only after I've connected up the wired LAN cable;
if the cable is not connected, it will give the error below :

C:\> route add 172.16.0.0 MASK 255.255.0.0 172.16.13.184 -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.

========= connect up cable ===========
C:\> route add 172.16.0.0 MASK 255.255.0.0 172.16.13.184 -P


But it looks like adding the entire subnet of Class B is not good because I'm not able
to ssh to say 172.16.3.5

The routing table now looks as follows :
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       1
      172.16.13.0    255.255.255.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           30005       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:
  Network Address          Netmask  Gateway Address  Metric
       172.16.0.0      255.255.0.0    172.16.13.184       1



Assuming I have only a handful of Class C subnets, can you give me the exact
"route add" command to add them in (with the persistent static routes must take
precedent before the default gateway, ie after all static routes can't route, then
only last resort is to route through default gateway) :
172.16.10.x
172.16.20.x
172.16.22.x
172.16.4.x
172.16.1.x
172.16.2.x
172.16.16.x
172.16.8.x
172.16.11.x
172.16.14.x
0
 

Author Comment

by:sunhux
ID: 33473954

One more question:

by "persistent", does it mean after reboot, those static routes will stay?
If not, will need to place all the "route add ....." commands into a script to run each time
after reboot
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:sunhux
ID: 33474004

Ok, I've made an attempt & yes 172.16.13.184 is my wired LAN's IP addr.





d:\>route delete 172.16.0.0 MASK 255.255.0.0 172.16.13.184 -P
d:\>route add 172.16.2.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.1.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.10.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.20.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.22.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.14.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.16.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.12.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.4.0 MASK 255.255.255.0 172.16.13.184 -P
d:\>route add 172.16.11.0 MASK 255.255.255.0 172.16.13.184 -P

Now the routing table looks as follows but I still have no luck
accessing (ie ssh) to say, 172.16.2.6

d:\> route print
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.1.0    255.255.255.0    172.16.13.184   172.16.13.184       1
       172.16.2.0    255.255.255.0    172.16.13.184   172.16.13.184       1
       172.16.4.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.10.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.11.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.12.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.14.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.16.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.20.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.22.0    255.255.255.0    172.16.13.184   172.16.13.184       1
      172.16.13.0    255.255.255.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           30005       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:
  Network Address          Netmask  Gateway Address  Metric
       172.16.2.0    255.255.255.0    172.16.13.184       1
       172.16.1.0    255.255.255.0    172.16.13.184       1
      172.16.10.0    255.255.255.0    172.16.13.184       1
      172.16.20.0    255.255.255.0    172.16.13.184       1
      172.16.22.0    255.255.255.0    172.16.13.184       1
      172.16.14.0    255.255.255.0    172.16.13.184       1
      172.16.16.0    255.255.255.0    172.16.13.184       1
      172.16.12.0    255.255.255.0    172.16.13.184       1
       172.16.4.0    255.255.255.0    172.16.13.184       1
      172.16.11.0    255.255.255.0    172.16.13.184       1
0
 
LVL 5

Assisted Solution

by:stermeau
stermeau earned 500 total points
ID: 33474012
Yes persistent means they will still be there after a reboot.
For the extra routes, use the same command, just replace by:
 172.16.X.0 MASK 255.255.255.0 ( where is is 10,20,22 etc ...)
0
 
LVL 5

Assisted Solution

by:stermeau
stermeau earned 500 total points
ID: 33474059
Well, that looks good.
Isn't it what you were looking for?
0
 

Author Comment

by:sunhux
ID: 33476815

Yes, I certainly want to routes to be still around after reboot.

Theoretically the Persistent static routes last shown from "route print" above
is what I wanted, but I'm curios, why I'm unable to "ssh" from my laptop to
say a 172.16.2.6 server with the persistent static routes below.

The moment I set my wired LAN's gateway address (ie 172.16.13.254),
I was able to ssh from my laptop to the very same 172.16.2.6 server.
Would tweaking the "Metric" value in the routes help?


Persistent Routes (from the last post above):
  Network Address          Netmask  Gateway Address  Metric
       172.16.2.0    255.255.255.0    172.16.13.184       1
       172.16.1.0    255.255.255.0    172.16.13.184       1
      172.16.10.0    255.255.255.0    172.16.13.184       1
      172.16.20.0    255.255.255.0    172.16.13.184       1
      172.16.22.0    255.255.255.0    172.16.13.184       1
      172.16.14.0    255.255.255.0    172.16.13.184       1
      172.16.16.0    255.255.255.0    172.16.13.184       1
      172.16.12.0    255.255.255.0    172.16.13.184       1
       172.16.4.0    255.255.255.0    172.16.13.184       1
      172.16.11.0    255.255.255.0    172.16.13.184       1
0
 
LVL 5

Assisted Solution

by:stermeau
stermeau earned 500 total points
ID: 33482513
You need to define a default GW in order for your computer to send packages to it when it does not know where the real destination is (not in the same lan).
The metrics are used  to "order rules" it is like a weight.
0
 

Author Comment

by:sunhux
ID: 33482569

There's certainly a default gateway but it's for the WiFi interface / NIC;
as what the other EE thread mentions, if I have two default gateways
(ie one for wired LAN & one for WiFi), then the computer will be confused.

If I defined a default gateway for the wired LAN, I will lose the WiFi
connection.  So what do I do to get both connections simultaneously?
Looks like the suggestion from the other EE thread did not work
0
 

Author Comment

by:sunhux
ID: 33486385


In case there's confusion, just to summarize my requirements :
if I'm trying to access 172.16.x.y, then it should go thru the wired LAN &
if I'm trying to access any other subnets, then it should go thru the WiFi

With both the WiFi & wired LANs connected at the same time, I need to
be able to access both the Wifi side as well as the internal private LAN
side
0
 

Author Comment

by:sunhux
ID: 33486528

Or should I enable Windows ICS besides the Persistent static routes?
Refer to attached screen & if so, which options should I enable/select
ICSRoutescrdmp.jpg
0
 

Author Comment

by:sunhux
ID: 33486601

This link below describes quite well what I wanted & someone in that link/thread
mentioned about using "net change" but I don't think there's such a command at
Windows command prompt :

http://www.astahost.com/info.php/connect-wireless-wired-line_t12871.html
0
 

Author Comment

by:sunhux
ID: 33487251

In Unix, this is called "multi-homing" but the attempts I've made earlier (ie adding
Persistent static routes) did not help enable "multi-homing" so far on my Win XP
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
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…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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). …
Suggested Courses
Course of the Month5 days, 19 hours left to enroll

627 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