Computer Networks CS601 Exam Solutions
Computer Networks CS601 Exam Solutions
Computer Networks CS601 Exam Solutions
b) Application Layer
c) Physical Layer
d) Network Layer
a) Physical Layer
c) Network Layer
d) Transport Layer
a) 4
b) 64
c) 16
d) 32
Answer: b) 64
a) TCP
b) UDP
Answer: a) TCP
a) 2
b) 4
c) 6
d) 8
Answer: c) 6
a) Tt
b) 2Tt
c) Tp
d) 2Tp
Answer: b) 2Tt
- Sequence Number (32 bits): Keeps track of the number of bytes sent.
- Acknowledgment Number (32 bits): If the ACK flag is set, this field contains the value of the next
- Reserved (3 bits): Reserved for future use and should be set to zero.
- Flags (9 bits): Controls flags (e.g., URG, ACK, PSH, RST, SYN, FIN).
- Checksum (16 bits): Used for error-checking the header and data.
- Urgent Pointer (16 bits): If the URG flag is set, this field is an offset from the sequence number
2. IP address 10.13.8.15/12. Write class, Netid and subnet mask of this IP:
- Netid: 10.8.0.0
The TCP handshaking mechanism is a three-step process known as the three-way handshake:
1. SYN: The client sends a TCP segment with the SYN flag set to the server to initiate a connection.
2. SYN-ACK: The server responds with a TCP segment with both SYN and ACK flags set to
3. ACK: The client sends a final TCP segment with the ACK flag set, confirming the connection is
established.
- Pure ALOHA:
- Slotted ALOHA:
- Time is divided into slots; packets can only be sent at the beginning of these slots.
- High latency since each packet must be acknowledged before the next one is sent.
- Circuit Switching:
- Packet Switching:
- Example: Internet.
7. Explain Hamming code for error detection and correction with a suitable diagram:
The Hamming code is a method for error detection and correction. It works by adding redundant bits
to the data, allowing for the detection and correction of single-bit errors.
**Steps:**
1. Determine the number of redundant bits needed (r) for data bits (d): 2^r >= d + r + 1.
2. Place the redundant bits in positions that are powers of 2 (1, 2, 4, 8, etc.).
3. Calculate the values of the redundant bits based on parity (even or odd).
4. For error detection and correction, calculate the parity bits from the received data and determine
**Example Diagram:**
Computer Networks CS601 Exam Solutions