Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a OpenWRT router upstairs that I want to use as a bridge. I googled a lot and so far this is what my network config is looking like...

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.3'
        option gateway '192.168.1.1'

config interface 'wan'
        option ifname 'eth0.2'
        option _orig_ifname 'eth0.2'
        option _orig_bridge 'false'
        option proto 'dhcp'

config switch
        option reset '1'
        option enable_vlan '1'
        option name 'switch0'

config switch_vlan
        option vlan '1'
        option ports '1 2 3 4 5t'
        option device 'switch0'

config switch_vlan
        option vlan '2'
        option ports '0 5t'
        option device 'switch0'

It's working fine but the problem is I have to plug in the "wan" cable into a LAN port. This means I have only 3 ports to use, instead of 4. I know the problem is in my configuration but I am not sure how to solve it. From what I have understood after reading around is that I need to I need to bridge the wan port and the lan ports. Would I do this by setting the option type under WAN to bridge? I usually get through these things by trial and error but I dont want to break my router.

share|improve this question
    
It is not clear what you mean by bridge. 1) Should the router act as a router, i.e., create a subnet separate from the one it is connecting to? 2) How will the router connect to the network, via ethernet or wireless? –  MariusMatutiae Jan 2 at 7:27

1 Answer 1

up vote 0 down vote accepted

From your description it sounds like you don't actually want a WAN port, you want the WAN port to act "just like another LAN port".

If this is the case, the simplest solution would be to change the first "config switch_vlan" ports option to "0 1 2 3 4 5t" and the second one to just "5t". This will bridge the WAN and LAN ports making them all work identically, and the device acting more like a switch then a router. This will have the affect of converting the WAN port to another LAN port - it will still leave the logic for a WAN port, but the physical WAN port won't be there. (The wan port is, from my configs on a same router, port 0)

(If its not the case, please clarify your network setup, what works and what doesn't so I can better understand the issue).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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