OpenWRT and Spectrum DOCSIS 3.1

How to get OpenWRT to work with a DOCSIS 3.1 modem from Spectrum?

Btw this is my first time installing OpenWRT I do have a small amount of GNU/Linux knowledge. But other than that have no idea why it’s not working lol.

I do see the “Use Broadcast Flag” under advance settings for the wan interface. I do have that enabled. Under that setting it says “Client ID to send when requesting DHCP” is this the MAC Address of the router that’s on the sticker on the bottom of the router? Like what do I put there? Under that setting “Vendor Class to send when requesting DHCP” what do I put in there can I put “netgear” or?

In the General Settings tab in the wan interface I do also see “Hostname to send when requesting DHCP” do I leave it on “Send the hostname of this device” or set it to “Do not send a hostname”

What is happening now is when I reboot the router and the modem at the same time, when they come online there will be internet for like 3 minutes and then after that it just stops working. I’m guessing this because there’s a window for the router to send the correct information to the modem or whatever then if it doesn’t it just stops

You just connect, docsis wan profile is ethernet port with common autoconf protocols.

1 Like

Why isn’t it working then?, why does it randomly after a couple of minutes, the internet just stops how to diagnose?

Let's verify your config and look at some other details.

First, when the internet is working, let's see the output of:

logread -e udhcpc
ifstatus wan

The above may reveal public IP address information -- be sure to redact that if starts with anything other than 192.168.x.x, 10.x.x.x, 172.16.x.x - 172.31.x.x. or 100.64.x.x - 100.127.x.x

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
1 Like

Can you capture "logread" while manually restarting that "wan" interface from luci (it is system log in status section of luci if you are against putty and command lines)

In normal world sense WAN has to stay up forever, DOCSIS 3 does not mandate dhcp via broadcast anymore, but to detect that mismatch you would need to wait hour to week to see IP address refresh failing and internet connection fading away.
Normally you do not change those fields, one by default is MAC addres, other is udhcp + busybox version, you know, provider has techies that can apply compat quirks based on those fields being sent as by default.

What I am saying it is unrelated to what your provider does with docsis to configure their equipment, problem is the network cards and mii controllers on both ends not being exactly compatible. It happens every now ant then and should be fixed. Can you check with any PC with all firewalls on if you get connectivity for more than 5 minutes? I suppose yes.

All these commands were run when the internet was working, except for the "cat /etc/config/dhcp" that was taken like 3 seconds after it just turned off randomly.

root@OpenWrt:~# logread -e udhcpc
Sat May 11 20:45:58 2024 daemon.notice netifd: wan (2063): udhcpc: started, v1.36.1
Sat May 11 20:45:58 2024 daemon.notice netifd: wan (2063): udhcpc: broadcasting discover
Sat May 11 20:46:01 2024 daemon.notice netifd: wan (2063): udhcpc: broadcasting discover
Sat May 11 20:46:04 2024 daemon.notice netifd: wan (2063): udhcpc: broadcasting discover
Sat May 11 20:49:22 2024 daemon.notice netifd: wan (2063): udhcpc: received SIGTERM
Sat May 11 20:49:22 2024 daemon.notice netifd: wan (2063): udhcpc: entering released state
Sat May 11 20:50:23 2024 daemon.notice netifd: wan (2800): udhcpc: started, v1.36.1
Sat May 11 20:50:23 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting discover
Sat May 11 20:50:26 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting discover
Sat May 11 20:50:26 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting select for 192.168.100.10, server 192.168.100.1
Sat May 11 20:50:27 2024 daemon.notice netifd: wan (2800): udhcpc: lease of 192.168.100.10 obtained from 192.168.100.1, lease time 20
Sat May 11 20:50:41 2024 daemon.notice netifd: wan (2800): udhcpc: sending renew to server 192.168.100.1
Sat May 11 20:50:42 2024 daemon.notice netifd: wan (2800): udhcpc: lease of 192.168.100.10 obtained from 192.168.100.1, lease time 20
Sat May 11 20:50:58 2024 daemon.notice netifd: wan (2800): udhcpc: sending renew to server 192.168.100.1
Sat May 11 20:50:59 2024 daemon.notice netifd: wan (2800): udhcpc: lease of 192.168.100.10 obtained from 192.168.100.1, lease time 20
Sat May 11 20:51:14 2024 daemon.notice netifd: wan (2800): udhcpc: sending renew to server 192.168.100.1
Sat May 11 20:51:17 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting renew
Sat May 11 20:51:20 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting renew
Sat May 11 20:51:23 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting renew
Sat May 11 20:51:26 2024 daemon.notice netifd: wan (2800): udhcpc: lease lost, entering init state
Sat May 11 20:51:26 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting discover
Sat May 11 20:51:26 2024 daemon.notice netifd: wan (2800): udhcpc: broadcasting select for 174.x.x.130, server 142.2xx.2xx.101
Sat May 11 20:51:26 2024 daemon.notice netifd: wan (2800): udhcpc: lease of 174.x.x.130 obtained from 142.2xx.2xx.101, lease time 3600

