Comcast download speed fix for Linksys eSeries

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 18:12, 31 December 2013 (edit)
JNavas (Talk | contribs)
m (Testing - edit)
← Previous diff
Current revision (18:15, 18 March 2018) (edit) (undo)
Ian5142 (Talk | contribs)
(Added Advanced tutorials category.)
 
(27 intermediate revisions not shown.)
Line 3: Line 3:
[Culled from DD-WRT Forum thread [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=176395 Critical DSCP bug Affecting WiFi Download Speeds on Comcast]] [Culled from DD-WRT Forum thread [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=176395 Critical DSCP bug Affecting WiFi Download Speeds on Comcast]]
-There is a critical bug that is likely crippling thousands of routers and pretty much only Comcast has this issue. It is an edge case interaction caused by bad [https://en.wikipedia.org/wiki/Differentiated_services DSCP] information coming from Comcast and poor condition handling by the [https://en.wikipedia.org/wiki/Wireless_Multimedia_Extensions WMM] driver in certain '''Linksys/Cisco eSeries''' routers (and possibly others as well). This issue can appear on both stock and modded routers. Comcast's network is misconfigured and has been for years and has likely caused many people to needlessly replace fully functional routers. IPv6 works because DSCP was configured correctly for that but it is incorrect for IPv4. Since the only packets with this bad information are the ones that are being downloaded, upload is not affected nearly as badly.+There is an edge case interaction between Comcast IPv4 [https://en.wikipedia.org/wiki/Differentiated_services DSCP] and improper condition handling in the [https://en.wikipedia.org/wiki/Wireless_Multimedia_Extensions 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.
 + 
 +The cause is that IPv4 packets from the Comcast network are configured with DSCP 8, which the driver handles improperly, whereas other providers typically use DSCP 0, which the driver handles properly. (Both are valid values.)
-''Cisco appears to have at some point released new WMM drivers in stock firmware that largely resolve the issue on current stock firmware.'' 
== Symptoms == == Symptoms ==
-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.+Download speeds are normal with ''current'' stock firmware, and on ''wired'' connections with DD-WRT firmware, but are much lower (possibly even less than 1 Mbps) on ''wireless'' connections with DD-WRT firmware even with strong signal.
 + 
 +To see if you are getting the problematic DSCP, you can look at your downloaded IPv4 packets with [http://www.wireshark.org/ Wireshark], preferably directly connected to WAN, but you should see them even on Wi-Fi. (See [http://netspoon.wordpress.com/2012/09/08/add-dscp-column-in-wireshark/ Add DSCP Column in Wireshark])
 + 
== Testing == == Testing ==
-To see if you are getting the bad DSCP, take a look at your downloaded IPv4 packets with [http://www.wireshark.org/ Wireshark], preferably directly connected to WAN, but you should see them even on Wi-Fi. 
-If you see the problem, open a Telnet or SSH connection to DD-WRT, and run the following commands:+To test this fix, open a Telnet or SSH connection to DD-WRT, and run the following commands (copy and paste to avoid typos):
insmod xt_DSCP.ko insmod xt_DSCP.ko
- iptables -t mangle -A PREROUTING -i vlan2 -j DSCP --set-dscp 0+ iptables -t mangle -A PREROUTING -i `nvram get wan_ifname` -j DSCP --set-dscp 0
Assuming there are no errors, check download speed on wireless. Assuming there are no errors, check download speed on wireless.
-You may need to change ''vlan2'' depending on your particular setup. 
== Configuration == == Configuration ==
-To save the fix so it survives reboots, first navigate to ''Administration'' > ''Commands''+To save the fix so it survives reboots, navigate to ''Administration'' > ''Commands''
-In Command Shell, enter Commands:+In Command Shell, enter Commands (copy and paste to avoid typos):
insmod xt_DSCP.ko insmod xt_DSCP.ko
and click ''Save Startup''. and click ''Save Startup''.
-In Command Shell, enter Commands:+In Command Shell, enter Commands (copy and paste to avoid typos):
- iptables -t mangle -A PREROUTING -i vlan2 -j DSCP --set-dscp 0+ iptables -t mangle -A PREROUTING -i `nvram get wan_ifname` -j DSCP --set-dscp 0
and click ''Save Firewall''. and click ''Save Firewall''.
-== Methodology == 
-This fix corrects the bad DSCP header information as soon as a packet hits the WAN interface on a router. 
-DSCP as received from Comcast's network is 0x08. This is the lowest priority possible, which WMM interprets as being unimportant to transmit quickly.+== Methodology ==
 +This fix changes DSCP header information in all packets to DSCP 0 when they arrive at the WAN interface of the router, which the WMM driver handles properly.
-The fix changes DSCP on all packets to 0x00, which essentially means unclassified, which WMM handles properly. This is how virtually every other ISP uses DSCP and is why the issues is specific to Comcast. 
== References == == References ==
Line 46: Line 46:
* [https://en.wikipedia.org/wiki/Wireless_Multimedia_Extensions Wireless Multimedia Extensions] * [https://en.wikipedia.org/wiki/Wireless_Multimedia_Extensions Wireless Multimedia Extensions]
* [http://www.wireshark.org/ Wireshark] * [http://www.wireshark.org/ Wireshark]
 +** [http://netspoon.wordpress.com/2012/09/08/add-dscp-column-in-wireshark/ Add DSCP Column in Wireshark]
[[Category:Documentation| ]] [[Category:Documentation| ]]
[[Category:Tutorials| ]] [[Category:Tutorials| ]]
[[Category:Comcast| ]] [[Category:Comcast| ]]
 +[[Category:Linksys guides]]
 +[[Category:Linksys]]
 +[[Category:Advanced tutorials]]

Current revision

Contents

[edit] Introduction

[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.

The cause is that IPv4 packets from the Comcast network are configured with DSCP 8, which the driver handles improperly, whereas other providers typically use DSCP 0, which the driver handles properly. (Both are valid values.)


[edit] Symptoms

Download speeds are normal with current stock firmware, and on wired connections with DD-WRT firmware, but are much lower (possibly even less than 1 Mbps) on wireless connections with DD-WRT firmware even with strong signal.

To see if you are getting the problematic DSCP, you can 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)


[edit] Testing

To test this fix, open a Telnet or SSH connection to DD-WRT, and run the following commands (copy and paste to avoid typos):

insmod xt_DSCP.ko
iptables -t mangle -A PREROUTING -i `nvram get wan_ifname` -j DSCP --set-dscp 0

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


[edit] Configuration

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

In Command Shell, enter Commands (copy and paste to avoid typos):

insmod xt_DSCP.ko

and click Save Startup.

In Command Shell, enter Commands (copy and paste to avoid typos):

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

and click Save Firewall.


[edit] Methodology

This fix changes DSCP header information in all packets to DSCP 0 when they arrive at the WAN interface of the router, which the WMM driver handles properly.


[edit] References