OpenWrt Forum Archive

Topic: Need help with VLAN configuration on tl-wr1043nd v2

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

So i have a tl-wr1043nd v2 which i need to modify a LAN port to be a WAN port.

So like this:

I have a modem which outputs 2 signals:

First port: normal internet access
Second port: IPTV network

This is what i need:

1 standard WAN port for normal internet. (already configured standard)
Also change 1 LAN port of the switch to be a WAN port for IPTV.

Then i need the other 3 LAN ports to be just LAN ports so i can hook a swithc or other computers on to it.

Im already trying for 3 days now, i had no luck i already have read alot about VLAN but i cant seem to configure it.

Here is the routers default config:

Interfaces:
http://imghost.nl/download/Knipsel2%282%29.png

Switch & VLAN:
http://imghost.nl/download/Knipsel%2817%29.png

Can you guys tell me which settings i should edit? I would like to be LAN port 1 as IPTV WAN.

Here (http://wiki.openwrt.org/toh/tp-link/tl- … .for.vlans) they say the port numbers are inverted when you compare to labels on device itself.

Please let me know if anything is unclear (I dont speak English as native language)

(Last edited by benjamin94 on 8 Aug 2014, 10:53)

Please anyone im already 3 days busy with this and i dont have any more ideas.

VLAN ID 1/Port 4 should be "off". Create a VLAN ID 3, and set Port 4 to "untagged" on VID 3. Don't know if CPU should be tagged or untagged, try either (you may need to set CPU to tagged on VID 1 as well). That should separate LAN1 from the rest. However, there is no port you can connect your IPTV equipment to.

Please post your /etc/config/network if this doesn't work, it's easier to work with than screenshots.

Hey thanks for the answer i followed your steps and now i cant ping to my router anymore.

I booted in failsafe mode and this is what i got in /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 globals 'globals'
        option ula_prefix 'fd5e:88ff:bc1c::/48'

config interface 'lan'
        option ifname 'eth1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6'
        option vid '2'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '3'
        option ports '0t 4'

hi, i have vlan on TP-Link TL-WR842N/ND v1 and all work very well, 2 wan and other lan.
the first point is set tagged all on for cpu for every vlan, your lan is eth 0.1 (first vlan), you must change in physical setting on network lan
vlan 01, set cpu tagged, the port for other wan to off , other to untagged  (lan)
vlan 02, set cpu tagged, the port for your wan to untagged, other off        (wan)
vlan 03, set cpu tagged, the port for your wan to untagged, other off        (wan2)

first you reboot set lan to eth 0.1 (network-lan-physical setting), wan to eth 0.2, wan2 to eth 0.3
now you have 2 wan and other ports for lan
(now you cant use the old original wan, but the new)

if you need you can use multiwan or mwan3 for best use of your multiple wan
also on my router the port numbers are inverted, no problem, last is port 1

(Last edited by vincenzo on 9 Aug 2014, 11:01)

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 1 2'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'
        option vid '2'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '3'
        option ports '0t 3 4'

That should do it. Connect LAN1 to WAN-IPTV, LAN2 to your IPTV equipment/decoder/whatever, LAN3 and LAN4 gives you internet access for your computers.

(Last edited by makro on 9 Aug 2014, 10:52)

makro wrote:
config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 1 2'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'
        option vid '2'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '3'
        option ports '0t 3 4'

That should do it. Connect LAN1 to WAN-IPTV, LAN2 to your IPTV equipment/decoder/whatever, LAN3 and LAN4 gives you internet access for your computers.

Thanks however it didnt work, i could still access the WEB Interface of the router and also got IP on devices but i couldnt access the internet.

Do you mean the LAN 1 like its labveled on the router or the Web interface under Switch?

At the points I said connect, I referred to the physical ports. As you can see on the wiki, the port numbers in software and on the label don't match, my configuration was based on the information on the wiki.

I missed the lan interface, change:

config interface 'lan'
        option ifname 'eth1'

to:

config interface 'lan'
        option ifname 'eth1.1'

Also, you can add this just for clarity:

config interface 'iptv'
        option ifname 'eth1.3'
        option proto 'none'
vincenzo wrote:

hi, i have vlan on TP-Link TL-WR842N/ND v1 and all work very well, 2 wan and other lan.
the first point is set tagged all on for cpu for every vlan, your lan is eth 0.1 (first vlan), you must change in physical setting on network lan
vlan 01, set cpu tagged, the port for other wan to off , other to untagged  (lan)
vlan 02, set cpu tagged, the port for your wan to untagged, other off        (wan)
vlan 03, set cpu tagged, the port for your wan to untagged, other off        (wan2)

first you reboot set lan to eth 0.1 (network-lan-physical setting), wan to eth 0.2, wan2 to eth 0.3
now you have 2 wan and other ports for lan
(now you cant use the old original wan, but the new)

if you need you can use multiwan or mwan3 for best use of your multiple wan
also on my router the port numbers are inverted, no problem, last is port 1

When i try that it says: Port 5 is untagged in multiple VLANs!

makro wrote:

At the points I said connect, I referred to the physical ports. As you can see on the wiki, the port numbers in software and on the label don't match, my configuration was based on the information on the wiki.

I missed the lan interface, change:

config interface 'lan'
        option ifname 'eth1'

to:

config interface 'lan'
        option ifname 'eth1.1'

Also, you can add this just for clarity:

config interface 'iptv'
        option ifname 'eth1.3'
        option proto 'none'

No still not, im sorry to bother you. My iptv decoder works perfectly!

Here is my network file:


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

config globals 'globals'
    option ula_prefix 'fddc:8952:8651::/48'

config interface 'lan'
    option ifname 'eth1.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'



config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'

config interface 'wan6'
    option ifname '@wan'
    option proto 'dhcpv6'

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

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0t 1 2'
    option vid '1'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6t'
    option vid '2'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '3'
    option ports '0t 3 4'

config interface 'iptv'
    option ifname 'eth1.3'
    option proto 'none'

(Last edited by benjamin94 on 9 Aug 2014, 16:42)

benjamin94 wrote:
vincenzo wrote:

hi, i have vlan on TP-Link TL-WR842N/ND v1 and all work very well, 2 wan and other lan.
the first point is set tagged all on for cpu for every vlan, your lan is eth 0.1 (first vlan), you must change in physical setting on network lan
vlan 01, set cpu tagged, the port for other wan to off , other to untagged  (lan)
vlan 02, set cpu tagged, the port for your wan to untagged, other off        (wan)
vlan 03, set cpu tagged, the port for your wan to untagged, other off        (wan2)

first you reboot set lan to eth 0.1 (network-lan-physical setting), wan to eth 0.2, wan2 to eth 0.3
now you have 2 wan and other ports for lan
(now you cant use the old original wan, but the new)

if you need you can use multiwan or mwan3 for best use of your multiple wan
also on my router the port numbers are inverted, no problem, last is port 1

When i try that it says: Port 5 is untagged in multiple VLANs!


my config is ok 100%, you only must check on wiki the reference for your port,
remember you must change in physical setting
you can set all on gui, on shell you can have mistake

vincenzo wrote:

my config is ok 100%, you only must check on wiki the reference for your port

Keep in mind that the WR1043ND v2 has two Ethernet interfaces, eth0 (physical WAN port) and eth1 (physical LAN ports). Your WR842ND has only eth0, which makes the config a bit different. I didn't think of this at first either, so it's the reason of my eth1.1 fix above, and also the reason why internet is no longer working. Change:

config interface 'wan'
    option ifname 'eth0'

to:

config interface 'wan'
    option ifname 'eth0.2'

That should get you back on the internet.

Hey,

I changed it to eth0.2 and now it works all!

Thank you very much and God bless you.

Again you thanks you saved me a lot more days if stress.

(Last edited by benjamin94 on 9 Aug 2014, 17:33)

You should post the final layout, might be helpful to other people if they run into the same problem smile.

Glad you got it working!

So Marko helped me out a lot and this is the final solution :

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

config globals 'globals'
    option ula_prefix 'fddc:8952:8651::/48'

config interface 'lan'
    option ifname 'eth1.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'

config interface 'wan6'
    option ifname '@wan'
    option proto 'dhcpv6'

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

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0t 1 2'
    option vid '1'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6t'
    option vid '2'

config switch_vlan
    option device 'switch0'
    option vlan '3'
    option vid '3'
    option ports '0t 3 4'

config interface 'iptv'
    option ifname 'eth1.3'
    option proto 'none'

Hi,

I have brand new TL-WR1043ND v2 with the "openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-factory.bin" installed (as of 02-Oct-2014 07:28).

Using the config below I get internet working, but not the IPTV, which has to be VLAN 6 for my provider. I would really appreciate any ideas how to get it all working. Many thanks!

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

config globals 'globals'
    option ula_prefix 'fddc:8952:8651::/48'

config interface 'lan'
    option ifname 'eth1.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'

config interface 'wan6'
    option ifname '@wan'
    option proto 'dhcpv6'

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

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0t 3 4'
    option vid '1'

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6t'
    option vid '2'

config switch_vlan
    option device 'switch0'
    option vlan '6'
    option vid '6'
    option ports '0t 1 2'

config interface 'iptv'
    option ifname 'eth1.6'
    option proto 'none'

Some details are missing. Is IPTV traffic supposed to be tagged with VLAN 6 on the WAN side? Your VLAN 6 is only configured on the LAN ports - there is nothing coming from or to VLAN 6 on the WAN side.

Try this for your VLAN 6 and IPTV interface:

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

config interface 'iptv'
    option type 'bridge'
    option ifname 'eth0.6 eth1.6'
    option proto 'none'

Hi,

Thanks for an answer! Yes, IPTV traffic supposed to be tagged. Unfortunately neither internet no IPTV was working with the suggested configuration. Can it be that BB 14.07 bug for TL-WR1043ND v2 makes it impossible to have tagged and untagged VLANs both in the same time? http://patchwork.openwrt.org/patch/5941/

I have brand new TL-WR1043ND v2 with the "openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-factory.bin" installed (as of 02-Oct-2014 07:28).

I interpreted this as a trunk image of October 2nd (which has tagged+untagged working). Running BB release image will not work with my suggested configuration, as it won't run tagged+untagged traffic on the same port.

Try latest trunk image, or check if your ISP will accept tagged internet traffic on some other VLAN.

(Last edited by makro on 8 Nov 2014, 18:23)

Hello,
I have very similar problem to benjamin94. Im trying to solve since 2 weeks. Have tried with Ddwrt firmware, Tp-link firmwares for malasia and Russia with IpTv support but couldn't success what ever i tried.

My problem: My cable internet Isp has Tv service also. They brought me Mag 250 IpTv box and a cheap router. Dlink dir300. I am trying to change the router with my router Tp-wr1043nd v2. But there is no Vlan settings in the original firmware.
One port should go to Iptv box and rest for Lan. Iptvbox getting his own ip from the server.
Here is pic what im trying to setup.

http://s1.postimg.org/nnpc76qnv/TP_wrt1043nd_v2.jpg

As you can see iptv box getting a sperate ip address from the router. Which is 159.1.2.20 atm. My network is on 192.168.1.*

This is their Dlink routers vlan setup:
http://s16.postimg.org/yjzbjba75/dlinkn150.jpg

They told me Vlan id must be 3. Nothing more.

My curret firmware:
Powered by LuCI Trunk (0.12+svn-r10530) OpenWrt Barrier Breaker 14.07

I have tried Bnejamins final cfg but:
1-Lag started with router. Pages loaded very long time
2-Switch settings lost from Luci webinterface
3-Couldn't connected to internet

I have flashed back to original settings. Here is my network cfg:

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

config globals 'globals'
    option ula_prefix 'fde1:4ce5:32df::/48'

config interface 'lan'
    option ifname 'eth1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'

config interface 'wan6'
    option ifname '@wan'
    option proto 'dhcpv6'

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

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

config switch_vlan
    option device 'switch0'
    option vlan '2'
    option ports '5 6'

Can you please help me with the set up? It is really hard for me to understand these settings.

The discussion might have continued from here.