OpenWrt Forum Archive

Topic: How to set up WL500gP as secondary router on 8.09.1?

The content of this topic has been archived on 13 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Greetings to everyone! I'm getting desperate, so any help would be truly appreciated... Here's my situation:

Internet -> Router #1 (not OpenWRT-based) -> WL500gP

I would love to get this setup working. Router #1 was provided by ISP and cannot be moved or removed from the 'scheme' (has to remain as 'primary' internet router). I very much like WL500gP and managed to set up stuff that can't move over to Router #1 (USB HDD and stuff like samba, mediaserver, torrent client). Having said that, I'm looking into how to set up WL500gP so the overall combination works.

I understand I may need to do some port forwarding on Router #1 and that should not be a problem. What I'm not sure about is how to set up both WAN and LAN side of WL500gP IP-wise; it doesn't matter if WAN will be set up as static or DHCP-provided.

LAN setup of Router #1 is 192.168.1.1/24, with running DHCP server assigning addresses from range 192.168.1.10-192.168.1.29. I've googled quite a bit, and tried multiple ways of setting things up, but never got WL500gP to get through to the Internet; attempts usually ended up with a need to boot WL500gP into failsafe, restore network settings to something usual and start over. Some posts I've found suggested I don't use WAN port of WL500gP at all, but I wasn't sure if that's the right way to go - I don't mind as long as I can get a working connection b/w WL500gP and Internet.

Can anyone help please? Thanks a bunch...

M.

Are Router #1 and WL500gP connected with a cable?

Edit:
I assume they are.

Try the following:

- revert the configuration to defaults
- attach one of the lan ports of router #1 to one of the *lan* ports of wl500gp
- assign a fixed ip from the 192.168.1.0/24 range to the wl500gp lan (maybe outside of the dhcp range, like 192.168.1.200 or so)
- set the gateway to the router #1 lan ip on the wl500gp lan
- disable dhcp on the wl500gp by removing all interface sections in the dhcp configuration
- set the forward policy to ACCEPT on lan in the wl500gp firewall configuration (or disable the firewall entirely, not really needed)
- optionally resolve the wan port on the wl500gp by removing the wan interface section from the network config and put the port into the lan vlan

This way the WL500GP will act as a managed switch with wireless bridged to it.
- DHCP remains on router #1
- Wlan clients on WL500GP are forwarded to Router #1
- All five ethernet ports on the WL500GP are usable as LAN

HTH,
JoW

(Last edited by jow on 16 Sep 2009, 13:35)

Yes, I would not go into WiFi 'bridging' between the two.

Is this a Premium v1? Using brcm47xx (2.6 kernel) or brcm-2.4? You like to use the WAS port as a LAN port, correct?

See my edit above.

Shucks, I meant to mention that in the original post smile This is v1, running on 2.6 kernel with Broadcomm replaced by Atheros. The intent is to connect the two via ethernet cable. I don't need to use WAN on WL500gP as additional LAN port - can't tell whether it's easier (or even possible) to connect the two routers by merely using LAN-LAN ports (I obviously have to use LAN port on Router #1 side).

Thank you very much - we're getting somewhere! I have posted what I did directly under your bullets...

jow wrote:

- revert the configuration to defaults

DONE

jow wrote:

- attach one of the lan ports of router #1 to one of the *lan* ports of wl500gp

DONE

jow wrote:

- assign a fixed ip from the 192.168.1.0/24 range to the wl500gp lan (maybe outside of the dhcp range, like 192.168.1.200 or so)

DONE (192.168.1.100 FWIW)

jow wrote:

- set the gateway to the router #1 lan ip on the wl500gp lan

Here's what I did for this one:

root@OpenWrt:/etc/config# cat network
#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.100
        option netmask  255.255.255.0
        option gateway  192.168.1.1


#### WAN configuration
#config interface       wan
#       option ifname   "eth0.1"
#       option proto    dhcp
#       option proto    pppoe
#       option username not_important_anymore
#       option password not_important_anymore
jow wrote:

- disable dhcp on the wl500gp by removing all interface sections in the dhcp configuration

Hopefully done, here's current dhcp config:

root@OpenWrt:/etc/config# cat dhcp
config dnsmasq
        option domainneeded     1
        option boguspriv        1
        option filterwin2k      '0'  #enable for dial on demand
        option localise_queries 1
        option local    '/lan/'
        option domain   'lan'
        option expandhosts      1
        option nonegcache       0
        option authoritative    1
        option readethers       1
        option leasefile        '/tmp/dhcp.leases'
        option resolvfile       '/tmp/resolv.conf.auto'
        #list server            '/mycompany.local/1.2.3.4'
        #option nonwildcard     0
        #list interface         br-lan

#config dhcp lan
#       option interface        lan
#       option start    120
#       option limit    130
#       option leasetime        12h

#config dhcp wan
#       option interface        wan
#       option ignore   1
jow wrote:

- set the forward policy to ACCEPT on lan in the wl500gp firewall configuration (or disable the firewall entirely, not really needed)

For now, I went with manual

/etc/rc.d/firewall stop
jow wrote:

- optionally resolve the wan port on the wl500gp by removing the wan interface section from the network config and put the port into the lan vlan

I didn't touch this one so far.

Now... It appears that WL500gP can get to the outside world, which is great! The only piece I need to figure out is how to get DNS to work - I can ping IPs, but can't ping hostnames directly. Do I need to tackle any of dnsmasq options in dhcp config?

Regardless, Thank You very much, you've already been a great help!

miles wrote:

For now, I went with manual

/etc/rc.d/firewall stop

Run

/etc/init.d/firewall disable

to make it persistent.

miles wrote:

Now... It appears that WL500gP can get to the outside world, which is great! The only piece I need to figure out is how to get DNS to work - I can ping IPs, but can't ping hostnames directly. Do I need to tackle any of dnsmasq options in dhcp config?

No, adding

option dns 192.168.1.1

to the lan config should be enough.

Thank you very much, that did the trick :-)

Best regards,

M.

The discussion might have continued from here.