Tag: tcp

  • Capturing TCP Flags with tcpdump. Capture ACK or SYN packets

    ABOUT TCP FLAGS They are control bits that indicate different connection states or information about how a packet should be handled. FLAGS CWR – Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set (added to header by RFC 3168). ECE […]

  • what is tcp_retrans_collapse – BOOLEAN ?

    ABOUT tcp_retrans_collapse This variable implements a bug in the TCP protocol so it will be able to talk to certain other buggy TCP stacks. Without implementing this bug in the TCP stack, we would be unable to talk to certain printers that has this bug built in. This bug makes the TCP stack try to […]

  • nc – TCP/IP swiss army knife

    Commandline Session $nc -l -p 4444 hello how are you ? Happy Hacking Hey $nc 127.0.0.1 4444 hello how are you ? Happy Hacking Hey Note : shell screenshot edited.

  • tcp_rmem – vector of 3 INTEGERs: min, default, max

    ABOUT tcp_rmem min: Minimal size of receive buffer used by TCP sockets. It is guaranteed to each TCP socket, even under moderate memory pressure. Default: 1 page default: initial size of receive buffer used by TCP sockets. This value overrides net.core.rmem_ default used by other protocols. Default: 87380 bytes. This value results in window of […]

  • parameters tcp_retries2

    A UNIX Parameter $cat /proc/sys/net/ipv4/tcp_retries2 15 $ Parameter Definition How many times to retry before killing alive TCP connection. RFC1122 says that the limit should be longer than 100 sec. It is too small number. The default value of 15 corresponds to ~ 13 – 30 minutes, depending on RTO. Parameter Code Internals snippet 1 […]

  • parameter tcp_retries1

    A UNIX Parameter $cat /proc/sys/net/ipv4/tcp_retries1 3 $echo 4 > /proc/sys/net/ipv4/tcp_r Parameter Definition This value influences the time, after which TCP decides, that something is wrong due to unacknowledged RTO retransmissions, and reports this suspicion to the network layer. RFC 1122 recommends at least 3 retransmissions, which is the default. Parameter Code Internals snippet 1 { […]

  • out-of order data…

    $cat /proc/sys/net/ipv4/tcp_reordering 3 $ tcp_reordering – INTEGER Maximal reordering of packets in a TCP stream. Default: 3 proj-rep/kernel_code/tcp_ipv4.c 1921: tp->reordering = sysctl_tcp_reordering; 1922: nms.csail.mit.edu/~kandula/data/tcp-mult.tgz – Unknown – C irestarter-0.9.0/src/netfilter-script.c 271: fprintf (script, “# Set TCP Re-Ordering value in kernel to ‘5’\n”); 272: fprintf (script, “if [ -e /proc/sys/net/ipv4/tcp_reordering ]; then\n” 273: ” echo 5 > […]

  • About RTO retransmission and tcp_orphan_retries

    About  RTO retransmission and tcp_orphan_retries

    About RTO retransmission and tcp_orphan_retries tcp_orphan_retries – INTEGER This value influences the timeout of a locally closed TCP connection,when RTO retransmissions remain unacknowledged. source : Linux Kernel Documentation . 2.6.32 TYPICAL SHELL ON PROC FILESYSTEM [bash] $cat /proc/sys/net/ipv4/tcp_orphan_retries 0 $ [/bash] TYPICAL SOURCE CODE RELATED [c] net/ipv4/tcp_timer.c – 39 identical 99: static int tcp_orphan_retries(struct sock […]

  • characteristics about the last connection…

    $cat /proc/sys/net/ipv4/tcp_no_metrics_save 0 $ tcp_no_metrics_save Normally, TCP will remember some characteristics about the last connection in the flow cache. If tcp_no_metrics_save is set, then it doesn’t. Useful for benchmarks or other tests. net/ipv4/sysctl_net_ipv4.c – 24 identical 452: { 453: .procname = “tcp_no_metrics_save”, 454: .data = &sysctl_tcp_nometrics_save, github.com/github/linux-2.6.git – GPL – C – More from linux-2.6.git […]

  • controls tcp packetization-layer ..

    $cat /proc/sys/net/ipv4/tcp_mtu_probing 0 $ tcp_mtu_probing – INTEGER Controls TCP Packetization-Layer Path MTU Discovery. Takes three values: 0 – Disabled 1 – Disabled by default, enabled when an ICMP black hole detected 2 – Always enabled, use initial MSS of tcp_base_mss. source : Linux kernel Documentation. 2.6.32 147: /* Black hole detection */ 148: tcp_mtu_probing(icsk, sk); […]