Computer Networks Mid-Term Review

Chapter 1: Computer Networks and the Internet

1.1 Basic Concepts

1.2 Network Devices and Cables

Types of Cables:

1.3 LAN vs. WAN

Local Area Network (LAN):

Wide Area Network (WAN):

1.4 Network Models

OSI Model (7 Layers)

  1. Physical Layer: Handles the transmission of raw bit streams over physical media, including cables and radio frequencies.
  2. Data Link Layer: Manages node-to-node data transfer, error detection, and correction; organizes data into frames and handles MAC addressing.
  3. Network Layer: Responsible for logical addressing (IP addresses) and routing packets between networks.
  4. Transport Layer: Ensures reliable data transfer, error recovery, and flow control between end systems; protocols include TCP and UDP.
  5. Session Layer: Establishes, manages, and terminates sessions between applications.
  6. Presentation Layer: Translates data between the application layer and the network, handling data encryption, compression, and translation.
  7. Application Layer: Provides network services directly to user applications, such as HTTP for web browsing and FTP for file transfers.

TCP/IP Model (4 Layers)

  1. Link (Network Interface) Layer: Combines the OSI model’s Physical and Data Link layers; handles hardware addressing and local network protocols.
  2. Internet Layer: Corresponds to the OSI’s Network layer; manages logical addressing and routing using the IP protocol.
  3. Transport Layer: Similar to the OSI Transport layer; ensures end-to-end communication and data integrity using protocols like TCP and UDP.
  4. Application Layer: Encompasses the OSI’s Session, Presentation, and Application layers; includes protocols such as HTTP, SMTP, and DNS.

1.5 Data Encapsulation

Encapsulation Process:

  1. Application Layer: Data generated by applications (e.g., HTTP requests).
  2. Transport Layer: Encapsulates data into segments (TCP) or datagrams (UDP), adding source and destination port numbers.
  3. Network Layer: Encapsulates segments into packets, adding source and destination IP addresses.
  4. Data Link Layer: Encapsulates packets into frames, adding MAC addresses and error-checking information.
  5. Physical Layer: Converts frames into bits for transmission over the physical medium.

Example: An HTTP request is generated by a web browser (Application Layer), encapsulated into a TCP segment (Transport Layer), then into an IP packet (Network Layer), further into an Ethernet frame (Data Link Layer), and finally transmitted as bits over a physical medium like twisted-pair cable (Physical Layer).

1.6 Protocol Data Units (PDUs)

Each layer of the OSI model has a specific PDU that it processes:

OSI Layer Protocol Data Unit (PDU)
Application Data
Transport Segment (TCP) / Datagram (UDP)
Network Packet
Data Link Frame
Physical Bits

Chapter 2: Application Layer

2.1 Application Layer Functions

The Application Layer is the topmost layer in both the OSI and TCP/IP models. It serves as the interface between end-users and the network, facilitating various network services. Key functions include:

2.2 Common Application Layer Protocols

Several protocols operate at the application layer, each designed for specific functionalities:

2.3 Email Protocols

Email communication relies on specific protocols to handle the sending, receiving, and accessing of messages:

2.4 Domain Name System (DNS)

The Domain Name System (DNS) is a hierarchical and decentralized naming system that translates domain names into IP addresses. Its structure includes:

2.5 File Distribution Models

There are two primary models for distributing files over a network:

Client-Server Model

Peer-to-Peer (P2P) Model

Chapter 3: Transport Layer

3.1 Comparison of OSI and TCP/IP Models

The Transport Layer plays a crucial role in both the OSI and TCP/IP models, facilitating end-to-end communication between devices.

OSI Model:

TCP/IP Model:

Key Differences:

3.2 Data Units in the Transport Layer

The Transport Layer uses specific Protocol Data Units (PDUs) to manage data transmission:

3.3 Role of the Transport Layer

The Transport Layer is responsible for several critical functions:

3.4 TCP vs. UDP

Two primary protocols operate at the Transport Layer:

Transmission Control Protocol (TCP):

User Datagram Protocol (UDP):

3.5 Switching Mechanisms

Data transmission in networks utilizes different switching techniques:

Packet Switching:

Circuit Switching:

3.6 Port Numbers

Port numbers are essential for directing data to the correct application on a device.

Common Port Numbers:

These standardized port numbers ensure that data is directed to the appropriate application services on a device.

3.7 TCP and UDP Segment Structure

Understanding the structure of TCP and UDP segments is vital for analyzing data transmission.

TCP Segment Fields: