Redmi AC2100 DSA and cable modem -> no DHCP answer?

Hi folks,

I try to connect my CISCO Cable Modem to my Redmi AC2100 with OpenWRT 21.02.0 RC4.

The problem, I cant get anything back from my modem (for sure, I have restarted it also, before switch it to a other device, that MAC Address learned is cleared). But there is no DHCP answer from the modem.

I also tested to remove lan3 from br-lan and switched wan interface to lan3 device. Same problem.

I know, that cable modems have such problems with vlan - I also was at some customers and I tried to connect the cable modem over a VLAN, but was never able to get a IP Address from it.

I captured the process with tcpdump and analyzed it with wireshark, but could not find any problem.

I have a second OpenWRT Router (TP-Link Archer C2600) with OpenWRT 19.07.7 and there I am be able to connect to the Internet.

Has someone any hint what I can try to fix my problem?

I think it has something to do with the new DSA switch config interface.

Summary

Power cycling the cable modem reset the mac lock.

thanks for your hint, but I have already written, that I have done this. Maybe me English is to bad - sry for that.

ok, today I tested to install openwrt_xiaomi_mtk_mod_cjcr version 1.2 from New Xiaomi Router AC2100 - #1256 by Cjcr

It is based on OpenWrt SNAPSHOT r3150-5dcbd82a5 / LuCI Master (git-21.096.35788-b200c7b)

And it has the old swconfig - there I get a address from the cable modem.

this brings me back to the point, that it has something to do with the new DSA support.

Are there any options to test without DSA setup or change the configuration for the switch?

As I already told, I know, that cable modems have problems with vlan - but I dont know the technical details about it. I only know, that it dont work - maybe only when the switch is not reporting anything to the cable modem, so that the modem dont lean a wrong mac - but this is only a guess.

I have found some reports on the internet, where they had the same problem with vlan and cable modems - but no solution.

If you really want to know what is going on you would need to monitor the Ethernet communication between the cable modem and your router e.g. using a switch in-between which allows monitoring mode so you may hook in a PC running wireshark to capture all traffic.
Anyway, that VLAN not supported claim surprises me as while the older swconfig was relying on VLANs to differentiate LAN from WAN traffic the later DSA does actually use proper switch tags instead.

Did you use it before and then switched to AC2100? Probably a MAC address whitelist at ISP side?

I try to organize a old hub or managed switch with the needed ability.

The mac address from the client is leaned from the cable modem, when u change your device, you have to restart your cable modem, so that the learned mac address is cleared - this works asap after the restart.

Have you tried changing the MAC address then?

to the address from the device before or to what?

To the working one's MAC address.

I can test it, but after the restart of the modem it will again not work - because the old one get cleared.
So this will not really help.

Then how does it learn "the new one"? If it does not learn, isn't it broken forever?

But when it learn first a wrong one, like I link it does.... however I try to find my old hub.... than I will know more.

okay, it makes me mad, but I think I have trown away my old hub. I have a cisco managed switch, but with it connected between I have the same problem - also on the working router with swconfig.

I tried to shut off all possible things on the managed switch like stp / lldp / cdp / ... but it is the same problem like the one I have seen on many other customers where I was.

the best option is to buy a old hub and try with that. Today I cant continue, because the Modem is on a other house I cant enter now because they wont to sleep :slight_smile:

I will report back when I have some news - maybe someone else have a other idea or have some technical background about the problem.

oh, and there is a small collection from ppl with the same problem - no one had really found a solution (sorry most in german):

this guy have identified the problem:

He says, that the cable modems learns the first mac address it sees - not only the first who make a dhcp discover - but what can I do that OpenWRT with DSA don't send a wrong mac address?

I dont want to use a switch - I have connected the modem directly to the router.

So that's not really the DSA's issue, but an unfortunate design flaw of the modem.
Depending on your router's bootloader, it may not isolate ports before loading the kernel, which will cause the modem learn a LAN client MAC by mistake.

A possible workaround is to reboot the modem after the router boots.

1 Like

The problem is that the router was already booted and the interface is up and polling for the address.

hence the suggestion to reboot the modem....

But it is what I already have done

The router was up and polling for the address, than I rebooted the modem.

What ever it is, it will not happen with the old swconfig method.

And it is also not limited to the modem x, it happens on many modems which are limited by Vodafone.

So this will be a problem for more users in future.

hi, I got some news.

Today I had again some time to do some tests. I got it working with DSA at 21.02.0 RC4 - but ONLY with a dump Switch between wan port and the modem.

What I did:

  1. connect modem to wan
  2. restarted interface with ifup wan
  3. restarted the modem - what I see at this point in logread:
