How to configure VLANs for IPTV and Internet?

6,118

If you have two switches which support 802.1Q-based VLANs (most managed switches do), the actual configuration should be simple like this (identical on both switches) – only the way it's presented in the switch's web UI varies greatly between manufacturers and even firmware versions.

  • The port for IPTV should be removed from the default VLAN, and added to a new "IPTV" VLAN. It should still remain "untagged" or "access" port. (Note: Some switches let you configure the port's "PVID" separately from VLAN membership – make sure to change both.)

  • The ports for regular LAN usually don't need to be changed (factory defaults usually make them untagged members of VLAN ID 1).

  • The port facing the powerline adapter should be a member of both VLANs: the 'LAN' untagged, the 'IPTV' VLAN tagged. (Some switches call this a "general" or "mixed" port. In other switches this is how all ports always work.)

    (This port can also have both VLANs tagged – also known as a "trunk" port – but the disadvantage is that you will no longer be able to HomePlug management software, as the powerline adapters themselves only react to commands in untagged frames.)

Assuming that this screenshot from 2012 still matches your switches today, the actual instructions for this model would be:

  1. Open 'VLAN → 802.1Q-based VLAN' from the menu.
  2. Click VLAN ID 1 in the list. Mark your IPTV port as "Not Member" and click 'Apply'.
  3. Enter e.g. "6" as VID. Mark your powerline port as "Tagged", mark your IPTV port as "Untagged", and click 'Apply'.

In summary:

router              switch 1                            switch 2

                    port 1 (tg.6, untg.1)   ========    port 1 (tg.6, untg.1)
port 1 (IPTV)  ---  port 2 (untagged 6)                 port 2 (untagged 6)  ---  TV
port 2 (LAN)   ---  port 3 (untagged 1)                 port 3 (untagged 1)  ---  computer
                    port 4 (untagged 1)                 port 4 (untagged 1)
                    ...                                 ...

(I just randomly chose VLAN ID 6 for IPTV, but any value from 2 to 4095 will work.)


Make sure the powerline adapters – and all other Ethernet devices between the two D-Links – actually support carrying VLAN-tagged packets (as the tag adds 4 bytes on top of the "normal" 1518 byte maximum). Your adapters should work fine, as HomePlug AV already uses 802.1p tags for indicating packet priority. But e.g. old 100 Mbps era Ethernet switches might either drop or truncate frames which they think are "oversized" due to the VLAN tags.

Share:
6,118

Related videos on Youtube

Alex
Author by

Alex

Updated on September 18, 2022

Comments

  • Alex
    Alex almost 2 years

    I have a setup right now, where I need to switch ports every time when I want to watch a TV or to use Internet on my PC. Main issue that everything works via PowerLine adapters and I can't get a second cable to go through entire flat.

    On ISP Router LAN 1 is for TV and the rest are for the internet access.

    Diagram 1 Diagram 2

    I also have two Smart Managed Switches (D-Link DGS-1100-08P) that should be able to create VLANs, but I've never actually worked with switches or any networking (apart from setting up Wi-Fi).

    I want to have simultaneous access to IPTV and Internet via one cable (via powerline) between two switches.

    How can I set it up?

    • Daniel B
      Daniel B over 4 years
      Are you sure the IPTV is supposed to be on a different VLAN in your local network? That’s quite unusual. What’s your ISP?
    • Alex
      Alex over 4 years
      @DanielB yeah, it's either internet or IPTV, so I needed to split them up into VLANs. MGTS, it's a Russian ISP.
    • user1686
      user1686 over 4 years
      @DanielB: IPTV on a different VLAN is very common in different countries – it's how many ISPs get it to the router in the first place, often configuring the router to dedicate one port for bridged IPTV (set-top box) and the rest for routed Internet (LAN).
    • Daniel B
      Daniel B over 4 years
      Different WAN VLANs for IPTV are very common, yes. Not in the local network though, especially because tagged VLANs are not compatible with Wi-Fi.
    • user1686
      user1686 over 4 years
      @DanielB: Well, they are; the VLAN tag can be carried over Wi-Fi just like any other ethertype. (And many APs are capable of putting different clients in different untagged VLANs depending on authentication.) But regardless of that, using tagged VLANs for wired Ethernet doesn't mean they also have to be present on Wi-Fi – most set-top boxes are wired, so it would be perfectly fine to have an Ethernet port with LAN+IPTV while still having no VLANs on Wi-Fi at all.
  • Alex
    Alex over 4 years
    Thank you a lot! It took some time to configure everything correctly, but it works now!!