Why Computer Networks - CSU359 - Shoolini University

Why Computer Networks

1. Understanding Computer Networks

Computer networks are essential in our daily lives, even when we don’t consciously realize it. Activities such as browsing websites, sending emails, making WhatsApp calls, or accessing files remotely rely heavily on the internet—a vast computer network in the background.

1.1 Why Learn Computer Networks?

Networks enable communication between devices like smartphones, desktops, and smartwatches. As an engineer, knowing how these systems function is essential, whether you are designing applications, building browsers, or managing network infrastructure. For instance, Outlook, an email client, relies on network protocols to send and receive emails. Similarly, applications like WhatsApp use network concepts for audio and video communication.

1.1.1 The Role of Networks in Software Engineering

Understanding networks extends beyond traditional communication tools. Big data systems, such as Apache Spark, require efficient network management to distribute tasks across multiple machines. Whether you're a software engineer or a data engineer, knowing how information flows within a network is critical for troubleshooting and optimization.

1.2 Types of Networks and Connectivity

Computer networks can be accessed through various mediums:

During the course, we will explore these mediums and their significance in modern computing.

1.3 Key Terms You Will Encounter

This course will cover several important concepts:

1.4 Hands-On Learning with Wireshark

To better understand what happens behind the scenes in a network, we will use Wireshark—a network protocol analyzer. This tool captures real-time network data, allowing us to observe how protocols like TCP/IP operate.

1.4.1 Installation Instructions

1.5 How Networks Influence Various Fields

Knowledge of computer networks is crucial across multiple disciplines:

This course aims to equip you with practical and theoretical knowledge, helping you understand the mechanics behind internet communication and network protocols.

2. The OSI Model: A Network Design Framework

The OSI (Open Systems Interconnect) model provides a standardized way to understand how data travels between computers in a network. It serves as a blueprint for designing systems capable of communicating, regardless of differences in hardware or software. This structure ensures seamless communication between devices running different operating systems such as Windows, Linux, or Android.

2.1 Hosts, Servers, and Communication

In networking, any device that participates in data exchange is referred to as a host. This can be a computer, smartphone, or IoT device. A server is a specialized host that provides information to other hosts. For example, when you visit Amazon.com, your browser communicates with Amazon's server to retrieve the webpage content.

2.2 Protocols: The Language of Communication

Protocols are the rules that define how data is transmitted and received. Just as languages follow grammar, computers use protocols to communicate efficiently. Some common protocols include:

2.3 OSI Layers Explained

The OSI model is divided into seven layers. Each layer has a specific role in managing data as it flows between devices:

2.3.1 Example: Layered Communication in Action

Imagine a browser requesting a webpage. The request starts at the application layer and travels down to the physical layer, where it is transmitted over the internet. At the receiving end, the data flows back up through the layers until the webpage is displayed on the browser.

2.4 Presentation Layer: Formatting, Compression, and Encryption

This layer ensures that data is in a suitable format for the application. It also compresses data to reduce transmission size and encrypts sensitive information for secure transmission. A common encryption method used is SSL, which enhances security in HTTPS connections.

2.5 Session Layer: Managing Connections

The session layer is responsible for establishing, managing, and closing sessions. For example, when logging into a website, the session layer ensures your identity is verified and authorized to access specific resources. It also handles logouts and session terminations.

2.5.1 Authentication and Authorization

2.6 The Layered Approach in Network Design

By organizing protocols and functions into layers, the OSI model simplifies network design and troubleshooting. Each layer only communicates with its counterpart at the other end, ensuring smooth data transmission.

3. Transport Layer: Ensuring Reliable Data Transfer

The transport layer is responsible for breaking data into manageable segments and ensuring it is reliably transmitted between hosts. This layer plays a vital role in providing segmentation, flow control, and error control to manage data efficiently.

3.1 Segmentation

Data sent from higher layers is divided into smaller, manageable units called segments. This segmentation makes it easier to transport large data across networks. For example, a 1000-byte message could be broken into 10 segments of 100 bytes each. Each segment is labeled with a sequence number to ensure they can be reassembled correctly at the destination.

3.1.1 Sequence Numbers and Port Numbers

3.2 Flow Control

Flow control ensures the data transfer rate matches the processing capacity of the receiving device. If the server sends data faster than the recipient can handle, the transport layer adjusts the rate to prevent data loss or overflow.

3.3 Error Control

Error control mechanisms detect and correct errors during transmission. Two key components include:

3.4 TCP vs UDP

The transport layer offers two primary protocols:

3.5 Transport Layer in Action with Wireshark

Using Wireshark, you can capture and analyze transport layer data. When examining TCP segments, you will see fields like sequence numbers, source port, and destination port. In UDP packets, you can observe port numbers and checksums to verify packet integrity.

4. Network Layer: Routing and Addressing

The network layer is responsible for routing packets between devices across networks. It assigns logical IP addresses to each host, enabling communication over different networks.

4.1 IP Addressing and Routing

Every device on a network is assigned an IP address, which serves as a unique identifier. Routers use IP addresses to determine the best path for transmitting packets across networks.

4.1.1 Path Determination

The network layer selects the most efficient path for transmitting data from the source to the destination. It uses algorithms based on graph theory to determine the shortest route.

4.2 DNS: Domain Name System

The DNS translates human-readable domain names (e.g., amazon.com) into IP addresses, enabling browsers to connect to web servers. Tools like Wireshark allow us to observe the DNS requests and responses exchanged between a host and a DNS server.

5. Data Link Layer: Managing Physical Connections

The data link layer governs how data packets are transmitted over physical media like Ethernet cables, Wi-Fi, or fiber optics. It ensures that packets are properly framed for transmission.

5.1 Media Access Control (MAC)

The MAC address, a unique identifier assigned to network interface devices, is used to route data within local networks. This layer prevents data collisions by managing access to shared communication channels.

5.1.1 Error Detection

To ensure data integrity, error detection codes are added to the frame's header or trailer. If errors are detected, the data is retransmitted.

6. Physical Layer: Transmitting Signals

The physical layer converts data into electrical, optical, or radio signals, depending on the transmission medium. It transmits these signals over copper cables, fiber optics, or wireless connections like Wi-Fi.

6.1 Signal Encoding

Various encoding schemes are used to represent binary data as signals. For example, copper wires use voltage levels, fiber optics use laser pulses, and Wi-Fi employs radio waves.

6.2 Connecting Theory with Practical Tools

Wireshark provides insights into how these layers work by capturing live network traffic, helping users observe and understand protocols in action.

7. TCP/IP Model: A Practical Approach to Networking

The TCP/IP model simplifies the concepts introduced by the OSI model, offering a practical framework for real-world networking. While the OSI model serves as a theoretical reference, the TCP/IP model is widely implemented in modern networking systems. This model organizes network operations into four layers, streamlining communication and reducing complexity.

7.1 Layers of the TCP/IP Model

The TCP/IP model groups similar functions from the OSI model, resulting in a more manageable and efficient structure:

7.2 Data Units Across Layers

The data handled at each layer is referred to differently based on the layer’s role:

7.3 Practical Differences from OSI Model

While the OSI model provides a detailed theoretical structure, the TCP/IP model offers a simplified, practical framework. For example, in the TCP/IP model:

7.4 Real-World Application of TCP/IP

Most modern networks, including the internet, operate on the TCP/IP model. Its streamlined structure enables more straightforward development and management of networking applications, making it the backbone of contemporary networking systems.

7.5 Summary of Key Concepts

8. The Physical Layer: Encoding, Media, and Transmission Modes

The physical layer handles the conversion of digital data into signals, which can travel over different mediums. It manages the representation of bits through electrical, optical, or radio signals, ensuring that data is transmitted effectively across devices.

8.1 Encoding Methods

8.1.1 Manchester Encoding

In Manchester encoding, each clock cycle represents a single bit. The signal's transition in the middle of the clock cycle determines the bit:

8.1.2 Differential Manchester Encoding

In differential Manchester encoding:

This encoding ensures synchronization and avoids signal loss during transmission.

8.2 Transmission Media

Transmission media refers to the medium through which data signals travel. Media can be categorized as:

8.2.1 Guided Media
8.2.2 Unguided Media

8.3 Transmission Modes

8.4 Summary of Physical Layer Concepts

9. Network Types and Topologies: Terminology Overview

Understanding the types of networks and how they connect is crucial in computer networking. This section introduces basic network types, their purpose, and the common topologies used to organize them.

9.1 Network Types

9.2 Network Topologies

Network topology defines the arrangement of nodes and links in a network. Common topologies include:

9.3 Key Concepts and Use Cases