What GNU contributes

July 29, 2011 Leave a comment





Famous ones:

Development: “gcc”, “gdb”, “make”


Compression/decompression: “gzip”

Archiver: tar

Editor: “emacs”


Library: “gtk+”, “glib”, “libc”

File/Text Tool: grep, gawk, sed, less, more

Shell: “bash”

Boot Loader: grub

Network file: Wget, W3

Interface: Gnome



Categories: Others

File compression/decompression

July 22, 2011 Leave a comment

gzip, DEFLATE, LZ77, LZ78, LZR, Huffman coding, LZW, LZMA, compress

File archive: tar

Data compression & archive format: ZIP, 7-Zip

Categories: Others

Slide Window & Congest Window

July 20, 2011 Leave a comment

Categories: Others

Ask-answer of TCP/IP

July 20, 2011 Leave a comment

Why do IP packets have a TTL (Time To Live) field?

A: To prevent a packet being retransmitted forever in the case of a routing loop

What error is returned if a UDP datagram is received and has a checksum error?

A: None. It is silently discarded

What is the minimum IP datagram size that a host must be able to receive?

A: 576 bytes

Why is a pad byte of 0 occasionally appended for the UDP checksum calculation?

A: Because the checksum algorithm requires an even number of bytes

What is the maximum amount of data in a UDP packet over IPv4?

A: 65507 bytes (65535 – 20 IP header – 8 UDP header)

Under what circumstances is the TCP checksum incorrect, on a well-formed, in-flight packet?

A: when the packet is using the IP source routing option (The destination IP changes along the route, which is used to calculate the TCP checksum)

What is the TCP retransmission ambiguity problem?

A: An ACK arrives after a retransmit- was it sent in response to the initial transmit or the retransmit?

Name one way to solve the TCP retransmission ambiguity problem?

A: Use the Eifel detection algorithm

A: Enable timestamps (which is what Eifel does)

What is the minimum MTU that allows any IP datagram to pass?

A: 68 bytes

Where was John Nagle working when he invented the “Nagle algorithm?”

A: Ford Motor Company

Who invented Tinygram Avoidance?

A: John Nagle. (Tinygram Avoidance is also known as the “Nagle algorithm.”)

What makes it very difficult for any network stack to claim “strict compliance” to RFC 1122?

A: Its requirement of “SHOULD: able to leap tall buildings at a single bound.”

Who invented NAT (Network Address Translation)? When, which RFC for it?

A: Paul Francis, 1994-05, RFC1631 (Obsoleted by RFC3022)

Name one of the men described as “The Father of the Internet.”

A: Any of: Vinton Cerf (TCP/IP co-designer), Robert Kahn (TCP/IP co-designer), John Postel (started IANA), Al Gore (made encouraging noises)

Name two TCP header options

A: Any 2 of maximum segment size (MSS), window scale factor, timestamp, noop, SACK, and end of options list

What is the MSL as defined in RFC 793?

A: 2 minutes (but is usually implemented as 30 seconds).

Name two ways to exit the TIME_WAIT state.

A: 2MSL timeout, TIME_WAIT assassination (receive a RST), or receive a SYN with greater sequence number. Note: TIME_WAIT assassination is not permitted by RFC 1337.

What is silly window syndrome?

A: In TCP, when the receiving end continually advertises a tiny window, resulting in data being sent in very small packets.

If the remote host of a TCP connection does not advertise an MSS, what is the assumed MSS?

A: 536 bytes over IPv4, 1220 over IPv6, although most implementations default to 512 and 1024 respectively.

Name three methods or algorithms related to congestion control in TCP.

A: Congestion window, Vegas, Reno, NewReno, SACK, DSACK, FACK, Eifel algorithm, ECN, RTO

Name three main contributions of Van Jacobson

A: Jacobson’s algorithm; TCP/IP Header Compression; traceroute,

Name the congestion avoidance algorithms deployed with model OS?

A: TCP CUBIC is used by default in Linux kernel since version 2.6.19; Compound TCP is widely deployed by Windows Vista and Windows Server 2008


Categories: Others

Internet RFCs Supported by Windows Server 2003 TCP/IP

July 19, 2011 Leave a comment


Register keys of TCP/IP, under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

You can add following register key to do network performance tuning.

Tcp1323Opts (Parameters)

GlobalMaxTcpWindowSize (Parameters)

EnablePMTUDiscovery (Parameters) 

TcpMaxConnectRetransmissions (Parameters)

TcpMaxConnectResponseRetransmissions (Parameters)

TcpMaxDataRetransmissions (Parameters)

DefaultTTL (Parameters)

TcpMaxDupAcks (Parameters)


MaxFreeTcbs (Parameters)

TcpUseRFC1122UrgentPointer (Parameters)


TcpTimedWaitDelay (Parameters)

MaxUserPorts (Parameters)

TcpAckFrequency (Parameters)

