1 Introduction To Computer Network

Computer Networks · Unit 1 · 6 hrs

Introduction to Computer Network

Exam-focused notes for Introduction to Computer Network (Computer Networks, CSC263): what the TU syllabus asks and how it has actually been tested, with 12 solved past questions from this unit.

Introduction to Computer Network in short

This chapter introduces the idea of a computer network: what it is, why it exists, how its nodes can be arranged and classified, and the layered rule books (protocols and standards) that let dissimilar machines talk to each other over it.

Introduction to Computer Network: notes

Definitions, Uses, Benefits

A computer network is a group of computer systems and other computing hardware devices linked together through communication channels so that they can exchange data and share resources. Networks exist to let people communicate (email, instant messaging, video conferencing), share hardware such as a single printer or scanner across many users, share files and software across machines, and make information easier to access and maintain for everyone on the network.

The benefits of networking are largely about scale and cost. A network is comparatively inexpensive to run per user, flexible to extend, and it boosts storage capacity and cost efficiency by letting many machines draw on shared resources instead of duplicating them. Set against this are real costs: a network opens a security exposure (more entry points for attackers), spreads viruses and malware faster than an isolated machine, encourages dependence on infrastructure that can fail, and needs a competent administrator, since if the main server goes down the whole system can become unusable. This lack of a single point of guaranteed uptime is usually called a lack of robustness.

Network Topologies

A network topology is the physical or logical layout of a network: how its nodes are placed, connected, and how data moves between them. The commonly taught topologies are:

  • Bus topology: every node connects to one shared transmission line. It is simple and cheap but the shared line is a single point of failure.
  • Star topology: every node connects to one central device (typically a switch). A cable or node failure does not bring down the rest of the network, but failure of the central device does. This is the most widely used topology today.
  • Ring topology: nodes are connected sequentially like a bus, but the last node connects back to the first, closing the line into a ring, which removes the single open-ended failure point of a bus.
  • Tree topology: a root node connects to two or more subordinate nodes, which themselves branch further, so the overall shape is hierarchical. In practice the backbone often uses a bus while the branches use a star.
  • Mesh topology: every device is connected to every other device. In a full mesh of $n$ computers the number of links is $$ \frac{n(n-1)}{2} $$

In a partially connected mesh, only some nodes have multiple direct connections to others, trading some redundancy for lower cabling cost.

Network Types

Networks are also classified by the geographic scale they cover. A Personal Area Network (PAN) is the smallest, connecting the devices of a single person, for example a phone, tablet and wireless earbuds within a room. A Local Area Network (LAN) connects computers and devices across a limited area such as one building, typically owned and managed by a single organization. A Wireless LAN (WLAN) provides the same coverage as a LAN using wireless technology such as Wi-Fi instead of physical cabling. A Campus Area Network (CAN) is larger than a LAN but smaller than a MAN, linking several nearby buildings, as seen on university campuses. A Metropolitan Area Network (MAN) spans a town or city, larger than a LAN but smaller than a WAN. A Wide Area Network (WAN) spans long physical distances, connecting computers across cities, countries or continents; the Internet is the largest and most familiar example of a WAN.

What this unit covers

  • Definitions, Uses, Benefits
  • Overview of Network Topologies (Star, Tree, Bus,...)
  • Overview of Network Types (PAN, LAN, CAN, MAN,...)
  • Networking Types (Client/Server, P2P)
  • Overview of Protocols and Standards
  • OSI Reference Model
  • TCP/IP Models and its comparison with OSI
  • Connection and Connection-Oriented Network Services
  • Internet, ISPs, Backbone Network Overview

Connection and Connection-Oriented Network Services

2081 · 5 marks

Explain about connection-oriented network services. [5]

A connection-oriented service is a type of network service in which a dedicated logical path (connection) is established between the sender and receiver before any data is transmitted. The connection is maintained throughout the communication session and is released (terminated) after the data tr...

Open this answer on its own page →

Overview of Network Types

2080 · 5 marks

Explain different types of network types. [5]

A network is a collection of interconnected devices that can communicate and share resources with each other. Networks are classified based on their size, geographic coverage, and purpose. The main types of networks are described below: --- - The smallest and most basic type of network. - Made up...

Open this answer on its own page →

2076 · 5 marks

Explain LAN with example. How is it different from PAN? [5]

A Local Area Network (LAN) is a type of computer network that connects computers and other devices within a limited geographical area such as a home, office building, school, or campus. It allows connected devices to share resources such as files, printers, and internet connections. Feature Descr...

