BIT254 ยท 2082 ยท 5 marks
Write Short notes on: Sliding Window Protocol HTTP Protocol [0+2.5+2.5]
Write Short notes on: Sliding Window Protocol HTTP Protocol [0+2.5+2.5]
Network and Data CommunicationsChapter 8: Transport and Application Layer ProtocolsSliding Window Protocol
Quick answer
The Sliding Window Protocol is a flow control and error control mechanism used in data link layer and transport layer protocols to allow efficient transmission of multiple frames before requiring acknowledgment.
Short Notes
1. Sliding Window Protocol
Key Concepts
- Instead of sending one frame and waiting for an ACK (as in Stop-and-Wait), the sender can transmit multiple frames up to a window size W without waiting for acknowledgment.
- The window represents the number of frames that can be outstanding (sent but not yet acknowledged) at any time.
- Both sender and receiver maintain a window of sequence numbers.
Working Principle
Sender Window (W=4):
[0][1][2][3] --> can send these without ACK
^--- as ACKs arrive, window slides forward
- When an ACK is received for a frame, the window slides forward, allowing new frames to be sent.
- Sequence numbers are used cyclically; for a window size W, sequence numbers range from 0 to 2^n - 1 (where n is the number of bits).
Types
| Type | Description |
|---|---|
| Go-Back-N | On error, retransmit the erroneous frame and all subsequent frames |
| Selective Repeat | Only the erroneous frame is retransmitted |
Advantages
- Increases link utilization and throughput
- Reduces idle time compared to Stop-and-Wait
- Efficiency = W / (1 + 2a), where a = propagation delay / transmission time
2. HTTP Protocol (HyperText Transfer Protocol)
HTTP is an application layer protocol used for transferring hypermedia documents (HTML, images, etc.) on the World Wide Web. It follows a client-server model.
Key Features
- Stateless Protocol: Each request is independent; the server does not retain session information between requests.
- Default Port: 80 (HTTP), 443 (HTTPS)
- Connection Types:
- Non-persistent HTTP: A new TCP connection is established for each object/request.
- Persistent HTTP: Multiple objects can be sent over a single TCP connection.
HTTP Request Methods
| Method | Purpose |
|---|---|
| GET | Retrieve a resource |
| POST | Submit data to the server |
| PUT | Update a resource |
| DELETE | Delete a resource |
| HEAD | Retrieve headers only |
HTTP Message Format
Request:
GET /index.html HTTP/1.1
Host: www.example.com
Connection: keep-alive
Response:
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1024
<html>...</html>
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | OK (Success) |
| 301 | Moved Permanently |
| 404 | Not Found |
| 500 | Internal Server Error |
HTTP Versions
- HTTP/1.0: Non-persistent by default
- HTTP/1.1: Persistent connections, pipelining supported
- HTTP/2: Multiplexing, header compression, faster performance
Advantages
- Simple and human-readable
- Platform independent
- Widely supported across all browsers and servers
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.