TcpDelAckTicks (Parameters\Interfaces\ interface-name) 

TcpWindowSize (Parameters\Interfaces\ interface-name) 

MTU (Parameters\Interfaces\ interface-name) 

Parameters\Interfaces\ interface-name) 






RFC 896: Congestion Control in IP/TCP Internetworks


RFC 768: User Datagram Protocol

RFC 791: Internet Protocol – DARPA Internet Program Protocol Specification

RFC 793: Transmission Control Protocol – DARPA Internet Program Specification

RFC 826: An Ethernet Address Resolution Protocol — or — Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware

RFC 854: TELNET Protocol Specification

RFC 862: Echo Protocol

RFC 894: A Standard for the Transmission of IP Datagrams over Ethernet Networks

RFC 919: Broadcasting Internet Datagrams

RFC 959: File Transfer Protocol (FTP)

RFC 1042: A Standard for the Transmission of IP Datagrams over IEEE 802 Networks

RFC 1122: Requirements for Internet Hosts — Communication Layers and RFC 1123: Requirements for Internet Hosts — Application and Support

RFC 1191: Path MTU Discovery

RFC 1323: TCP Extensions for High Performance

RFC 1661: The Point-to-Point Protocol (PPP)

RFC 2018: TCP Selective Acknowledgment Options

RFC 2131: Dynamic Host Configuration Protocol

RFC 2581: TCP Congestion Control

RFC Number




RFC 768


User Datagram Protocol

RFC 768 (Standard)

RFC 791


Internet Protocol

RFC 791 (Standard) 
Updated by 
RFC 1349 

RFC 793


Transmission Control Protocol

RFC 793 (Standard) 
Updated by 
RFC 1122
RFC 3168RFC 6093

RFC 896


Congestion Control in IP/TCP Internetworks

RFC 896 (Unknown)

RFC 1122


Requirements for Internet Hosts – Communication Layers

RFC 1122 (Standard) 
Updated by 
RFC 1349
RFC 4379RFC 5884RFC 6093RFC 6298 

RFC 1123


Requirements for Internet Hosts – Application and Support

RFC 1123 (Standard) 
Updated by 
RFC 1349
RFC 2181RFC 5321,RFC 5966 

RFC 1191


Path MTU discovery

RFC 1191 (Draft Standard)

RFC 1323 


TCP Extensions for High Performance

RFC 1323 (Proposed Standard) 

RFC 2018 


TCP Selective Acknowledgment Options

RFC 2018 (Proposed Standard) 

RFC 2581 


TCP Congestion Control

RFC 2581 (Proposed Standard) 
Obsoleted by 
RFC 5681 
Updated by 
RFC 3390 

RFC 5681 


TCP Congestion Control

RFC 5681 (Draft Standard) 


Some features of TCP/IP:

Delayed Acknowledgments:

As specified in RFC 1122: Requirements for Internet Hosts — Communication Layers, Transmission Control Protocol (TCP) uses delayed acknowledgments (ACKs) to reduce the number of packets sent on the transmission media.

In Windows Transmission Control Protocol/Internet Protocol (TCP/IP), the stack takes a common approach to implementing delayed ACKs. As data is received by TCP on a connection, the stack only sends an acknowledgment back if one of the following conditions is met:

  • No ACK was sent for the previous segment received.
  • A segment is received, but no other segment arrives within 200 milliseconds for that connection.

In other words, an ACK is sent for every other TCP segment received on a connection, unless the delayed ACK timer expires after 200 milliseconds pass.

Register key for adjusting the delayed ACK timer:

Windows 2000: TcpDelAckTicks 

Windows XP and Windows Server 2003: TcpAckFrequency 

Nagle Algorithm

Windows Transmission Control Protocol/Internet Protocol (TCP/IP) implements the Nagle algorithm described in 

Categories: Others


July 19, 2011 Leave a comment

TCP is a complex protocol. However, while significant enhancements have been made and proposed over the years, its most basic operation has not changed significantly since its first specification RFC 675 in 1974, and the v4 specification RFC 793, published in September 1981. RFC 1122, Host Requirements for Internet Hosts, clarified a number of TCP protocol implementation requirements. RFC 2581, TCP Congestion Control, one of the most important TCP-related RFCs in recent years, describes updated algorithms that avoid undue congestion. In 2001, RFC 3168 was written to describe explicit congestion notification (ECN), a congestion avoidance signaling mechanism.

RFC896 (1984)

Introduced Nagle’s algorithm, however, this algorithm interacts badly with TCP delayed acknowledgments

For this reason, TCP implementations usually provide applications with an interface to disable the Nagle algorithm. This is typically called the TCP_NODELAY option. It is, however, not recommended to disable this. A solution, recommended by Nagle himself, is to keep from sending small single writes and buffer up application writes then send.



Categories: Others

All about 64-bit programming in one place

July 8, 2011 Leave a comment


The blog contains much useful information on 64-bit programming.

Categories: Others