Saturday, August 4, 2012

Tunable TCP/IP kernel options

Linux has placed each of the tunable kernel variable into the /proc virtual filesystem. The networking variables are in /proc/sys/net/ipv4. Here are some of the trimmed list.

# cd /proc/sys/net/ipv4

# ls -F

......... 

tcp_abc                           tcp_keepalive_time    tcp_sack
tcp_abort_on_overflow             tcp_low_latency       tcp_slow_start_after_idle
tcp_adv_win_scale                 tcp_max_orphans       tcp_stdurg
tcp_allowed_congestion_control    tcp_max_ssthresh      tcp_synack_retries
tcp_app_win                       tcp_max_syn_backlog   tcp_syncookies
tcp_available_congestion_control  tcp_max_tw_buckets    tcp_syn_retries
tcp_base_mss                      tcp_mem               tcp_thin_dupack
tcp_congestion_control            tcp_moderate_rcvbuf   tcp_thin_linear_timeouts
tcp_dma_copybreak                 tcp_mtu_probing       tcp_timestamps
tcp_dsack                         tcp_no_metrics_save   tcp_tso_win_divisor
tcp_ecn                           tcp_orphan_retries    tcp_tw_recycle
tcp_fack                          tcp_reordering        tcp_tw_reuse
tcp_fin_timeout                   tcp_retrans_collapse  tcp_window_scaling
tcp_frto                          tcp_retries1          tcp_wmem
tcp_frto_response                 tcp_retries2          tcp_workaround_signed_windows
tcp_keepalive_intvl               tcp_rfc1337
tcp_keepalive_probes              tcp_rmem

.....................
To make changes on the fly, you can just simply echo the value and pipe it to the options. For example,
# echo 1 > /proc/sys/net/ipv4/ip_forward

No comments: