I would like to share with you my TM Unifi setup at my home. Below is my scenario:-
I wish to have both Hypptv and internet at the a location where it is far away from my Fibre modem and router. There is only one physical LAN cable connecting from the router location to the place where I wish to have HyppTV (iptv) and Internet connection. This is made possible by VLAN trunking.
I use Asus RT-AC88U and 2 pieces of Netgear GS105Ev2. You may use any other Unifi supported router and any switch that has VLAN support for traffic segmentation.
1st stage – Preparation-:-
Setup your router as usual. Identify the router’s default port for IPTV. For Asus RT-AC88U, it is LAN4. Complete all the router settings. Make sure that PPPOE is working.
Skip the below step to 2nd stage if you do not wish to change the default IP
Go to Network and Sharing Center, change your current Ethernet properties TCP/IPv4 as 192.168.0.x
Power on GS105Ev2 and connect a LAN cable directly from your pc to the switch. GS105Ev2 has default ip 192.168.0.239. Login password is “password”.
Change the default ip of switch
For easier access from existing network, I would change GS105Ev2’s gateway to Asus router IP, and set the LAN IP ip of the switch to be the same network. Thus, we can manage it from the router network without making direct connection to the switch every time you want to access.
DHCP : Disable
IP : 192.168.88.31 , subnet : 255.255.255.0
Gateway address : 192.168.88.1 (follow your router’s IP)
Apply settings. If you encounter anything wrong when changing the default ip of the switch, just reset it and retry.
Restore and change the your computer’s TCP/IPv4 settings back to normal as before.
Connect GS105Ev2 from the router network, 192.168.88.31
2nd stage – Switch A
Go to VLAN → 802.1Q → Advanced →VLAN Configuration → Enable
At the VLAN ID , key in 501 at the VLAN ID box and click Add. This will add VLAN 501 (you can choose any VLAN number from 1 to 4094). This VLAN is named for the authenticated PPPOE. It has local network access and Internet. We will connect this LAN to Port 1 of switch A.
Add VLAN 600 and apply setting.
Go to VLAN membership, select VLAN ID that you want to edit. Click on the port multiple times, it will rotate between “T” for tag , “U” for untagged and blank. Get the all results below. Be sure to apply setting for each VLAN before going to next VLAN.
As a good practice, allow only one untagged VLAN for a port only. Be sure to configure the PVIDs for Untagged ports and that they have matching VLANs. Go to the Port PVID, click on the port, change the PVID as below and Apply.
Go to System → Maintenance → Device Reboot → click the Check box → Apply. Restart switch A.
3rd stage – Switch B
My Switch B has the similar default IP changes as Switch A.
Using the same method of 2nd stage steps, you will end up the settings as below for Switch B.
Reboot Switch B and connect cables according to the first diagram. It is done! You are now able to trunk two different VLANs into one physical RJ45 cable.
All the untagged ports with VLAN501 in Switch A and B ( port 3, 4 of Switch A and 2, 3, 4 of Switch B) are having Local access and internet connection. You can play the movie files from NAS connected to router from any of these ports.
Note: Always Untag ports that have non VLAN aware devices – like computers and printers. Tag ports to VLAN aware devices – like phones, access points, other switches (this is how you VLAN trunk between switches), etc.
Edit : A reader, Nicholas, has pointed out that it is best to use default VLAN 1 on both switches. Thus, VLAN501 is unnecessary. I agree with him.
You can choose to do the setup as above or just do the VLAN600 settings, leave other ports as default. The default vlan is 1 untagged.