Changing LAN ports to WAN ports

I am setting up my equipment to accommodate a switch to a triple play provider. I have a spare TP-Link TL-WR1043ND v2 I want to use as the ISP’s GPON only has basic functionality. This is a spacious SOHO environment with a couple of offices and various rooms. Hardware wise:
• ISP’s GPON modem with outgoing
- GPON-VOIP socket to DECT phone system (not of interest here)
- GPON-LAN1 internet (192.168.1.1 + DNS + DHCP + gateway)
- GPON-LAN2 IPTV-reserved
- GPON-LAN3 IPTV-reserved
- GPON-LAN4 IPTV-active
• Another router configured for DHCP + DNS + some port-forwarding
- GPON-LAN1 => Router-WAN (192.168.1.2)
- (192.168.0.1/24) Router-LAN1 => unmanaged switch
• Unmanaged switch with cables to the rooms
- Unmanaged switch => AP in room (6x)
• AP in room is a simple WiFi-4xLAN-port-router configured as
- dual-band access point and
- unmanaged 5-port switch connecting a PC, printer etc.

In one of the rooms the AP connects a TV, BR-player etc. to the internet. The not very knowledgeable ISP installer says to run a second cable to their STB next to the TV and connect the other end to the GPON-LAN4. This is when I decided to go OpenWRT.

To test feasibility of the hardware with my stock WR1043ND, I
- Connected GPON-LAN4 => WR1043ND-WAN (7.29.x.y)
- Connected WR1043ND-LAN1 to my unmanaged switch
- DHCP-ed the WR1043ND (192.168.0.2)
- Enabled IGMP snooping in the TP-Link GUI
- a LAN port of the AP connects to the STB (192.168.0.19)
and presto: IPTV and internet on the same cables.

Now I want to configure WR1043ND to handle internet traffic and IPTV. I have 3 step plan
- Install OpenWRT and get it to work like the stock WR1043ND
- Reconfigure the WR1043ND to handle internet traffic and IPTV
- Reconfigure the WR1043 to handle more than one IPTV stream

It was easy to install OpenWRT 19.07.4, enable IGMP snooping on the LAN interface and install IGMPproxy. But out-of-the-box this did not work to stream IPTV to the STB. I then started by reading up and went on a trial-and-error and discovery tour. I tweaked some IGMPproxy parameters and got it working just like the stock TP-Link.

The next step would require me to reconfigure the LAN ports on the WR1043ND as WAN ports for internet and IPTV. And this is where I got lost not being a networking guru. Is this possible and how should I go about to do this? Some guidance is highly appreciated.

I do not understand, what do you mean 'LAN' to 'WAN'. If you want to enable VLAN, configure it in switch section of network config.

This isn't clear how the Internet works since you don't mention anything connected to GPON port 1.

The method which is most agnostic to whatever the TV protocol is would be to establish a level 2 VLAN between the GPON port 4 and the TV box. A router or managed switch near the GPON would combine ports 1 and 4, i.e. WAN and TV (or LAN and TV if you route at the GPON end of the cable) onto a trunk cable (two tagged VLANs) and a similar device would separate them in the other room.

Using hardware switching, the router CPU is not burdened by TV traffic at all.

My GPON has 4 LAN ports: 1x internet + 3x IPTV. I don't want to run extra CAT cables from GPON to Set-Top-Boxes. My WR1043ND has 1x WAN + 4x LAN ports. I want to reconfigure my WR1043ND as a device with 4x WAN + 1x LAN such that each WAN handles one incoming GPON LAN.To do that I would need to change existing LAN ports into WAN ports.
I read I should check the WR1043ND device page for such things but despite a lot of detailed stuff I could not figure it out. I don not know if all ports on the WR1043ND are the same (making it a 5-port switch) and the distinction between LAN and WAN is a matter of OpenWRT configuration and pieces of plastic for the ports being yellow and blue or if WAN and LAN are wired differently.

Maybe I wrote to much details. But it is explained here

• Another router configured for DHCP + DNS + some port-forwarding

  • GPON-LAN1 => Router-WAN (192.168.1.2)
  • (192.168.0.1/24) Router-LAN1 => unmanaged switch

I have a router in my existing operational network with the GPON-LAN-1 port connected to the WAN port of this router. Upstream the DHCP on the GPON-LAN1 assigns this router the address 192.1681.2. Downstream my router has the address 192.168.0.1 on the LAN. This router handles only internet traffic.

Note: this is not the WR1043ND router. I want to "transfer" this functionality to the WR1043ND. At the moment the WR1043ND is just a DHCP client in the network. With IPTV plugged into the only WAN port the WR1043ND is just a "pass-through" device.

