Lets call my home router 'HomeAP' and the network brdge (OpenWRT) in the far end of the building as 'Repeater' connected via wifi. Both have different SSID and my rPi is connected to the Repeater via ethernet cable. Although the wifi signal from HomeAP is a lot stronger, i am able to connect to both SSIDs where i usually have to connect to Repeater in order to interact with the rPi via SSH. Due to the weak signal, the connection is usually slow and get disconnected fairly often which can be really annoying.

MyComputer >>(wlan0)>> HomeAP >>(wifi/bridge)>> Repeater >>(eth0/LAN)>> Raspberry Pi

I am running Debian on my computer and the rPi is on Raspbian while HomeAP is on stock (busybox) firmware. At the moment i need to disconnect myself from HomeAP and connect to Repeater wifi in order to SSH into rPi. Hopefully i can improve this experience and be firmly connected to the Raspberry Pi.
How can i connect to the rPi that is located between 2 routers from or through HomeAP (better stabled connection from stronger wifi signal) and if there is any better configuration that i should look up into?

  • Sounds like HomeAP and Repeater have address in different ranges. Can you confirm? It would be best if HomeAP had something like and Repeater had something like This way, all computers are in same network range 192.168.1.x and can communicate with each other. I suspect currently they have two different ranges, or you may need to forward port 22 on your repeater. – geoffmcc Jan 26 '15 at 19:12
  • Also, make sure if your using dhcp to assign ip on Repeater, it too is assigning addresses in same range. So using my above examples, dhcp on Repeater should be set to assign in the 192.168.1.x range. – geoffmcc Jan 26 '15 at 19:22
  • yes that is correct when i am connected to HomeAP where the IP is the IP for Repeater is set to However, when i connect to Repeater its IP is (Repeater) – harayz Jan 26 '15 at 19:23
  • There is your problem. Repeater gives pi an ip address in different range. I wrote up an answer. – geoffmcc Jan 26 '15 at 19:36

Your repeater needs to assign addresses in the same range. Go to router to setup, you should be familiar if you made it this far.

I would set dhcp to assign and up on Repeater, just to be sure it don't assign same ip twice once on HomeAP and once on Repeater (but I don't think it would anyways), just a precaution.

You may also get away with forwarding port 22 on the Repeater to the Pi address and then just ssh in with


And it just might forward it to the pi

Were it me though, I would just update dhcp so all devices are in same range, so they can all talk to each other.

Edit: just to be clear, your HomeAP is probably assigning addresses with dhcp starting at

So if you set your repeater to assign starting at

Anything on HomeAP will have address ending in 100 range whereas anything connected to Repeater will have an address ending in 200 range.

You probably want your pi to have a static address though, but still setup the Repeater dhcp as instructed

| improve this answer | |

Depending on how HomeAP communicates with Repeater (if so), you might consider using only 1 DHCP server. Connecting the 2 devices together could be the best solution if it's possible to do so. Doing that you can use only 1 SSID and wireless connection should (or may) switch automatically.

Also, if SSH connection through internet is an option for you, it could be an easy workaround.

| improve this answer | |

Given that you gave your rPi a name you could simply use the name. For example, if the rPi is connected for sure to your network then it is simply ssh pi@raspberry.local That should work in that configuration.

I have the same setup at home where I have a repeater and the rPi connected to the router and sits far. I just use ssh pi@raspberry-pi.local and provide a password then smooth as butter.

To set a name to your pi you could always visit sudo raspi-config

Hope that helps.

| improve this answer | |

It sounds to me that you are confused by some networking equipment.

A repeater is not connected to Ethernet and just rebroadcasts a Wi-Fi signal it can receive. It is a layer 2 device and doesn't have anything to do with layer 3 or higher. It does usually have an IP address (layer 3) so you can configure it in a web interface.

It seems like you are using this device as some kind of wireless bridge (opposite of an access point). It picks up a wireless signal and you connect to it via Ethernet (as in the scheme with the >> ). Still, this should be a layer 2 device and it shouldn't mess with IP unless for configuration.

I suggest you verify the configuration of your wireless bridge. More information about this setup in OpenWRT can be found at http://wiki.openwrt.org/doc/recipes/bridgedclient

It is generally a bad practice to have multiple DHCP servers in a small network.

Also, make sure your Raspberry Pi has a static IP address. An example of this configuration (in /etc/network/interfaces):

auto eth0
iface eth0 inet static
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.