VLAN configuration for fibre optic connection

Hi

I am planning to switch my Service provider and go for 1GB download and 500MB upload. Service provider gave an option to use my own router. I have a X86 router with Openwrt installed. To have internet I have create a VLAN for IPTV and internet.

For IPTV its VLAN4 and for internet its VLAN6. I dont have much knowledge or experience creating VLAN by myself. I need help to create for new connection.

I dont use IPTV so need to configure it for internet. I play games on XBX and PS5 mostly Call of duty.

Below is the configuration I tried to create but if not right please help me to correct it.

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 'fdb2:6000:d348::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option igmp_snooping '1'
        option ifname 'eth1 eth2 eth3 eth4 eth5'

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

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'

config interface 'eth1'
        option proto 'dhcp'
        option ifname 'eth1'

config interface 'VLAN4'
        option ifname 'eth0.6'
        option proto 'dhcp'
        option type 'bridge'
        option igmp_snooping '1'

config interface 'VLAN6'
        option proto 'dhcp'
        option ifname 'eth0.7'
        option type 'bridge'
        option igmp_snooping '1'

Thanks
Badri M

I suggest to use the preconfigured wan and wan6 interfaces, rather than creating a new interface serving as WAN. The reason is that they are also preconfigured in the firewall as members of the WAN zone.

Example:

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

config interface 'wan6'
        option ifname 'eth0.7'
        option proto 'dhcpv6'

This assumes your ISP requires VLAN tag 7, and IP configuration via DHCP/DHCPv6.
Is that the case?

The WAN interface for internet access does not need to be a bridge, I suggest to leave that option disabled.

Since you do not use IPTV, you could omit it from the configuration for now.

1 Like

Hi

I updated the Openwrt version to 21.02 version. @mk24 suggested me below config for IPTV.

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

config globals 'globals'
        option ula_prefix 'fd13:4a9d:114e::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        list ports 'eth2'
        list ports 'eth3'

config device
        option name 'br-tv'
        option type 'bridge'
        list ports 'eth0.4'
        list ports 'eth7.4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

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

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'

config device
        option name 'br-tv'
        option type 'bridge'
        list ports 'eth0.4'
        list ports 'eth7.4'

Above config for IPTV is right? My understanding is we are telling router VLAN4 is configured in eth7.4. Is my understanding right?

And my overall config is right?

Thanks
Badri M

Hi

Tomorrow I will have my internet replaced to Fibre.

Below the VLAN config I have created.

config device
        option name 'br-tv'
        option type 'bridge'
        list ports 'eth0.4'
        list ports 'eth7.4'

config device
        option name 'internet'
        option type 'bridge'
        list ports 'eth0.6'
        list ports 'eth6.6'

Is this right?

Thanks
Badri M

brctl show will show if the bridges were actually created. You may also need a dummy network for each one to cause the creation. This would be something like:

config interface 'tv'
    option device 'br-tv'
    option proto 'none'

Only one bridge is created it looks.

root@OpenWrt:/etc/config# brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.00e04c82f313       no              eth3
                                                        eth1
                                                        eth4
                                                        eth2

It looks like I have to create a bridge and refer it in an interface

Am I right?

Thanks
Badri M

Hi @mk24

After adding the bridge device to interface its showing in the list.

bridge name     bridge id               STP enabled     interfaces
br-tv           7fff.00e04c82f312       no              eth7.4
                                                        eth0.4
br-lan          7fff.00e04c82f313       no              eth3
                                                        eth1
                                                        eth4

Thank you so much for your suggestion and support.

Regards
Badri M

Hi

I tried to create VLAN6 for internet. But everything failed. I had doubt whether I created it in right way or not. Anyone can share an example how to create it?

I am using x86 router and i am in 21.02 firmware.

Thanks
Badri M

Hi

I managed to fix it. I followed below link and its working now.

https://openwrt.org/docs/guide-user/network/wan/isp-configurations

Its pppoe connection.

Thanks
Badri M

Hi

I managed to create the VLAN as given the above link. But when I restart and logged into admin console firmware added wan6 automatically. Is this configuration correct?

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

config globals 'globals'
        option ula_prefix 'fd13:4a9d:114e::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        list ports 'eth2'
        list ports 'eth3'
        list ports 'eth4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'eth0.6'
        option proto 'pppoe'
        option username ''
        option password ''
        option ipv6 'auto'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option device '@wan'

Thanks
Badri M

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.