DHCP Client with MB8600 DOCSIS 3.1 Modem

Hello, I have been using OpenWRT for a few days now but it will not get an ip address from my modem unless I use a specific workaround I will detail at the bottom of the post.

My configuration:

MB8600 modem connected to raspberry pi 4 running openwrt connected through a TL-SG108E switch. The switch VLAN configuration is working and allows me to use only the built in ethernet port for both LAN and WAN. Although this isn't ideal there are reasons for setting it up this way.

Problems:

When I restart the modem openwrt will get the ip 192.168.100.10/24 on the wan interface. This is correct and it has a 30 second lease time allowing access to the admin panel. After this lease expires the new ip address is never leased and the interface will set without an ip indefinitely.

Behaviour when connected to laptop or opnsense:

The interface gets the ip address above (192.168.100.10/24) and then approx 30 seconds later will get the public ip address.

Workaround to force ip address:

First unplug modem and connect ethernet to another computer. Turn on modem and wait for it to get a public ip. After ip has been acquired copy MAC address of the device. Unplug ethernet cable from computer. In OpenWRT change MAC address of the wan device (vlan2 in my case) to the MAC of the device you copied down and apply config. Plug ethernet cable from modem into the switch port. OpenWRT will then get an IP address.

Troubleshooting steps and pcap files:

To figure out what is going on I made wirehsark packet captures of the traffic between my laptop and the modem and OpenWRT and the modem before and after applying my workaround.

Laptop to Modem DHCP traffic: https://drive.google.com/file/d/1J8cixP_bw6MDgMKB_Doxh0eAmNYbGFFS/view?usp=sharing
OpenWRT to Modem traffic: https://drive.google.com/file/d/1lSjnKU-2DwiO4Sp_mpnRsvLsB_YBlBjf/view?usp=drive_link

I captured the second by making a port on the switch mirror all the traffic on the port the modem is connected to and then captured that port in wireshark. Both files are filtered to include only dhcp traffic.

Differences in files:

In the first file packet, 13 is a DHCP NAK, which is never sent in the second file.

This is not an OpenWrt issue. Your problem is here:

This switch has major firmware implementation issues that make it unsuitable for connection to an upstream network like this particular scenario.

The problem here stems from the fact that there is no way to set the management VLAN for the SG1xxE devices, so it's actually accessable from all VLANs (which is very bad). And, critically, this means that TL-SG108E presents its MAC address to the cable modem which then "learns" the 'wrong' MAC. It should see the router's MAC as the one it learns, but this doesn't happen when this switch is in use. And most cable modems are setup such that they will only issue an IP to the learned MAC. The cable modem typically needs to be rebooted/power-cycled to release/re-learn the MAC, but in this scenario, it will always see the switch MAC first.

The solution is simple (there are two hardware options):

  1. Get a USB-to-ethernet adapter so that you have two ethernet ports on your Pi4 router. One will be your lan(s), the other will be your wan. This way your SG108E isn't working with both a wan and lan environment. (it should only be on the lan side).
  2. Get a better managed switch. The business grade switches from TP-Link work fine for this scenario, as do a bunch of other managed switches. It is the entry level from TP-Link and Netgear that are the problem, though.

Option 1 is inexpensive -- $10USD or so. Just make sure you get an adapter that has proper driver support in OpenWrt (the UE300 is very popular).

Option 2 is more expensive, but a better option if you want to maintain the clean "router on a stick" physical configuration.

There might be a third, free option here, but I wouldn't completely trust it (it might work as a stop gap). Make sure that the TL-SG108E is not set to DHCP. Instead, set it with a static IP address. The thinking here is that if the SG108E doesn't try to request a DHCP lease, the cable modem might see the router MAC as the one it learns. But do not rely on this to be robust... the solutions are above.

For posterity this does not work and is the configuration I already have.

I have a dell PowerConnect 2724 and will attempt with that switch and report back

You have to set the SG108 to static IP-- disable the switch DHCP or it will be a race condition whether the switch or the router will take your single public IP from the modem.

I am using one as described with a "router on a stick" VLAN system as the OP is.

Thanks for that update.

Make sure that you have the wan on a VLAN that is only a member of the 2 ports involved (modem, router).

2 Likes

The PowerConnect 2724 works perfectly and allows the router to get an IP address. Thank you very much @psherman

2 Likes

Could you send a tcpdump of your setup, I suspect your modem is not binding to the mac address in the same way the MB8600 does. My switch is sending broadcast packets very frequently (I think for Omada). It seems that these broadcast packets are binding the modem to the switches mac address and not the switch actually getting the public IP through dhcp.

I stand by my earlier comment that:

Since you have proven that the Dell PowerConnect switch works properly, this doesn't sound like it is related to the modem, but rather the TL-SG1xxE series switches. After all, knowing that those switches don't have a method to define the management VLAN was all that was required for me to diagnose your issue.

AFAIK, the TL-SG1xxE switches do not integrate with the Omada management system. The 2-series switches and above do have that ability, but they also have the critical feature that allows the designation of the management VLAN, which means that the switch itself will not be presenting its MAC to the modem if the wan-side is on a different VLAN (essentially, the switch is transparent).

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