Open this answer on its own page →

OSI Reference Model

2079 · 10 marks

What is protocol? Explain each layer of OSI model in detail.[10]

Show solved answer

Protocol and OSI Model


Part 1: What is a Protocol?

A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network. It allows connected devices to communicate with each other, regardless of any differences in their internal processes, structure, or design. Network protocols play a critical role in modern digital communications.

In short, a protocol is a set of rules that governs communication.

Key Elements of a Protocol

ElementDescription
SyntaxRefers to the structure and format of the information/data. It defines how data is arranged.
SemanticsRefers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message.
TimingRefers to two characteristics: when data should be sent and how fast it should be sent.

Part 2: The OSI Model

The OSI (Open Systems Interconnection) model is a conceptual framework developed by ISO that standardizes the functions of a communication system into 7 distinct layers. Each layer has specific responsibilities and communicates with the layers directly above and below it.

+---------------------------+
|  7. Application Layer     |
+---------------------------+
|  6. Presentation Layer    |
+---------------------------+
|  5. Session Layer         |
+---------------------------+
|  4. Transport Layer       |
+---------------------------+
|  3. Network Layer         |
+---------------------------+
|  2. Data Link Layer       |
+---------------------------+
|  1. Physical Layer        |
+---------------------------+

Layer 7: Application Layer

  • This is the topmost layer and is closest to the end user.
  • It is responsible for node-to-node communication and controls user-interface specifications.
  • It provides network services directly to end-user applications.
  • It handles protocols such as:
    • HTTP/HTTPS: HTTP (Hypertext Transfer Protocol) is used by the World Wide Web (WWW) to manage communication between web browsers and servers. HTTPS is a combination of HTTP with SSL (Secure Socket Layer) for secure communication.
    • SSH (Secure Shell): A terminal emulation software preferred for its ability to maintain an encrypted connection. It is efficient for filling out forms, signing in, authentication, and carrying out bank transactions.
    • Other protocols: FTP, SMTP, DNS, etc.

Layer 6: Presentation Layer

  • This layer is responsible for translation, encryption, and compression of data.
  • It acts as a translator between the application layer and the network.
  • It converts data from the application layer into a format that can be transmitted over the network, and vice versa.
  • Key functions:
    • Data Translation: Converts data formats (e.g., ASCII to EBCDIC).
    • Encryption/Decryption: Ensures data security during transmission.
    • Compression: Reduces the number of bits to be transmitted.
  • Example formats: JPEG, MPEG, GIF, SSL.

Layer 5: Session Layer

  • This layer is responsible for establishing, managing, and terminating sessions (connections) between two communicating devices.
  • It controls the dialog between computers, deciding which side transmits, when, and for how long.
  • Key functions:
    • Session establishment, maintenance, and termination.
    • Synchronization: Adds checkpoints (sync points) in data streams so that in case of failure, transmission can resume from the last checkpoint.
    • Dialog control (half-duplex or full-duplex).
  • Example protocols: NetBIOS, PPTP.

Layer 4: Transport Layer

  • This layer is responsible for end-to-end communication and error-free delivery of data.
  • It corresponds to the Host-to-Host layer in the TCP/IP model.
  • Key functions:
    • Segmentation and Reassembly: Breaks data into smaller segments for transmission and reassembles them at the destination.
    • Flow Control: Manages the rate of data transmission.
    • Error Control: Detects and retransmits lost or corrupted data.
  • The two main protocols at this layer are:
    • TCP (Transmission Control Protocol): Provides reliable and error-free communication between end systems. It performs sequencing and segmentation of data. It is connection-oriented but has more overhead, increasing cost.
    • UDP (User Datagram Protocol): A cost-effective protocol used when reliable transport is not required. It is connectionless and faster than TCP.

