unit v

Computer Networks - Unit V

1. Port Numbers

  • Port numbers are crucial in computer networking, identifying both the sender and the receiver of messages.

  • They indicate the protocol that will handle incoming traffic and specify the processes to which the network should forward messages.

  • Categories of port numbers:

    • Well-known Ports (0-1023): Reserved for specific services (e.g., HTTP, FTP).

    • Registered Ports (1024-49151): Can be registered by software corporations for specific uses.

    • Dynamic/Private Ports (49152-65535): Open for general use.

2. Understanding Port Numbers

  • Port numbers are represented as 16-bit integers.

  • Example of FTP: Port 21 is used for file transfer; when a user requests a file, TCP identifies this port to forward the request to the appropriate service.

  • Only a select number of port numbers are in daily use, with most reserved for major companies or registered by software entities.

3. Commonly Used Port Numbers

Port No

Protocol

Description

7

Echo

Echoes a received datagram back to the sender

9

Discard

Discards any received datagram

20

FTP, Data

File Transfer Protocol (data connection)

21

FTP, Control

File Transfer Protocol (control connection)

23

TELNET

Terminal Network

25

SMTP

Simple Mail Transfer Protocol

53

DNS

Domain Name Server

80

HTTP

Hypertext Transfer Protocol

110

POP3

Post Office Protocol

123

NTP

Network Time Protocol

4. Port Numbers vs. IP Addresses

  • IP Address:

    • Refers to a unique address of a host on a network.

    • Typically consists of 4 bytes (IPv4) or 16 bytes (IPv6).

  • Port Number:

    • Identifies specific processes on a computer.

    • Typical size is 16 bits.

    • Managed by the operating system kernel.

  • Commands for retrieval:

    • Use ipconfig for IP; netstat for port statistics.

5. OSI Model and Protocols

  • Application Layer: HTTP, FTP, IRC, SSH, DNS

  • Transport Layer: TCP, UDP, ECN, SCTP

  • Network Layer: IP, IPSec

  • Data-Link & Physical Layers: Ethernet, Wireless, etc.

6. User Datagram Protocol (UDP)

  • Connectionless and unreliable transport protocol, characterized by minimal overhead.

  • Use cases include real-time applications (VoIP), where acknowledgment is less critical.

  • Minimal flow control, unordered delivery, and is suitable for applications requiring reduced latency.

7. TCP Overview

  • Connection-oriented protocol that ensures reliable delivery through segment acknowledgment and error recovery.

  • Contains specific segments (20-60 bytes) defining communication parameters, including source, destination ports, and sequence numbers.

  • Employs a handshaking process for establishing and terminating connections.

8. TCP Flow Control & Congestion Control

  • Flow control manages the rate of data transmission between sender and receiver to avoid overwhelming buffers.

    • Techniques like sliding window control determine how much data can be sent before receiving an acknowledgment.

  • Congestion control adapts the flow to manage network traffic effectively, employing strategies like Slow Start and Congestion Avoidance.

9. Differences Between TCP and UDP

  • TCP:

    • Connection-oriented

    • Reliable with error detection

    • Ordered delivery

    • Includes flow and congestion control mechanisms.

  • UDP:

    • Connectionless

    • Does not guarantee order or reliability

    • Suitable for fast and near real-time transmissions without overhead.

10. References

  • TCP/IP Protocol Suite by Behrouz A. Forouzan, 4th Edition.

  • Various online resources for further understanding of protocols and networking.