Page 1 of 1

Wireless Bridge, can't get IP address

Posted: Mon May 09, 2016 2:00 pm
by pueo
Hi, I am trying to set up my Netgear WNDR4300 (v1) as a wireless repeater/bridge. However I can't seem to connect to the internet or even to my primary router - when I attach a computer to the Gargoyle router (wired connection), it can't get a DHCP address. Here are my settings:

Image

192.168.1.1 is my primary router's IP. It only allocates DHCP addresses up to ...1.100, so giving the WNDR4300 the .101 IP should be legit, right? I want to keep the bridged devices on the same subnet. I'm assuming this is possible? Please let me know if I've misunderstood this. I did something similar using DD-WRT a while ago ("repeater bridge").

I've tried this using 1.8.1, 1.9.0 and even 1.9.X.
Thanks in advance for your help! :D

Re: Wireless Bridge, can't get IP address

Posted: Mon May 09, 2016 2:22 pm
by pueo
Well setting my Gargoyle's IP to 192.168.1.99 gave me net access! :)
Although when I look at my main router's DHCP page, I only see the Gargoyle, not the computer attached to it (which supposedly is at 192.168.1.11). How can I check if I'm on the same subnet?

Thanks again.

Re: Wireless Bridge, can't get IP address

Posted: Mon May 09, 2016 4:37 pm
by Lantis
Under 1.9.x you need to put the client gargoyle on a different subnet e.g. 192.168.2.1. This is different to previous versions.
The client devices will still be on the main routers subnet.

But it sounds like you got it sorted anyway.

Re: Wireless Bridge, can't get IP address

Posted: Mon May 09, 2016 7:17 pm
by pueo
Lantis wrote:Under 1.9.x you need to put the client gargoyle on a different subnet e.g. 192.168.2.1. This is different to previous versions.
Ah, so I wasn't going mad! :shock: Thanks Lantis. I thought it was a typo that had crept in between versions. What was the thinking behind this and where can I read more about it? I'm assuming it's a change that came out of OpenWRT...
Lantis wrote:The client devices will still be on the main routers subnet.
So then why set the Gargoyle to an IP outside of this subnet??

Re: Wireless Bridge, can't get IP address

Posted: Mon May 09, 2016 7:41 pm
by Lantis
I switched the bridge mode to use a pseudobridge relay. It is more reliable and relies on less modules.

This wiki doc explains it
https://wiki.openwrt.org/doc/recipes/relayclient

In particular, the first image is particularly enlightening.
I believe the reason is that the device needs a different subnet, and it just passes (relays) DHCP and other traffic between the two subnets, effectively joining them.
Because the DHCP requests get through, the devices get IP addresses in the subnet we wanted.

I'm not great at explaining it sorry!

Re: Wireless Bridge, can't get IP address

Posted: Wed May 11, 2016 4:50 pm
by pueo
Lantis wrote:I switched the bridge mode to use a pseudobridge relay. It is more reliable and relies on less modules.

This wiki doc explains it
https://wiki.openwrt.org/doc/recipes/relayclient

In particular, the first image is particularly enlightening.
Thanks Lantis, that explains it!
Was the old pre-1.9 way so bad? I am in the process of trying them both (want to compare speeds). However, I can no longer access my Gargoyle router at 192.168.2.1 (which is what its IP was set to in 1.9.X). I can log into my main router at 192.168.1.1 as expected. I tried switching my IP to a manual IP address, but 192.168.2.1 still doesn't get me to the Gargoyle page. Can you help?? :shock:

Thanks...

Re: Wireless Bridge, can't get IP address

Posted: Wed May 11, 2016 6:51 pm
by Lantis
It wasn't "bad", however this is better in my opinion. And seeing as how I was already rewriting the code in an adjacent section I decided to keep going.

Once the bridge is up and running it will no longer respond on the other subnet. I wrote some code to map it to the DHCP address that it receives from the main router.
So if you log into the main router and find out what address it has, then you can get back in :)


If the bridge ever goes down, you can then set a manual IP and access it again. Failing that, a manual IP address and then a reboot of the router will get you back in every time.

Re: Wireless Bridge, can't get IP address

Posted: Thu May 12, 2016 3:47 pm
by pueo
Lantis wrote:It wasn't "bad", however this is better in my opinion. And seeing as how I was already rewriting the code in an adjacent section I decided to keep going.
That's great! I know from experience how good it feels when you complete a rewrite of your code and it actually works like it was meant to ;)

Interestingly enough I'm seeing slightly faster speeds in 1.8.1 than 1.9.X (just a few Mb/s), although I realize that might be particular to my setup and my apartment. I also find the bridge is slightly faster in 2.4 GHz than 5 GHz, which surprised me!
Lantis wrote:Once the bridge is up and running it will no longer respond on the other subnet. I wrote some code to map it to the DHCP address that it receives from the main router.
So if you log into the main router and find out what address it has, then you can get back in :)
Thanks. Unfortunately my #1 router (Netgear R6400) never showed my Gargoyle router in its "attached devices". So after some random guesswork (during which I also discovered my Denon receiver has a web interface - who knew!) I ran a traceroute 192.168.1.1 command on the device behind the bridge. That showed the IP of my Gargoyle as the first hop. Bingo :D