[SOLVED] No DHCP on any interface

I have been a long time user but my latest system, LinksysEA8300, has me baffled. My last system was a Netgear WNDR3800 and it lasted since ~2010 or 2011 before giving me issues with hardware being flaky. It's been a long time since I had to start from scratch. I set up my new device similar to my 3800. I am seeing that I am not getting DHCP on my WAN interface or either of my VLANS. I know that if I do a factory reset the DHCP does work for WAN, so there is something I have wrong. I think I also remember that DHCP from my voip subnet worked for a while too. I think when I switched my regular LAN from br-lan to eth0.101 is when my problem began but I can't say I tested after every change I made to see exactly when the issue started. Anyway, here is my config:

#cat /etc/config/network

config globals 'globals'
        option ula_prefix 'fd8c:a8ff:f3bc::/48'

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

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

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

config device
        option name 'eth1'

config device
        option name 'eth0'

config device
        option name 'wlan0'

config device
        option name 'wlan1'

config device
        option name 'wlan2'

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

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

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

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

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

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

config interface 'lan'
        option proto 'static'
        option ipaddr '172.30.42.1'
        option netmask '255.255.255.224'
        option device 'eth0.101'

config interface 'voip'
        option proto 'static'
        option device 'eth0.102'
        option ipaddr '172.30.42.33'
        option netmask '255.255.255.224'

config interface 'wifi0'
        option proto 'static'
        option ipaddr '172.30.42.65'
        option netmask '255.255.255.224'
        option device 'wlan0'

config interface 'wfi1'
        option proto 'static'
        option ipaddr '172.30.42.97'
        option netmask '255.255.255.224'
        option type 'bridge'
        option device 'wlan1'

config interface 'wifi2'
        option proto 'static'
        option device 'wlan2'
        option ipaddr '172.30.42.113'
        option netmask '255.255.255.224'

#swconfig list; swconfig dev switch0 show

Found: switch0 - 90000.mdio-1
Global attributes:
        enable_vlan: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
        linkdown: ???
Port 0:
        mib: Port 0 MIB counters
RxBroad     : 36
RxPause     : 0
RxMulti     : 63
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 1903
Rx128Byte   : 1587
Rx256Byte   : 392
Rx512Byte   : 299
Rx1024Byte  : 506
Rx1518Byte  : 596
RxMaxByte   : 2784
RxTooLong   : 0
RxGoodByte  : 5837019
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 105
TxBroad     : 245
TxPause     : 0
TxMulti     : 865
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 6195
Tx256Byte   : 188
Tx512Byte   : 10
Tx1024Byte  : 629
Tx1518Byte  : 72
TxMaxByte   : 8
TxOverSize  : 0
TxByte      : 1090648
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        mib: Port 1 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 1
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
RxBroad     : 79
RxPause     : 0
RxMulti     : 339
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 2641
Rx128Byte   : 1048
Rx256Byte   : 76
Rx512Byte   : 5
Rx1024Byte  : 395
Rx1518Byte  : 39
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 631641
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 19
TxPause     : 0
TxMulti     : 9
TxUnderRun  : 0
Tx64Byte    : 1145
Tx128Byte   : 996
Tx256Byte   : 253
Tx512Byte   : 172
Tx1024Byte  : 316
Tx1518Byte  : 2205
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 3765587
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 1
        link: port:2 link:up speed:100baseT full-duplex auto
Port 3:
        mib: Port 3 MIB counters
RxBroad     : 166
RxPause     : 0
RxMulti     : 526
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 1646
Rx128Byte   : 869
Rx256Byte   : 106
Rx512Byte   : 5
Rx1024Byte  : 235
Rx1518Byte  : 40
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 430791
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 6
TxPause     : 0
TxMulti     : 15
TxUnderRun  : 0
Tx64Byte    : 703
Tx128Byte   : 569
Tx256Byte   : 142
Tx512Byte   : 99
Tx1024Byte  : 192
Tx1518Byte  : 1175
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 2036725
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 2
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 2
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
RxBroad     : 3972
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 3977
Rx128Byte   : 0
Rx256Byte   : 2
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 254808
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 3979
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        pvid: 2
        link: port:5 link:up speed:1000baseT full-duplex auto
VLAN 1:
        vid: 101
        ports: 0t 1 2