This is my moment of Guru Meditation. I am not quite sure I understand this. Assume I also signed up for the other 2 IPTV streams. I would then use a managed switch/router to merge all GPON LANs and unmerge them at the other end. I think that is what I meant to achieve. The device to do that would be my OpenWRT/WR1043ND router at the GPON end. How to untangle the streams is not clear to me. I can put my AP at the other end of the cable back into router mode but they are to basic to split the streams.
I looked around on the site but didn't find anything about level 2 VLANs and hardware switching but surely some one has written about it. Could you give me some pointers or links how this is implemented in OpenWRT?
Would there be another option that doesn't need hardware at the STB end? Some kind of OpenWRT configuration setting that maps the MAC or IP address of the STB to the GPON-IPTV stream.

As far as I have understood, you mean 'WAN' port for transparent bridge to some VLAN of 'WAN' port of main router. Am I correct?

I gave the idea of hw-switching some thought. But I don't want the extra hw, CAT cables and power supplies at the end-points. Actually, I'm quite comfortable with burdening the CPU with TV traffic after I did the math. I have a 100Mb/s internet uplink and I can subscribe to 3 HD IPTV streams that require about 15Mb/s each (but I only have one for now). That adds up to 145Mb/s or 70% of the 210 Mb/s throughput mentioned on the WR1043ND device page. I think I'm OK for now with the 7 year old TP-Link.

I chucked out the router that I had and replaced it with the WR-1043ND + OpenWrt 19.07.4. I now have internet and one iptv stream sharing one router and the in-house cabling. This completes step-2 of my plan and my set up looks like this (the dotted line being a 2nd future IPTV subscription). LAN4 is configured as a 2nd WAN port for the IPTV stream.


It took quite some effort as this is new to me, the terminology is confusing and the OpenWrt implementation sometimes surprising.
I found out that not all vlans are created equal. vlan1 seems to be wired or hard-coded to eth1 and vlan2 to eth0. If I swap vlan2 and vlan3 my set up doesn't work. In the config files eth0 and eth1 are sometimes referred to as WAN and LAN and not the WAN/LAN RJ45-ports or the interfaces with these names. The igmpproxy package also seems to be hard coded to vlan1 (in Lucie it only shows up in the LAN (=vlan1) GUI-interface tab. But from the igmpproxy.config file I got the impression it is actually defined on eth1 because the word network is used in

config igmpproxy
	option quickleave 1

config phyint
	option network wan
	etc. etc.

config phyint
	option network lan
        etc. etc.

For step 3 of my mini-project I wanted to define two subnets (+ interfaces) on vlan1. But it seems impossible to do have static leases and two subnets. At least till I read the line

In DNS and DHCP configuration examples: If you plan to connect more than one interface simultaneously, add a separate host entry for each interface, otherwise it's unreliable

Can someone tell me how to implement the bold text in the configuration below?
My Skyworth keeps obtaining an 192.168.0.xxx IP from the "other" interface LAN

config interface 'cignal'
	option ifname 'eth1.1'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option gateway '7.29.192.1'
	option netmask '255.255.255.252'

config dhcp 'cignal'
	option interface 'cignal'
	option dynamicdhcp '0'
	option leasetime '5m'
	option force '1'
	option start '2'
	option limit '1'

config host
	option name 'Skyworth'
	option mac '6C:2C:DC:00:3A:7A'
	option ip '192.168.2.2'
	option leasetime '5m'

I didn't quite understand, but If you just want to set LAN as wan, go to Network-Switch, add one vlan, then go to Network - Interface, Add a new interfere with that new vlan.

I did that and it it is a tricky business. As I wrote

My set up for stb4 with vlan2 and vlan3 works. But if I swap the vlans 2 and 3 in the diagram the igmpproxy no longer functions. Just adding vlans doesn't get the job done. Under the hood there are things going on I'm not aware of. I want to connect the following end-points (think virtual cable)

  • gpon-lan4 <=> stb4 (one-on-one mapping for iptv stream on gpon-lan4))
  • gpon-lan3 <=> stb3 (one-on-one mapping for iptv stream on gpon-lan3))
  • gpon-lan2 <=> stb2 (not depicted, for iptv stream on gpon-lan2))
  • gpon-lan1 <=> all other wired and wireless devices connected to my downstairs switch handling internet traffic

and I only want igmpproxy enabled on stb2, stb3 and stb4. I'll probably end-up with a solution using static routing or vlans+interfaces+firewall rules. Any opinions?