3

Setup:

I have two computers, both with an ethernet and wireless interface.

I have router A that is connected to the internet.

I have a router B that is not connected to the internet.

I would like to connect both computers to router A wirelessly, and both computers to router B ethernetly.

Problem:

If I connect a computer to router A and router B at the same time, I no longer have internet access through router A.

Reason:

File transfers between my two computers using router A is very slow, because wireless is terrible. If I could connect both computers to the internet through router A, and both computers to each other through router B, then I could speed up file transfers between them whilst still being able to access the internet.

To my intense irritation, connecting ethernetly to a router that has internet access is not an option.

Additional info:

After connecting to routers A and B:

alyx@shire ~> route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         BTBusinessHub.h 0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
192.168.1.0     *               255.255.255.0   U     9      0        0 wlan0

I found a previous question that seems to pose the same problem (How to set up dual wired and wireless connections?), and followed the given answer. It did not work, and I still could not connect to the internet through router A. 'route' output changed to the following:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
192.168.1.0     *               255.255.255.0   U     9      0        0 wlan0

1 Answers1

1

problem persist because you have the same network on both router and probably the same gateway. Change on one router configuration for lan network ex: router A lan: 192.168.2.0/24.

                                | internet
                         --------------
      |----------------- |  router A  |--------------|
      |                  --------------              |
      |                                              |
      |                 192.168.1.0/24               |
      |                                              |
ip:192.168.1.5                                 ip:192.168.1.6
  ----------                                     ----------
  |  pc 1  |                                     |  pc 2  |
  ----------                                     ----------
ip:192.168.2.5                                 ip:192.168.2.6
      |                                              |
      |                                              |
      |                192.168.2.0/24                |
      |                                              |
      |                 --------------               |
      |-----------------|  router B  |---------------|
                        --------------
                               | internet

Config example:

pc1

eth0    ip: 192.168.1.5
        nm: 255.255.255.0
        gw: 192.168.1.1

wles0   ip: 192.168.2.5
        nm: 255.255.255.0
        gw: 192.168.2.1

pc2

eth0    ip: 192.168.1.6
        nm: 255.255.255.0
        gw: 192.168.1.1

wles0   ip: 192.168.2.6
        nm: 255.255.255.0
        gw: 192.168.2.1


router A 

lan     ip: 192.168.1.1
        nm: 255.255.255.0

router B

lan     ip: 192.168.2.1
        nm: 255.255.255.0

On this way you can control path from pc1 to pc2.

Example: If you wish t access from pc1 to pc2 through router A simple access to ip: 192.168.1.6. If you wish access from pc2 to pc1 through router B hit to ip: 192.168.2.5.

Access to internet you can control with route

ip route add default gw 192.168.1.1 - for router A
ip route add default gw 192.168.2.1 - for router B

Or simple, do not use default gw on network card on with you wish to avoid access to internet.

2707974
  • 10,758