Page 1 of 1

A fine guide to tweak your modem directly.

Posted: Wed Jul 07, 2010 3:23 am
by 100 010 00
i found a nice way to do that.
ssh console to your modem and i just shot the well known linux commands. u will find them in the linux tweaking section.

Code: Select all

echo 1022208 > /proc/sys/net/core/rmem_default
echo 1022208 > /proc/sys/net/core/rmem_max
echo 131071 > /proc/sys/net/core/wmem_default
echo 131071 > /proc/sys/net/core/wmem_max
echo 0 > /proc/sys/net/ipv4/tcp_timestamps 
echo 1 > /proc/sys/net/ipv4/tcp_sack 
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
sysctl -p to save your settings


this is for my dsl package, 24/1 mbits. i didnt change any memory buffers yet, didnt have the time, so i dont have any values to give you. if u feel free with console and u can write english better than me, someone can make a full guide with screenshots to help people, cause u will see many differences than before.
U will gain up your connection, a lot with this tweak. i raised my wirelless connection 1,7mbit up and wired up to 700kbits than the higher i had before....... test it guys, it rates a lot :thumb:

Posted: Sat Jul 10, 2010 8:18 am
by Philip
This settings helps quite a bit with the load of web servers, I imagine it would help routers as well:

echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

It allows reusing sockets in TIME_WAIT state for new connections when it is safe from protocol viewpoint... Also explained in the article.

Great idea if your router has a SSH/telnet cli and linux-based firmware. You should consider the amount of RAM it has available though, may want to try a bit more conservative RWIN values.

Posted: Sat Jul 10, 2010 2:07 pm
by 100 010 00
As far now, i didt have a lot of time to test some more values and as u know there are a lot of them in linux sessions. The goal is that u can tweak your modem directly.

i am happy with these values now. My rwin at far away servers (200ms +) is about 600000B.Also i i have firmed my combo modem - router with an alternative firm, which is giving u 256K amount RAM free for scripting. The developers deleted some languages, keeping only english in GUI. DD-WRT have done a lot of work with these staff

Code: Select all

echo 653400 > /proc/sys/net/core/rmem_default
echo 653400 > /proc/sys/net/core/rmem_max
echo 130680 > /proc/sys/net/core/wmem_default
echo 130680 > /proc/sys/net/core/wmem_m 
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/route/flush
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max
echo 1 > /proc/sys/net/ipv4/tcp_ecn
echo 64 > /proc/sys/net/ipv4/ip_default_ttl
ifconfig eth0  MTU:1500
ifconfig eth0  txqueuelen:1514
i promise, ill check your value :thumb:

Posted: Wed Jul 21, 2010 3:06 am
by 100 010 00
Hi philip,

I cant use the tcp_reuse command cause i have a 2.2 kernel session and this is for 2.4... i think. i array the following script that im using right now with a lot of success...

Code: Select all

echo 522720 > /proc/sys/net/core/rmem_default
echo 522720 > /proc/sys/net/core/rmem_max
echo 129228 > /proc/sys/net/core/wmem_default
echo 129228 > /proc/sys/net/core/wmem_max
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
echo 1 > /proc/sys/net/ipv4/route/flush
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout
echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max
echo 1 > /proc/sys/net/ipv4/tcp_ecn
echo 64 > /proc/sys/net/ipv4/ip_default_ttl
echo 1024 65535 > /proc/sys/net/ipv4/ip_local_port_range
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes
ifconfig eth0  MTU 1500
ifconfig eth0  txqueuelen 1500
ifconfig wlan0 mtu 1500
ifconfig wlan0  txqueuelen 1500
echo "4096 45012 90024" > /proc/sys/net/ipv4/tcp_rmem
echo "4096 17787 66792" > /proc/sys/net/ipv4/tcp_wmem
Im waiting for your comments or any other suggestions. machine is pppoe/1492/win 7/autotuned