It is funny that it is a must know stuff in any network engineer interview, yet, I have not systematically studied it in the past month. I just get some from one place and get some from other place. It is all broke pieces.

TCP/IP Headers

Remember what is the IP version packet header format. packet header format I would only talk about important ones.

  • Identification field: mark fragments that came from the same packet
  • IP Flags field: a 3-bit field, the first bit is always set to a 0. We have option of Dont Fragment and More Fragments.
  • Fragment Offset field and Time to Live field.
  • Protocol field: specifies the type of data encapsulated in the packet. Usually TCP and UDP.
  • Source and Destination Address field.

MTU and Latency

A Maximum Transmission Unit(MTU), typically refers to the largest packet size supported on a router interface: 1500 bytes is a common value. If you are sending data over slower link speends, large MTU values cause delay for latency-sensitive traffic.

ICMP Messages

ICMP is most often associated with the Ping utility, used to check connectivity with a remote network address. The header includes four feature, two of them are Type and Code. Type 0 is an Echo Reply message, a Type 3 is a Destination Unreachable messageā€¦.

Here, I want to explain Redirect. It happens if network condions change and a different nex-hop IP address should be used. For example, u type the name of your usual website and it redirects you to different domain name.

TCP Operation

TCP is commonly known as a reliable transport mechanism, lets take a deep look into how this reliability happens sf Since it is layer four protocol, we can see two important sections: Source Port and Destination Port.

  • Sequence Number/Acknowledgement Number field: this is the basis for the acknowledgment number in the next segment it sends back to the sender. ACK number equals the received sequence number plus 1.
  • TCP Flags field: also known as control bits
  • Window field

Another important feature is Three-Way Handshake. It all starts with a SYN message to the target host. Next, the targer acknowledge of the SYN message with an ACK message and also sends a SYN message of its own. It ends with the sender sending an ACK message.

TCP communication uses windowing, meaning that one or more segments are sent at one time, and a receiver can acknowledge the receipt of all the segments in a window with a single ACK number.

Its like this time I want these much segment and next time I adjust my window size and ask for these much segment. If the window size doubles to two segments and it is successful, we can ask for four segments next time. It continues until the receiver does not acknowledge all the coming segments. Asdf

UDP Characteristics

Everybody says I am a connectionless and unreliable protocol, I dont have those fancy stuff like sequence numbering and window size. ALL I HAVE ARE PORTS, LENGTH AND CHECKSUM. But people all know I am the best for audio and video stream.`