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.
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]
Overview of Network Types
2076 · 5 marks
Explain LAN with example. How is it different from PAN? [5]
OSI Reference Model
2079 · 10 marks
What is protocol? Explain each layer of OSI model in detail.[10]
Show solved answerHide 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
| Element | Description |
|---|---|
| Syntax | Refers to the structure and format of the information/data. It defines how data is arranged. |
| Semantics | Refers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message. |
| Timing | Refers 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.
Layer 2: Data Link 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.
Overview of Network Topologies
2079 · 5 marks
Why do we need network topology? Explain star topology along with its merits and demerits. [5]
2076 · 5 marks
Define network topology. Explain ring topology along with its merits and demerits. [5]
Show solved answerHide 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 |
|---|---|
| 1 | No data collision occurs because only the node holding the token can transmit at a time. |
| 2 | Equal access to the network is provided to all nodes through token passing. |
| 3 | Performance is better than bus topology under heavy network load. |
| 4 | Easy to identify faults since each node acts as a repeater and a faulty node can be detected. |
| 5 | No need for a central server or hub to manage the connections. |
Demerits of Ring Topology
| # | Demerit |
|---|---|
| 1 | Failure of a single node can bring down the entire network. |
| 2 | Adding or removing nodes disrupts the entire network operation. |
| 3 | Slower than star topology because data must pass through each intermediate node. |
| 4 | Troubleshooting is difficult as a fault in the ring requires checking each node. |
| 5 | Unidirectional 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.
2080.1 · 5 marks
Explain different types of network topologies. [5]
Overview of Protocols and Standards
2079 · 5 marks
Write short notes on (any two): a. Protocol and standards b. Switch c. Checksum [5]
Show solved answerHide 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:
| Element | Description |
|---|---|
| Syntax | Refers 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). |
| Semantics | Refers to the meaning of each section of bits. It identifies the route to be taken or the final destination of the message. |
| Timing | Refers 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:
- The data is divided into equal segments of a fixed number of bits (e.g., 16-bit segments).
- All segments are added together using binary addition.
- If there is a carry in the final sum, it is wrapped around (added back to the result).
- The 1's complement of the final sum is computed. This is the checksum value.
- The checksum is appended to the data and transmitted.
At the Receiver Side:
- The receiver divides the received data (including checksum) into the same fixed-size segments.
- All segments are added together.
- The 1's complement of the total sum is computed.
- If the result is all zeros (0000...0), the data is accepted as error-free.
- 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.
Networking Types
2078 · 5 marks
Explain client/server network. How is it different from peer to peer network? [5]
Internet, ISPs, Backbone Network Overview
2078 · 5 marks
Write short note on (any two): a. Backbone network b. ISDN c. Signal [5]
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]
Make Unit 1 stick
Practice CSC263 with flashcards & quizzes