Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have this network configuration at home:

3G Wifi router - for access to internet, 192.168.1.0 subnet

Router TP-Link TL-WR1043ND - OpenWRT (12.09), 192.168.2.0 subnet, connected wirelessly via "bridged client" to the 3G WiFi router, to get internet access.

Some Zyxel router - stock firmware, 10.0.0.0 subnet

Main network I need is 192.168.2.0 on the TP-Link router. But, I need also access to few devices connected to the Zyxel network (10.0.0.0). For example, there is a RaspberryPi connected, I need access to it. I can't change subnets to the same subnet, I can't move Raspberry to 192.168.2.0. I can modify configuration on Zyxel network and I can connect the Zyxel network to TP-Link network via cable. So I did so.

Then, I created two VLANs and two firewall zones on my TP-Link router and google it a lot how to configure it correctly. Not a much luck so far unfortunately. The Zyxel network get assigned IP in its VLAN on TP-Link router, from range 10.0.0.0, I can pign that from TP-Link network clients, but nothing else. I tried static routes, traffic forwarding between these two vlans is enabled, but still it doesn't work.

Could you help me please? I'm lost now :(

TP-Link /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' # TP-Link network
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.2.1'
        option gateway '192.168.2.1'
        option _orig_ifname 'eth0.1'
        option _orig_bridge 'true'
        option ifname 'eth0.1'

config interface 'wan'
        option proto 'dhcp'

config switch
        option name 'rtl8366rb'
        option reset '1'
        option enable_vlan '1'
        option enable_vlan4k '1'

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

config switch_vlan
        option device 'rtl8366rb'
        option vlan '2'
        option ports '4 5t'

config interface 'o2' # Zywel network
        option _orig_ifname 'eth0.2'
        option _orig_bridge 'true'
        option ifname 'eth0.2'
        option proto 'static'
        option ipaddr '10.0.0.9'
        option netmask '255.255.255.0'
        option gateway '10.0.0.9'

config route # static route to Raspberry connected in Zyxel network
        option target '10.0.0.5'
        option netmask '255.255.255.0'
        option gateway '10.0.0.9'
        option interface 'o2'

TP-Link /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'DROP'
        option output 'ACCEPT'
        option forward 'DROP'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'DROP'
        option network 'lan'

config zone
        option name 'o2'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'DROP'
        option network 'o2'

config zone
        option name 'wan'
        option output 'ACCEPT'
        option masq '1'
        option mtu_fix '1'
        option network 'wan'
        option input 'DROP'
        option forward 'DROP'

config forwarding
        option src 'o2'
        option dest 'wan'

config forwarding
        option dest 'o2'
        option src 'lan'

config forwarding
        option dest 'wan'
        option src 'lan'

config forwarding
        option dest 'lan'
        option src 'o2'

TP-Link /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '6'
        option macaddr 'a0:f3:c1:5b:cc:98'
        option hwmode '11ng'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'DSSS_CCK-40'
        option country 'CZ'
        option txpower '20'

config wifi-iface
        option device 'radio0'
        option network 'wan'
        option ssid '3g_wifi'
        option encryption 'psk2'
        option mode 'sta'
        option key '****'

config wifi-iface
        option device 'radio0'
        option mode 'ap'
        option ssid 'tplink-wifi'
        option encryption 'psk2'
        option key '****'
share|improve this question
    
Did you also configure routing on RaspberryPi so that it could reach your 192.168.2.x network via 10.0.0.9? Alternatively, if you cannot or do not want to reconfigure anything on that network, you can enable the masq option for the o2 zone (and copy other parameters from the wan zone), so that all your traffic to that net will come from 10.0.0.9. –  Sergey Vlasov May 4 '13 at 15:59

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.