Comcast download speed fix for Linksys eSeries

From DD-WRT Wiki

Revision as of 18:38, 8 January 2014 by Kt haddock (Talk | contribs)
Jump to: navigation, search



[Culled from DD-WRT Forum thread Critical DSCP bug Affecting WiFi Download Speeds on Comcast]

There is an edge case interaction between Comcast IPv4 DSCP and improper condition handling in the WMM driver in certain Linksys/Cisco eSeries routers (and possibly others as well) which results in very low download speeds. This issue can appear in both stock and third-party (DD-WRT) firmware, although Cisco appears to have at some point released new WMM drivers that largely resolve the issue in current stock firmware.

Unlike other service providers, IPv4 packets from the Comcast network are configured with DSCP 8, Priority higher than Default/Routine (0).


Download speeds are normal with current stock firmware, and on wired connections with DD-WRT firmware, but are very low (less than 1 Mbps) on wireless connections with DD-WRT firmware.

Because DSCP pertains to QoS, it's possible this problem might only exist when QoS is enabled (and go away when QoS is disabled), but this has not been confirmed.

To see if you are getting the problematic DSCP, look at your downloaded IPv4 packets with Wireshark, preferably directly connected to WAN, but you should see them even on Wi-Fi. (See Add DSCP Column in Wireshark)

VLAN Determination

If you see the problem, you can determine which VLAN needs this fix by navigating to Setup > VLANs. Note which VLAN has the check for Port W. Change vlan as needed in the steps below.


To test this fix, open a Telnet or SSH connection to DD-WRT, and run the following commands:

insmod xt_DSCP.ko
iptables -t mangle -A PREROUTING -i vlan2 -j DSCP --set-dscp 0

Assuming there are no errors, check download speed on wireless.

You may need to change vlan2 depending on your particular setup.


To save the fix so it survives reboots, first navigate to Administration > Commands

In Command Shell, enter Commands:

insmod xt_DSCP.ko

and click Save Startup.

In Command Shell, enter Commands:

iptables -t mangle -A PREROUTING -i vlan2 -j DSCP --set-dscp 0

and click Save Firewall.

This detect which vlan in use:

iptables -t mangle -A PREROUTING -i `nvram get wan_iface` -j DSCP --set-dscp 0


This fix changes DSCP header information as soon as a packet hits the WAN interface on the router.

DSCP as received from Comcast's network is 8. This is actually higher than Default priority, but the WMM driver interprets it incorrectly.

The fix changes DSCP on all packets to 0 (Default priority), which the WMM driver handles properly. (This is how other ISPs set DSCP and is why the issue is specific to Comcast.)