Wed Aug 25 18:37:20 2021 daemon.notice netifd: Network device 'wan' link is down
Wed Aug 25 18:37:20 2021 daemon.notice netifd: Interface 'wan' has link connectivity loss
Wed Aug 25 18:37:20 2021 kern.info kernel: [68683.478235] mt7530 mdio-bus:1f wan: Link is Down
Wed Aug 25 18:37:20 2021 daemon.notice netifd: wan (29506): udhcpc: received SIGTERM
Wed Aug 25 18:37:20 2021 daemon.notice netifd: wan (29506): udhcpc: entering released state
Wed Aug 25 18:37:20 2021 daemon.notice netifd: wan (29506): Command failed: Permission denied
Wed Aug 25 18:37:20 2021 daemon.notice netifd: Interface 'wan' is now down
Wed Aug 25 18:37:20 2021 daemon.notice netifd: Interface 'wan' is disabled
Wed Aug 25 18:37:20 2021 kern.info kernel: [68683.617209] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
Wed Aug 25 18:37:20 2021 kern.info kernel: [68683.624819] 8021q: adding VLAN 0 to HW filter on device wan
Wed Aug 25 18:37:20 2021 daemon.notice netifd: Interface 'wan' is enabled
Wed Aug 25 18:37:56 2021 kern.info kernel: [68719.477636] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control off
Wed Aug 25 18:37:56 2021 kern.info kernel: [68719.484909] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
Wed Aug 25 18:37:56 2021 daemon.notice netifd: Network device 'wan' link is up
Wed Aug 25 18:37:56 2021 daemon.notice netifd: Interface 'wan' has link connectivity
Wed Aug 25 18:37:56 2021 daemon.notice netifd: Interface 'wan' is setting up now
Wed Aug 25 18:37:56 2021 daemon.notice netifd: wan (29717): udhcpc: started, v1.33.1
Wed Aug 25 18:37:56 2021 daemon.notice netifd: wan (29717): udhcpc: sending discover
Wed Aug 25 18:37:59 2021 daemon.notice netifd: wan (29717): udhcpc: sending discover
Wed Aug 25 18:38:02 2021 daemon.notice netifd: wan (29717): udhcpc: sending discover

but on tcpdump I see only dhcp discover packets - nothing else

  1. than I disconnected modem from router and put a unmanaged switch bethween
  2. I got directly a IP address without reboot the modem
Wed Aug 25 18:40:49 2021 daemon.notice netifd: Network device 'wan' link is down
Wed Aug 25 18:40:49 2021 daemon.notice netifd: Interface 'wan' has link connectivity loss
Wed Aug 25 18:40:49 2021 kern.info kernel: [68892.529559] mt7530 mdio-bus:1f wan: Link is Down
Wed Aug 25 18:40:49 2021 daemon.notice netifd: wan (29717): udhcpc: received SIGTERM
Wed Aug 25 18:40:49 2021 daemon.notice netifd: wan (29717): udhcpc: entering released state
Wed Aug 25 18:40:49 2021 daemon.notice netifd: wan (29717): Command failed: Permission denied
Wed Aug 25 18:40:49 2021 daemon.notice netifd: Interface 'wan' is now down
Wed Aug 25 18:40:49 2021 daemon.notice netifd: Interface 'wan' is disabled
Wed Aug 25 18:40:49 2021 kern.info kernel: [68892.707933] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
Wed Aug 25 18:40:49 2021 kern.info kernel: [68892.715991] 8021q: adding VLAN 0 to HW filter on device wan
Wed Aug 25 18:40:49 2021 daemon.notice netifd: Interface 'wan' is enabled
Wed Aug 25 18:40:53 2021 kern.info kernel: [68896.817683] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
Wed Aug 25 18:40:53 2021 kern.info kernel: [68896.825159] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
Wed Aug 25 18:40:53 2021 daemon.notice netifd: Network device 'wan' link is up
Wed Aug 25 18:40:53 2021 daemon.notice netifd: Interface 'wan' has link connectivity
Wed Aug 25 18:40:53 2021 daemon.notice netifd: Interface 'wan' is setting up now
Wed Aug 25 18:40:53 2021 daemon.notice netifd: wan (30011): udhcpc: started, v1.33.1
Wed Aug 25 18:40:53 2021 daemon.notice netifd: wan (30011): udhcpc: sending discover
Wed Aug 25 18:40:55 2021 daemon.warn dnsmasq[19964]: failed to create listening socket for fe80::6664:4aff:fe9a:88bd%wan: Address in use
Wed Aug 25 18:40:56 2021 daemon.notice netifd: wan (30011): udhcpc: sending discover
Wed Aug 25 18:40:59 2021 daemon.notice netifd: wan (30011): udhcpc: sending discover
Wed Aug 25 18:41:08 2021 daemon.notice netifd: wan (30011): udhcpc: sending select for X.X.X.X
Wed Aug 25 18:41:08 2021 daemon.notice netifd: wan (30011): udhcpc: lease of X.X.X.X obtained, lease time 4625
Wed Aug 25 18:41:09 2021 daemon.notice netifd: Interface 'wan6' is enabled
Wed Aug 25 18:41:09 2021 daemon.notice netifd: Network alias 'wan' link is up
Wed Aug 25 18:41:09 2021 daemon.notice netifd: Interface 'wan6' has link connectivity
Wed Aug 25 18:41:09 2021 daemon.notice netifd: Interface 'wan6' is setting up now
Wed Aug 25 18:41:09 2021 daemon.notice netifd: Interface 'wan' is now up
Wed Aug 25 18:41:09 2021 user.notice firewall: Reloading firewall due to ifup of wan (wan)
Wed Aug 25 18:41:10 2021 user.notice nlbwmon: Reloading nlbwmon due to ifup of wan (wan)
Wed Aug 25 18:41:17 2021 daemon.notice netifd: Interface 'wan6' is now up
Wed Aug 25 18:41:18 2021 user.notice firewall: Reloading firewall due to ifup of wan6 (wan)
Wed Aug 25 18:41:19 2021 user.notice nlbwmon: Reloading nlbwmon due to ifup of wan6 (wan)

it seems, that the driver has problems with the ethernet connection - but how can I debug that?