Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Linksys E4200 v1 DD-WRT Startup Script
## Steve Jenkins' E4200 v1 Speed Optimizations
## Can be used on any Broadcom-based DD-WRT device
## PLEASE READ: http://wp.me/p1iGgP-DW
## Have fun, but use and tweak at your own risk :)
## Updated Feb 4, 2016
## INITIAL SLEEP COMMAND
## First command in script is ignored in some builds, so this is a throw-away
sleep 10
## LAN ADAPTER TWEAKS
## Reduce transfer queue lengths on LAN interface to reduce buffer bloat (Default: 1000)
## Do not use if QoS is enabled
## Feel free to experiment with this setting for your network
#ifconfig eth0 txqueuelen 5
## WIRELESS ADAPTER TWEAKS
## Set eth1 wireless LAN interface mitigation to Auto (Default: Not set)
wl -i eth1 interference 4
## Set eth2 wireless LAN interface mitigation to Auto (Default: 1)
## Comment out the followoing line if on a SINGLE radio device
wl -i eth2 interference 4
## TCP TWEAKS
## Increase max receive buffer size (Default: 114688)
echo 262144 > /proc/sys/net/core/rmem_max
## Increase max send buffer size (Default: 114688)
echo 262144 > /proc/sys/net/core/wmem_max
## Increase TCP read buffers (Default: 4096 87380 87380)
echo "4096 87380 262144" > /proc/sys/net/ipv4/tcp_rmem
## Increase TCP write buffers (Default: 4096 16384 65536)
echo "4096 16384 262144" > /proc/sys/net/ipv4/tcp_wmem
## Increase max packet backlog (Default: 120)
echo 1000 > /proc/sys/net/core/netdev_max_backlog
## Increase max connection tracking buckets (Default: 4096)
echo 16384 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
## Increase connection tracking hash size (Default: 1024)
echo 16384 > /sys/module/nf_conntrack/parameters/hashsize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment