Why is one of my interfaces not giving out IP addresses via DHCP to wired devices?

I have a VLAN (103) that is giving out IP addresses to wireless devices but not to wired devices and I can't find out why.

LAN 4 (untagged) is a TV that is connected to VLAN 103 (IOT). The TV only gets a link-local address when connected to IOT.
LAN 3 (tagged) is a server running proxmox and when I create a VM that uses VLAN 103 this is the output I see

testmachine:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1@if192: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 0e:14:41:ec:72:9a brd ff:ff:ff:ff:ff:ff
    inet 169.254.175.214/16 brd 169.254.255.255 scope global noprefixroute eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::c14:41ff:feec:729a/64 scope link 
       valid_lft forever preferred_lft forever
testmachine:~#

There are a number of wireless devices that are connected to VLAN 103 and all of those get an IP address.

root@OpenWrt:~# cat /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'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0.1'
	option igmp_snooping '1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.178.1'
	option delegate '0'
	option ipv6 '0'

config device
	option name 'eth0.2'
	option macaddr 'e4:c3:2a:47:1a:7f'
	option ipv6 '0'
	option multicast '0'

config interface 'wan'
	option device 'eth0.2'
	option proto 'dhcp'
	option peerdns '0'
	option ipv6 '0'
	list dns_search 'lan'
	list dns '10.1.99.2'
	list dns '10.1.99.3'

config interface 'wan6'
	option device 'eth0.2'
	option proto 'dhcpv6'
	option auto '0'
	option reqaddress 'try'
	option reqprefix 'auto'

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 description 'LAN'
	option ports '0t 2 3 4t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '2'
	option description 'WAN'
	option ports '0t 1'

config interface 'guest'
	option type 'bridge'
	option proto 'static'
	option netmask '255.255.255.0'
	option ipaddr '10.1.105.1'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '103'
	option name 'eth0.103'
	option mtu '1500'
	option macaddr 'E4:C3:2A:47:1A:7E'

config interface 'IOT'
	option proto 'static'
	option type 'bridge'
	list ipaddr '10.1.103.1/24'
	option device 'br-iot'

config bridge-vlan
	option device 'br-vlans'
	option vlan '103'
	list ports 'eth0.103:t'
	list ports 'eth0.2'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '103'
	option description 'IOT'
	option ports '0 4t 5'

config device
	option type 'bridge'
	option name 'br-iot'
	list ports 'eth0.103'
	option mtu '1500'
	option macaddr 'E4:C3:2A:47:1A:7E'
	option igmp_snooping '1'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '101'
	option name 'eth0.101'
	option ipv6 '0'

config device
	option type 'bridge'
	option name 'br-dienste'
	list ports 'eth0.101'
	option ipv6 '0'

config interface 'DIENSTE'
	option proto 'static'
	option device 'br-dienste'
	list ipaddr '10.1.101.1/24'
	list ipaddr '10.1.99.1/24'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '101'
	option description 'DIENSTE'
	option ports '0t 4t'

config device
	option type 'bridge'
	option name 'br-homelab'
	list ports 'eth0.102'
	option ipv6 '0'
	option mtu '1500'
	option macaddr 'E4:C3:2A:47:1A:7E'

config interface 'HOMELAB'
	option proto 'static'
	option device 'br-homelab'
	option ipaddr '10.1.102.1'
	option netmask '255.255.255.0'

config device
	option type 'bridge'
	option name 'br-nonet'
	list ports 'eth0.104'
	option mtu '1500'
	option ipv6 '0'
	option macaddr 'E4:C3:2A:47:1A:7E'

config interface 'NONET'
	option proto 'static'
	option device 'br-nonet'
	option ipaddr '10.1.104.1'
	option netmask '255.255.255.0'

config device
	option name 'eth0.102'
	option type '8021q'
	option ifname 'eth0'
	option vid '102'
	option ipv6 '0'

config device
	option name 'eth0.104'
	option type '8021q'
	option ifname 'eth0'
	option vid '104'
	option ipv6 '0'

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '102'
	option description 'HOMELAB'
	option ports '0t 4t'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option vid '104'
	option description 'NONET'
	option ports '0t 4t'

config device
	option type '8021q'
	option ifname 'eth0'
	option vid '100'
	option name 'eth0.100'

config device
	option type 'bridge'
	option name 'br-lan100'
	list ports 'eth0.100'
	option ipv6 '0'
	option igmp_snooping '1'

config interface 'LAN100'
	option proto 'static'
	option device 'br-lan100'
	option ipaddr '10.1.100.1'
	option netmask '255.255.255.0'

config switch_vlan
	option device 'switch0'
	option vlan '7'
	option vid '100'
	option description 'LAN100'
	option ports '0t 4t'

config switch_vlan
	option device 'switch0'
	option vlan '8'
	option ports '0t 4t'
	option vid '106'
	option description 'WIREGUARD'

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

[...]

config wifi-iface 'wifinet4'
	option device 'radio1'
	option mode 'ap'
	option network 'IOT'
	option encryption 'psk2'
	option key 'SuperSecretPW'
	option ssid 'IOT'
	option hidden '1'
	option disassoc_low_ack '0'

[...]

root@OpenWrt:~#

If anybody has an idea please let me know.

Sometimes you just have to write it out...

I don't know how it happened, but

VLAN 103 was untagged on the CPU. Idk why wireless DHCP would still work, but now I get an IP address on VLAN 103.

testmachine:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1@if196: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 0e:14:41:ec:72:9a brd ff:ff:ff:ff:ff:ff
    inet 10.1.103.62/24 brd 10.1.103.255 scope global dynamic noprefixroute eth1
       valid_lft 86394sec preferred_lft 75594sec
    inet6 fe80::c14:41ff:feec:729a/64 scope link 
       valid_lft forever preferred_lft forever

testmachine:~#
1 Like

change whit:

config interface 'IOT'
	option proto 'static'
	option type 'bridge'
	list ipaddr '10.1.103.1'
	option netmask '255.255.255.0'
	option device 'br-iot'

and post yours /etc/config/firewall

1 Like

I missed it too...

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