Vlan problem on a apu2e4

Hello my name is Mike,

long story:
i'm trieng to setup vlans to replace the provided modem, to accomplish that i need to setup a vlan with vid 300 for internet (on one lan port and on wifi), and a vlan with vid 640 on a lan port for the iptv.
in every setup that the internet is working on one lan port i lose the dhcp server so i cant login to luci anymore. it would be nice to have a static ip with 192.168.0... so i can dump ap and switches after that that can communicate with each other. i tried to seach for this problem but every form i visit it doesnt make it better. i really dont know the terms i need to seach to reach te solution.

a long story short i dont know what im doing, the iptv seems to work because i dont need to tie it down to a specific ip range to reach luci again.

here are the codes and i really hopes someone knows what im doing wrong:

first the orginal network file (no vlan just how i opened it for the first time):

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 'fde4:ca0d:b4b6::/48'

config interface 'lan'
   option type 'bridge'
   option ifname 'eth1 eth2'
   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 'eth0'
   option proto 'dhcpv6'


the vlan without internet but dhcp:

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 'fde4:ca0d:b4b6::/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 ifname 'eth1'

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

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

config interface 'tv'
	option ifname 'eth0.640 eth2'
	option proto 'dhcp'
	option type 'bridge'

config interface 'internet'
	option type 'bridge'
	option proto 'dhcp'
	option ifname 'eth0.300'

the uci output internet works but i cannot reach luciTHANK GOD for serial I LOVE IT!:

network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fde4:ca0d:b4b6::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.ifname='eth1'
network.wan=interface
network.wan.ifname='eth0'
network.wan.proto='dhcp'
network.wan6=interface
network.wan6.ifname='eth0'
network.wan6.proto='dhcpv6'
network.tv=interface
network.tv.ifname='eth0.640 eth2'
network.tv.proto='dhcp'
network.tv.type='bridge'
network.internet=interface
network.internet.type='bridge'
network.internet.proto='dhcp'
network.internet.defaultroute='0'
network.internet.igmp_snooping='1'
network.internet.ifname='eth0.300 eth1'

tried a different method from openwrt site itself to enable vlan. in the luci interface became under network "switch" available so i tought finnaly i found it! but luci tells me that luci doesnt know the board layout. so i tried differt port numbers to try to make it work (lan interface to eth0.1) but every single port number combinations resulted to not even make a connection (the lights of the lan port 1 stayed black). :

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

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

i hope someone knows where im looking for or knows the solution.
Thanks in advance

Hi

You can try to define vlan 300 on your wan interface for internet.

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

and remove

config interface 'internet'
	option type 'bridge'
	option proto 'dhcp'
	option ifname 'eth0.300'

You are a legend!!! Thank you so much that did the trick

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