root@OpenWrt:~# ifstatus wan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 142,
        "l3_device": "wan",
        "proto": "dhcp",
        "device": "wan",
        "updated": [
                "addresses",
                "routes",
                "data"
        ],
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "174.109.xxx.1xx",
                        "mask": 20
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "174.1xx.1xx.1",
                        "source": "174.1xx.1xx.130/32"
                }
        ],
        "dns-server": [
                "209.xx.xx.61",
                "209.xx.xx.62"
        ],
        "dns-search": [
                "nc.rr.com"
        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "dhcpserver": "142.2xx.2xx.101",
                "hostname": "OpenWrt",
                "leasetime": 3600
        }
}
root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.30",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 5 (v7l)",
        "model": "NETGEAR RBR40",
        "board_name": "netgear,rbr40",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r26272-39f595d1d8",
                "target": "ipq40xx/generic",
                "description": "OpenWrt SNAPSHOT r26272-39f595d1d8"
        }
}

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 'fd6a:dce0:e131::/48'

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

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 interface 'wan'
        option device 'wan'
        option proto 'dhcp'

I don't have wireless enabled yet but here is the config anyways

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

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/a000000.wifi'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option disabled '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/a800000.wifi'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

This "cat /etc/config/dhcp" was taken like 3 seconds
 after the internet just stopped working so,
 I can restart the router and the modem again to get the internet working
, and redo this command. If needed.
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 cachesize '1000'
        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'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
        option start '100'
        option limit '150'
        option leasetime '12h'

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

Also, these commands were taken when the ‘Use broadcast flag’ was off. I was just testing around to see if it made any difference, but nope, having it on or off didn’t change anything. The internet still randomly stops working after a couple of minutes after rebooting the DOCSIS 3.1 modem.

I did notice the only thing in the "logread" command when the internet just stops working it says Sun May 12 23:36:02 2024 daemon.warn odhcpd[1287]: No default route present, overriding ra_lifetime to 0!

Ok when restarting the "wan" interfance from LUCI this is what is says on "logread"

This was taken when the internet was not working, and then even after restarting the "wan" interface there continue to be no internet. Just FWI

