I followed the instructions here: OpenWrt support for Deco S4 and installed openwrt just fine. I also installed luci ok. There are 2 ports on this thing. Neither of them are dedicated WAN/LAN using stock firmware. Right now I have one set to static ip 192.168.0.200 with gateway of 192.168.0.38 (my main router). I just did this to get internet so I can install luci.
I want to set up this up as my main router so one port as a WAN port and one as a dhcp server/lan port for the rest of my network (get rid of my current main router). Ideally, the WAN port should be a DHCP client right and pull it's IP straight from the modem?
I searched for instructions and tried adding another vlan (vlan 2) with the CPU tagged and the 1st port off and 2nd port untagged (tried tagged as well). Then I added the interface as a static ip with 192.168.2.1 and selected vlan eth0.2, but I can't seem to get a dhcp address when connecting it to my network card via ethernet.
Can someone let me know what I'm doing wrong?
Here's my /etc/config/network:
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 'fd70:cd05:ead8::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config device
option name 'eth0.1'
option macaddr 'd8:47:32:cf:63:1c'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.0.200'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.0.38'
option dns '192.168.0.38'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 3'
option vid '1'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 5t'
option vid '2'
config interface 'LAN'
option proto 'static'
option device 'eth0.2'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
config device
option name 'eth0.2'