Layer 3: Network Layer

  • This layer selects and manages the best logical path for data transfer between nodes.
  • It manages device addressing, tracks the location of devices on the network, and determines the best way to move data.
  • Key functions:
    • Translates logical network addresses into physical addresses.
    • Concerned with circuit, message, or packet switching.
    • Breaks larger packets into smaller packets (fragmentation).
    • Provides connection services including network layer flow control, error control, and packet sequence control.
    • Routers and gateways operate at this layer.
  • Common protocols:
    • IP (Internet Protocol): IPv4 uses 32-bit addresses displayed in dotted decimal notation. IPv6 uses 128-bit alphanumeric addresses arranged in eight groups of 16 bits each, separated by colons.
    • IPX/SPX: Also associated with this layer.

  • This layer is responsible for node-to-node delivery of data (between two directly connected nodes).
  • It ensures that data transferred across the physical layer is error-free.
  • Key functions:
    • Framing: Divides the stream of bits received from the network layer into manageable data units called frames.
    • Physical Addressing: Adds MAC (Media Access Control) addresses of sender and receiver in the frame header.
    • Error Detection and Correction: Detects and possibly corrects errors that may occur in the physical layer.
    • Flow Control: Coordinates the amount of data that can be sent before receiving an acknowledgment.
    • Access Control: Determines which device has control over the communication channel at a given time.
  • Hardware: Switches and bridges operate at this layer.

Layer 1: Physical Layer

  • This is the lowest layer of the OSI model and it carries the raw bit stream over the transmission medium.
  • It is concerned with the physical, electrical, and mechanical characteristics of the connection rather than with the meaning of the bits.
  • Key functions:
    • Bit transmission: Converts the frames handed down by the data link layer into electrical, optical, or radio signals and puts them on the medium.
    • Physical topology: Defines how the devices are arranged in the network (bus, star, ring, or mesh).
    • Transmission mode: Decides whether the transmission is simplex, half duplex, or full duplex.
    • Data rate and synchronization: Fixes the number of bits sent per second and keeps the sender and receiver bit-synchronized.
  • Hardware: Cables, connectors, hubs, repeaters, and network interface cards operate at this layer.

Conclusion

A protocol supplies the syntax, semantics, and timing rules that make communication possible, and the OSI model organizes those rules into seven cooperating layers. At the sender the data travels down all seven layers, each layer adding its own header, crosses the medium as a bit stream, and then travels up the same seven layers at the receiver, where every layer strips the header its peer added. Because each layer only has to honour the interface of the layers directly above and below it, any one layer can be designed, understood, or replaced without disturbing the rest of the stack.

Open this answer on its own page →

Overview of Network Topologies

2079 · 5 marks

Why do we need network topology? Explain star topology along with its merits and demerits. [5]

--- Network Topology refers to the physical or logical layout of a network. It defines the way different nodes are placed and interconnected with each other, and also describes how data is transferred between these nodes. We need network topology for the following reasons: - Organized Layout: It ...

Open this answer on its own page →

2076 · 5 marks

Define network topology. Explain ring topology along with its merits and demerits. [5]

Show solved answer

Network Topology: Definition and Ring Topology

Definition of Network Topology

Network topology refers to the physical or logical layout of a network. It defines the way different nodes are placed and interconnected with each other. Network topology also describes how the data is transferred between these nodes. Network topology is categorized into five basic models: Bus, Ring, Star, Mesh, and Tree topology.


Ring Topology

In ring topology, all network devices are connected sequentially to the same transmission line (like bus topology), except that the transmission line ends at the starting node, forming a closed loop or ring. It overcomes many of the limitations of bus topology.

Diagram

   [Node A]
   /       \
[Node D]  [Node B]
   \       /
   [Node C]

Each node is connected to exactly two other nodes, and data travels in one direction (or both directions in a dual ring) around the ring until it reaches the destination node.

Working Principle

  • Data is transmitted in the form of tokens (Token Ring protocol).
  • A node can only transmit data when it holds the token.
  • Each node acts as a repeater, regenerating and passing the signal to the next node.
  • The signal travels around the ring until it reaches the intended recipient.

Merits of Ring Topology

#Merit
1No data collision occurs because only the node holding the token can transmit at a time.
2Equal access to the network is provided to all nodes through token passing.
3Performance is better than bus topology under heavy network load.
4Easy to identify faults since each node acts as a repeater and a faulty node can be detected.
5No need for a central server or hub to manage the connections.

Demerits of Ring Topology

#Demerit
1Failure of a single node can bring down the entire network.
2Adding or removing nodes disrupts the entire network operation.
3Slower than star topology because data must pass through each intermediate node.
4Troubleshooting is difficult as a fault in the ring requires checking each node.
5Unidirectional traffic flow can be a bottleneck (unless a dual ring is used).

Summary: Ring topology provides an organized and collision-free method of data transmission using token passing, but its major weakness is that the failure of any single node or cable segment can disrupt the entire network.

Open this answer on its own page →

2080.1 · 5 marks

Explain different types of network topologies. [5]

