OpenWrt Forum Archive

Topic: TP-Link TL-WR1043N multiple subnet question

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

Hi,

I'm new to OPENWRT and just recently installed on my TL-WR1043N.
Everything seems to run fine and I would like to take my setup one step further.
I'm not really knowledgeable about VLANs, but I think this could help achieve my desired setup.

Here's my /etc/config/network:

root@OpenWrt:/etc/config# cat 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 ipaddr '192.168.1.1'
    option netmask '255.255.255.0'

config interface 'wan'
    option ifname 'eth0.2'
    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 '0 5t'

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

           
I've managed to isolate port4 (it does not get a IP address from dhcp anymore).

My question is:
- how do I need to edit my config file in order for port4 to still 'see' the WAN?
- can port 4 or for that matter a VLAN have a 2nd dhcp server running?
- Is it possible to configure openwrt so that I can allow 'specific' ip addresses from LAN1 to talk to LAN2 and vice versa?
- Is there some tutorial or example config that would +- match my situation?

Thanks a lot for your help!

Erwin

PS: is there a way to post screenshots or asci text to illustrate network layout?

http://wiki.openwrt.org/doc/uci/network/switch

- how do I need to edit my config file in order for port4 to still 'see' the WAN?
maybe put them on the same vlan
config switch_vlan
    option device 'rtl8366rb'
    option vlan '2'
    option ports '0 4 5t'
- can port 4 or for that matter a VLAN have a 2nd dhcp server running?
yes
/etc/config/dhcp
- Is it possible to configure openwrt so that I can allow 'specific' ip addresses from LAN1 to talk to LAN2 and vice versa?
called routing ?

- Is there some tutorial or example config that would +- match my situation?
crawl the wiki there are many useful information about firewall and routing in openwrt .

whatever comes to your mind type in google add a openwrt at the end hit enter Njoy the magic

BTW
config switch_vlan
    option device 'rtl8366rb'
    option vlan '3'
    option ports '4t 5t'
This makes the switch port to send tagged packets on port 4 if you want to simply connect it to other switches/devices delete the t after for ( which tells the switch to tag the packets going out from port 4).

(Last edited by ashkanull on 30 Nov 2012, 20:59)

The discussion might have continued from here.