Network Interview

What is the OSI model? Physical Layer Data Link Layer Network Layer Transport Layer Session Layer Presentation Layer Application Layer Explain the difference between TCP and UDP. TCP (Transmission Control Protocol): Connection-oriented Reliable, ensures all data is received Flow control and congestion control Slower than UDP Used for applications requiring high reliability (e.g., file transfer, email) UDP (User Datagram Protocol): Connectionless Unreliable, doesn’t guarantee data delivery No flow control or congestion control Faster than TCP Used for applications that prioritize speed (e. [Read More]

Network Protocols

Transmission Control Protocol (TCP) TCP Principles and Mechanisms Key features: Connection Establishment: Three-way handshake (SYN, SYN-ACK, ACK) Reliable Delivery: Acknowledgment and retransmission Flow Control: Sliding window mechanism Congestion Control: Slow start, congestion avoidance, fast retransmit, and fast recovery Ordered Data Transfer: Sequence numbers Error Detection: Checksum Example of TCP header: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Port | Destination Port | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Acknowledgment Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | |U|A|P|R|S|F| | | Offset| Reserved |R|C|S|S|Y|I| Window | | | |G|K|H|T|N|N| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Urgent Pointer | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TCP Performance Characteristics Throughput: [Read More]

Subnet and Subnet

What is a Subnet? A subnet is a way to divide a large network into smaller, more manageable pieces. Think of it like dividing a big city into neighborhoods. Each subnet (neighborhood) has its own group of devices (houses), but all are still part of the same overall network (city). What is a Subnet Mask? A subnet mask is a number used to help identify which part of an IP address belongs to the network (city) and which part identifies the device (house). [Read More]