VLAN 2:
        vid: 102
        ports: 0t 3 4


#ubus call system board

        "kernel": "5.10.176",
        "hostname": "TourvilleNew",
        "system": "ARMv7 Processor rev 5 (v7l)",
        "model": "Linksys EA8300 (Dallas)",
        "board_name": "linksys,ea8300",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "ipq40xx/generic",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"


#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.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option start '1'
        option limit '32'
        option leasetime '24h'

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 'voip'
        option interface 'voip'
        option start '1'
        option limit '32'
        option leasetime '24h'

config dhcp 'wfi1'
        option interface 'wfi1'
        option start '1'
        option limit '32'
        option leasetime '24h'

Can anyone assist and tell me what I am doing wrong? Thanks!

Hi

according to datasheet it is IPQ40xx device, which have a lots of problem with internal switch
on latest OWRT, 23.05.x, IPQ40xx is "upgraded" to DSA, so many of these VLAN problem are gone
so, if you have nerves & patience you should first update to latest OWRT, then sit down and start to learn DSA, but .. yes, it is bigger chance that someone help with DSA vs old swconfig

edit: and to be honest, your config is a pure mess :slight_smile: so better update & start from scratch

1 Like

Thanks for the feedback. I'll look further into DSA. What about my config is so messy? It seems rather similar to my old system. Maybe newer hardware requires a totally different approach?

Yes if you need tagged VLANs on the Ethernet ports, only 23.05 finally gets that to work consistently properly on the ipq4019 chip. This does mean changing to DSA.

There have been several changes to configuration syntax over the years. Do not import config files across major version changes.

well, it is unusual that you divide things this way and put wifi interfaces directly in network config

some "normal" config guide is that you define ethernet/vlans, then put bridges on them, and use these bridges to attach wifi interfaces to [network]

i could understand that yuo want to divide your network on 4 subnet ? and make routing/filtering decision ?
anyway, my opinion, first DSA then the rest

Acknowledged, I did not import any old files though, I built all of it via GUI. Anyway. I'll look at DSA further.

I agree with @NPeca75 that you should upgrade before moving further, and this should be done with a factory reset (required) to keep things working properly since you will be moving from swconfig to DSA. That is in addition to the fact that there are a lot of problems in the config, as also pointed out by @NPeca75 .

Regarding specifics -- a few selected ones to point out:

Is there any reason you're not using /24 networks? This tends to be easier at a human level (the first 3 octets define the network, the last octet is just the address within). There's nothing wrong with using other subnet sizes, but /24 is just the most convenient.

WLAN hardware should not be defined in the network config file, ever. The connection between the network and the radios is done in the wireless file within the SSID configuration stanza.

Your DHCP scopes are wrong for a /29 network (max of 30 hosts).

There are certainly many more issues, but you should start with an upgrade + reset, then build out one additional network (not all) to make sure that everything is working as expected.... doing one network at a time allows you to prove it out the 'recipe' and also means less to correct if you make mistakes. We can help along the way if you define your desired goals.

1 Like

Understood, however a /27 subnet is a very practical size for home. Who needs 255 devices on a subnet? Yes, routing and filtering will be important when all done. I appreciate the general guidance. Time to sit down and read over new methods and go from there. Thanks! :slightly_smiling_face:

if you let me to give you advice, since you are running home network, you are free to use whatever you want from private address space
it is nice to see that someone try to squeeze /27, but ... you make your life hard
so, my advice is that
for vlan 20 use 192.168.20.x/24
for vlan 100 use 192.168.100.x/24
etc
this way, visual debugging will be lot easier, and more human "readable"

1 Like

OK, I get what you are saying. No worries. We were just thinking about it differently. In the end, either could be valid /24 or /27 so long as the config is good. Now time to read up on DSA and start from scratch with a fresh config.

1 Like

Ok fix the DHCP scopes. Yeah, I was thinking of the max number of IPs per subnet instead of usable IPs per subnet. Easily fixed by changing to 30. Point taken on the rest of your advice though. I didn't create the config by hand, I did it all through GUI so I don't fully understand how the wifi configs could be invalid... but that's not the main point. (Just something I wonder about) I'll factory reset and start from scratch using DSA and go from there. I get your point about /24 being more easily readable. Check. Thanks for all the input! :slightly_smiling_face:

