DHCP not working when using Open vSwitch with multiple vlans

Hi I am trying to setup Open vSwitch on OpenWrt to use a different vlan for each physical port. I currently am having an issue with DHCP not issuing an ip address to each ethernet device. Using the command logread -f, I only see a bunch of messages like

Thu Jun 13 15:16:32 2019 daemon.info dnsmasq-dhcp[12917]: DHCPDISCOVER(ovslan) <mac addr>
Thu Jun 13 15:16:32 2019 daemon.info dnsmasq-dhcp[12917]: DHCPOFFER(ovslan) 192.168.5.186 <mac addr>
Thu Jun 13 15:16:35 2019 daemon.info dnsmasq-dhcp[12917]: DHCPDISCOVER(ovslan) <mac addr>
Thu Jun 13 15:16:35 2019 daemon.info dnsmasq-dhcp[12917]: DHCPOFFER(ovslan) 192.168.5.175 <mac addr>

It looks as if the router is issuing an address to the device but the device never gets the message from the router & never responds back to the router. Before putting ovs onto the router, I had the vlans configured and working properly. Then I read that interfaces within the ovs bridge cannot have its own ip, so I have removed the subnets I created on the vlans. I feel like I am very close and would greatly appreciate any help! Thanks

/etc/config/network

root@OpenWrt:~# cat /etc/config/network 

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 'fdfe:ecc0:6841::/48'

config interface 'lan'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.3.1'

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

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

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 '0t 4'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'
	option ports '0t 3'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '3'
	option ports '0t 2'

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

config interface 'VLAN_1'
	option proto 'static'
	option ifname 'eth0.1'

config interface 'VLAN_2'
	option proto 'static'
	option ifname 'eth0.2'

config interface 'VLAN_3'
	option proto 'static'
	option ifname 'eth0.3'

config interface 'VLAN_4'
	option proto 'static'
	option ifname 'eth0.4'

config interface 'ovsbr'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '192.168.5.1'
	option ifname 'ovslan'

/etc/config/dhcp

root@OpenWrt:~# cat /etc/config/dhcp 

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '1h'
	option dhcpv6 'server'
	option ra 'server'
	option ra_management '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'ovsbr'
	option start '100'
	option leasetime '1h'
	option limit '150'
	option interface 'ovsbr'
	option force '1'

I've left wlan0 in br-lan so that I still have wifi access to my router:

root@OpenWrt:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.b0c74576511c	no		wlan0

ovs-vsctl setup

root@OpenWrt:~# ovs-vsctl show
3247eb5e-7ad3-40b3-a048-ef7fec78734b
    Bridge ovslan
        fail_mode: standalone
        Port "eth0"
            Interface "eth0"
        Port "eth0.4"
            Interface "eth0.4"
        Port "eth0.2"
            Interface "eth0.2"
        Port ovslan
            Interface ovslan
                type: internal
        Port "eth0.1"
            Interface "eth0.1"
        Port "eth0.3"
            Interface "eth0.3"
    ovs_version: "2.8.5"

There are a few ways to do this, depends on your outcome or needs.

add a veth pair into your br-lan and into the vswitch ( assuming you wanted all the dhcp to be handled by normal openwrt services. ) is a basic starting point.

but that's pretty much where your missing something.... the logical switch needs to be connected somehow.

are you able to achieve this basic building block?

Okay thanks- I will give that a shot. I have not ever created a veth pair but looking around I think I understand how to.

I do have a concern about this solution because I see the same exact dhcp issue when I have configured my environment to be:
br-lan -> ovs switch
or
ovs switch (no linux bridge anywhere)

Do the vlans inside of the ovs switch need to have a veth pair per vlan too? I am thinking this would connect eth0.1 to ovslan as an example.

Likely I wont use a linux bridge in the end so I would like to understand this solution so that I can use a linux bridge or not use a linux bridge.

Adding eth0, and each tagged eth0.X interface to ovslan seems wrong or unnecessary. I would add eth0 as a trunk.

If you want to create a VLAN access port then use ovs-vsctl add-port ovsbr vlanX tag=X -- set Interface vlanX type=internal or similar.

That didn't work but it did lead me to try this from the faq: http://docs.openvswitch.org/en/latest/faq/vlan/

Q: Can I configure an IP address on a VLAN?

    A: Yes. Use an “internal port” configured as an access port. For example, the following configures IP address 192.168.0.7 on VLAN 9. That is, OVS will forward packets from eth0 to 192.168.0.7 only if they have an 802.1Q header with VLAN 9. Conversely, traffic forwarded from 192.168.0.7 to eth0 will be tagged with an 802.1Q header with VLAN 9:

    $ ovs-vsctl add-br br0
    $ ovs-vsctl add-port br0 eth0
    $ ovs-vsctl add-port br0 vlan9 tag=9 \
        -- set interface vlan9 type=internal
    $ ip addr add 192.168.0.7/24 dev vlan9
    $ ip link set vlan9 up

Rather than give vlan9 an ip, I gave eth0.1 an ip, set it to be up, and the dhcp request went through. When I try to do the same to eth0.2 also- eth0.2 doesn't work. (note: I added eth0.1 + eth0.2 back into the ovslan and it got a 192.168.5.X address)

I don't understand its like ovs cannot handle dhcp with multiple vlans.