Network Topology refers to the physical or logical layout of a network. It defines the way different nodes are placed and interconnected with each other, and also describes how data is transferred between these nodes. Network topology is categorized into five basic types as follows: --- - All nod...

Open this answer on its own page →

Overview of Protocols and Standards

2079 · 5 marks

Define Protocol. Why do we need standards? [5]

--- A protocol is a set of rules that governs communication between devices in a network. It defines how data is transmitted, received, and interpreted across a network. The three key elements of a protocol are: Element Description ------ Syntax Refers to the structure and format of the data. It ...

Open this answer on its own page →

2079 · 5 marks

Write short notes on (any two): a. Protocol and standards b. Switch c. Checksum [5]

Show solved answer

Short Notes (Any Two)


a. Protocol and Standards

Protocol

A protocol is a set of rules that governs data communication between devices in a network. Without a protocol, two devices may be connected but cannot communicate meaningfully.

The three key elements of a protocol are:

ElementDescription
SyntaxRefers to the structure and format of the data. It defines how data is arranged (e.g., which bits represent the address, which represent the data).
SemanticsRefers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message.
TimingRefers to two characteristics: when data should be sent and how fast it should be sent.

Examples of protocols: HTTP, SSH, SMS, FTP, TCP/IP.

Standards

Network standards define the rules for data communications that are needed for interoperability of networking technologies and processes. Standards:

  • Help create and maintain open markets
  • Allow different vendors to compete on quality while remaining compatible with existing products
  • Simplify network design and operation

Example of a standards body: ITU-T (International Telecommunication Union - Telecommunication Standardization Sector), based in Geneva, Switzerland, which coordinates standards for telecommunications globally.


c. Checksum

Checksum is an error detection technique used in data communication to detect errors that may have been introduced during transmission or storage.

How Checksum Works

At the Sender Side:

  1. The data is divided into equal segments of a fixed number of bits (e.g., 16-bit segments).
  2. All segments are added together using binary addition.
  3. If there is a carry in the final sum, it is wrapped around (added back to the result).
  4. The 1's complement of the final sum is computed. This is the checksum value.
  5. The checksum is appended to the data and transmitted.

At the Receiver Side:

  1. The receiver divides the received data (including checksum) into the same fixed-size segments.
  2. All segments are added together.
  3. The 1's complement of the total sum is computed.
  4. If the result is all zeros (0000...0), the data is accepted as error-free.
  5. If the result is not zero, an error is detected and the data is discarded.

Example

Suppose we have two 8-bit segments to transmit:

Segment 1:  10011001
Segment 2:  11100110

Step 1 - Add the segments:

  10011001
+ 11100110
----------
 101111111   (9-bit result, carry occurs)

Step 2 - Wrap around the carry:

  01111111
+        1
----------
  10000000

Step 3 - Take 1's complement (flip all bits):

Checksum = 01111111

This checksum is sent along with the data. At the receiver, all three values (segment 1 + segment 2 + checksum) are added, and the 1's complement of the result should be 00000000, confirming no error.

Key Points

  • Checksum is used in protocols such as TCP, UDP, and IP.
  • It is noted in the Data Plane layer (IP header checksum).
  • It is more powerful than simple parity checking but less powerful than CRC.
  • It can detect burst errors but may miss some error combinations.

Open this answer on its own page →

Networking Types

2078 · 5 marks

Explain client/server network. How is it different from peer to peer network? [5]

Client/Server architecture is a computing model in which the server hosts, delivers, and manages most of the resources and services to be consumed by the client. - One or more client computers are connected to a central server over a network or internet connection. - It is also known as a network...

Open this answer on its own page →

Internet, ISPs, Backbone Network Overview

2078 · 5 marks

Write short note on (any two): a. Backbone network b. ISDN c. Signal [5]

--- A backbone network is a network containing a high-capacity connectivity infrastructure used to connect different parts of a larger network. - It acts as the central highway that interconnects various smaller networks (such as LANs) and carries the bulk of network traffic. - It provides high-s...

Open this answer on its own page →

TCP/IP Models and its comparison with OSI

2076 · 10 marks

Explain each layer of TCP/IP model in detail. Compare it with OSI model.[10]

The TCP/IP model (Transmission Control Protocol / Internet Protocol) is a concise, practical networking model that forms the foundation of the modern Internet. Unlike the OSI model which has 7 layers, the TCP/IP model has 4 layers. It was developed by the U.S. Department of Defense (DoD) and is w...

Open this answer on its own page →