it is invalid NOW and will be invalid in DSA also

etc/config/wireless

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option network 'vlan2'

so the key is network
this way you attach WIFI SSID to network configured in /etc/config/network

ok, thanks for clarifying

10 years ago I would have agreed but nowadays a 30 devices limit in a small home is blown pretty fast.

What we have seen here in the forum is people setting these kind of unnecessary dhcp limits and then after a while get strange connection errors.

Also remember we talk about IP leases, not devices so IP addresses can drain faster that you think.

2 Likes

At the risk of beating a dead horse... assembling all the reasons for using a /24:

  1. Easier readability and less cognitive load to understand what subnet any given address is from.
  2. the VLAN ID (0-255) can be encoded in the 3rd octet, making it even easier for readability/debug.
  3. Sufficient space to accommodate any reasonable number of devices by having plenty of available leases (especially with guest networks and such where the users/devices may cycle more frequently).
  4. /24 is a good "maximum" (when fully utilized) size of a single subnet with respect to network efficiency (broadcast/multicast traffic).

In most situations, there is literally no downside to having a /24 vs smaller subnets. Yes, probably 253 client devices will never be attached to the network, but there is no extra maintenance or any other extra work necessary (it's like the benefits of a larger house, but without any extra cleaning or maintenance or cost).

1 Like

Sure, no harm no foul in my mind. It's all just how you think about it. I get your points. We were just thinking differently. What matters most is a correct config. How you subnet is entirely up to taste and I get why you like /24 for supporting users. My home has very modest needs so actually /27 works nicely. But that is not the point of my OP, it was about getting my config working properly. BTW, I have upgraded to version 23 and I no longer see switch config listed as part of the GUI. That may have been part of my downfall. I am working on the new config as we speak.

1 Like

that is DSA :slight_smile:
on swconfig, you have only one eth0 which is CPU port connected to switch chip, and nothing else. separated ports are achieved via virtual interfaces & bridges

on DSA, switch chip become transparent and suddenly you have lan1, lan2, lan3, lan4, wan .... as separated ports
same as you put 5pcs of ETH adapter in PC
so, all complexity of swconfig is left behind. you need to drop all your knowledge of swconfig, and start to think as separated ETH on PC

As I was suggesting earlier, keep it simple and build one network at a time. Post your configs here if you have questions, issues, or just want a sanity check.

I got it all working beautifully after updating to the latest release. I was using the GUI only to create my configs. No hand edits using ssh/vi. The big difference was some changes betweeen ver 22 & 23. With version 23 I no longer had a switch config available via GUI. The device names were also different.

I also did read the manual.

Linksys EA8300 Wiki It states -

Download from the OpenWRT site exclusively the 22.03.5 OpenWRT version factory.bin image. Using a more recent build on this step will lead to a soft-brick.

So, following that logic I downloaded that specific version and didn't go any higher for fear of bricking my device. I only went to a higher version after being encourage to do so here. So with all due respect, it's about how I was reading the documentation. A strict interpretation would say don't update . I am glad to know you all advised otherwise.

I did get some warnings when trying to upgrade to ver 23 and needed to force the config. Anyway, I am glad it is all working. ISSUE SOLVED !!!

BTW, here is my working config:

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'
        option ula_prefix 'fd04:fe23:e1bc::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan3'
        list ports 'lan4'

config device
        option name 'lan1'
        option macaddr 'e8:9f:80:a3:ef:e2'

config device
        option name 'lan2'
        option macaddr 'e8:9f:80:a3:ef:e2'

config device
        option name 'lan3'
        option macaddr 'e8:9f:80:a3:ef:e2'

config device
        option name 'lan4'
        option macaddr 'e8:9f:80:a3:ef:e2'

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 device
        option name 'wan'
        option macaddr 'e8:9f:80:a3:ef:e1'

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

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

config device
        option type 'bridge'
        option name 'br-voip'
        list ports 'lan1'
        list ports 'lan2'

config interface 'voip'
        option proto 'static'
        option device 'br-voip'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

config interface 'wifi0'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'

config interface 'wifi1'
        option proto 'static'
        option ipaddr '192.168.4.1'
        option netmask '255.255.255.0'

Thank you ALL!!! Wow, I am blown away by how quickly everyone responded with offers to help! I learned a few new things in the process.