Sun May 12 23:48:32 2024 daemon.notice netifd: wan (3850): udhcpc: received SIGTERM
Sun May 12 23:48:32 2024 daemon.notice netifd: wan (3850): udhcpc: unicasting a release of 174.1xx.1xx.1xx to 142.xxx.2xx.101
Sun May 12 23:48:32 2024 daemon.notice netifd: wan (3850): udhcpc: sending release
Sun May 12 23:48:32 2024 daemon.notice netifd: wan (3850): udhcpc: entering released state
Sun May 12 23:48:32 2024 daemon.notice netifd: wan (3850): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Sun May 12 23:48:32 2024 daemon.notice netifd: Interface 'wan' is now down
Sun May 12 23:48:32 2024 daemon.notice netifd: Interface 'wan' is setting up now
Sun May 12 23:48:32 2024 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Sun May 12 23:48:32 2024 daemon.notice netifd: wan (4379): udhcpc: started, v1.36.1
Sun May 12 23:48:32 2024 daemon.notice netifd: wan (4379): udhcpc: broadcasting discover
Sun May 12 23:48:35 2024 daemon.notice netifd: wan (4379): udhcpc: broadcasting discover
Sun May 12 23:48:38 2024 daemon.notice netifd: wan (4379): udhcpc: broadcasting discover
root@OpenWrt:~#

Have you tried rebooting the cable modem recently?

  • Disconnect the cable modem and the router from power.
  • Disconnect the ethernet cable between the modem and the router.
  • Power up the modem and let it boot completely. Then power cycle it again by briefly disconnecting power. Repeat 2 more times for a total of 3 boot cycles.
  • Connect power to the router and let it boot completely.
  • Connect the ethernet cable between the modem and the router's wan port.
  • Test and see what happens.

If it still doesn't work (or fails to work shortly thereafter), please show us the output of:

logread -e udhcpc
ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Do you hapoen to connect multiple devices to cpe? 192.168.100 is auto-nat that app#ars when you jump your quota of 1 or 2 ip addresses.

I’m not sure what you mean there but 192.168.100.1 is how you would access the DOCSIS modem interface, you get to see the channels for downstream and upstream.

I’ve tried, but it’s still not working. I have another NETGEAR router that’s running the official firmware from NETGEAR. I was testing it, and when I plug it into the DOCSIS modem and then just reset the DOCSIS modem, the NETGEAR works perfectly indefinitely. There’s none of this resetting a million times to hopefully get it working. But back to OpenWRT on my RBR40 the result is always the same: every time I reset the modem, there will be internet for about 3 to 5 minutes, and then it drops. So, there might be a bug with the snapshot builds of OpenWRT, but I don’t know.
However, I have also provided the commands that you have already listed above.

I give up on OpenWRT and will revert to the official NETGEAR firmware for my Orbi. I’ve wasted multiple hours over the last four days. Perhaps in the future, when the RBR40 has a stable release of OpenWRT, I’ll consider giving it another try.

Edit: I will attempt at a couple more hours. Before I uninstall OpenWRT. I will firstly add “option macaddr 'XX:XX:XX:XX:XX:XX'” to the “wan” interface in “/etc/config/network” I thought I did this before but can’t remember so I will give another try.

So the one part of problem is that CPE perceives that you changed MAC address, so it puts it into local-to-cpe 192.168.100/24 network.

One possible cause is that you connect some other device to CPE, like smart tv

Second possible cause is that OpenWRT does not get correct MAC address from vendors partition, so random one is generated at each boot - you can check with ip link then reboot router, then run ip link again
If this is the case you can type MAC address from device label for WAN interface into luci and work around it, and certainly report a bug via github tracker

Third possibility is that switch built into router is defective in a way that it is started with all ports connected , so some wired client on your home network side manages to send a dhcp request before router. and when router requests it is put in temporary private network by CPE until permitted to acquire real IP address. Report a bug.

Not an expert, but these look out of place for wan, where you would operate a DHCP client only... especially the option leasetime '12h' might cause issues if the client for what ever reason assumes that to override the true leasetime... (Be gentle I am no DHCP expert and I might be barking up the wrong tree here, but looking here makes me think these are settings for OpenWrt's DHCP server)

1 Like

I have to test all these theories, but can’t at the moment. But I found this bug, could this be the cause of my problems?https://github.com/openwrt/openwrt/issues/13992

First check the effects at the device?

You are getting a lease from the isp that is one hour. Does the internet work for exactly one hour and then stop?

1 Like

Lets see if mac change triggers auto-nat

A MAC change should happen on cold or maybe warm starts, but not while the router is running, no?