Computer NetworkS - Hamza
Computer NetworkS - Hamza
NOTES
SUBJECT :
Computer Networks
CLASS :
BSCS 3rd Semester
WRITTEN BY :
Hamza Zahoor
Examples:
Key Takeaway: Sets the stage for the entire course, providing a
roadmap of the learning journey.
2. Data Communication
Key Concepts:
o Applications:
Examples:
Characteristics:
Components:
Hamza Zahoor What's App 0341-8377-917
2. Sender (Source): The device that sends the data message. It can
be a computer, a workstation, a telephone, a video camera, etc.
5. Data Representation
Methods of Representation:
Hamza Zahoor What's App 0341-8377-917
Representations:
Definition: Data flow refers to the direction in which data can move
between two devices in a communication system. This characteristic
defines the capability of the communication channel.
1. Simplex:
Example:
2. Half-Duplex:
Example:
3. Full-Duplex:
Example:
1. What Is Network?
Key Concepts:
Examples:
Benefits of Networking:
2. Network Criterion
Criteria:
1. Performance:
Metrics:
2. Reliability:
Metrics:
3. Security:
Aspects:
4. Scalability:
5. Manageability/Maintainability:
Types:
1. Point-to-Point Connection:
Characteristics:
Example:
Characteristics:
Example:
1. Mesh Topology:
Advantages:
Hamza Zahoor What's App 0341-8377-917
Disadvantages:
2. Star Topology:
Advantages:
Disadvantages:
Hamza Zahoor What's App 0341-8377-917
3. Bus Topology:
Advantages:
Disadvantages:
4. Ring Topology:
Advantages:
Disadvantages:
5. Hybrid Topology:
Advantages:
Hamza Zahoor What's App 0341-8377-917
Disadvantages:
Examples:
Categories:
Characteristics:
Ownership: Private.
Example:
Characteristics:
Example:
Characteristics:
Example:
The Internet.
o Timing: When data should be sent, how fast it can be sent, and
the sequence of events.
Examples (Protocols):
1. Layered Architecture
How it Works:
2. Network Models
Key Principles:
The OSI model consists of seven distinct layers, stacked one on top of
the other, each responsible for a specific part of the communication
process.
PDU: Frames
PDU: Packets
PDU: Data
Hamza Zahoor What's App 0341-8377-917
PDU: Data
PDU: Data
Key Characteristics:
Protocols:
Hamza Zahoor What's App 0341-8377-917
PDU: Data.
Export to Sheets
6. Circuit Switching
Characteristics:
Examples:
When to Use: Ideal for applications that require constant data flow
and minimal delay variations, such as real-time voice and video
communication, where consistent quality is more important than
efficient bandwidth utilization.
1. Applications
Key Role: Applications are the primary interface through which end-
users interact with the network. They provide the actual utility and
value of a network.
Examples:
2. Statistical Multiplexing
Mechanism:
o It then creates frames (or packets) that contain data from only
the active lines, along with control information to identify the
source of each data block.
Key Characteristics:
o No Fixed Time Slots: Time slots are not pre-assigned; they are
given to active users.
Advantages:
Disadvantages:
Example:
3. Packet Switching
Mechanism:
Key Characteristics:
Advantages:
Disadvantages:
4. Message Switching
Mechanism:
Key Characteristics:
Hamza Zahoor What's App 0341-8377-917
Advantages:
Disadvantages:
Real-time Poor (not suitable for real- Good (suitable for real-time
Support time) due to smaller units)
Export to Sheets
Export to Sheets
2. Queuing Delay:
4. Propagation Delay:
Variability of Delay:
Mitigation Strategies:
3. Digital Signals
4. Transmission Impairment
1. Attenuation:
2. Distortion:
3. Noise:
Types of Noise:
4. Jitter (Revisit):
Hamza Zahoor What's App 0341-8377-917
Formula: C=2×B×log2L
Formula: C=B×log2(1+S/N)
o Practical Implications:
6. Performance
1. Bandwidth (Throughput):
2. Latency (Delay):
Definition: The total time taken for data to travel from the
source to the destination. As discussed in Week 4, it
comprises processing delay, queuing delay, transmission
delay, and propagation delay.
3. Jitter:
5. Reliability:
6. Utilization:
o Trade-offs in Performance:
o Unipolar (NRZ):
NRZ: (e.g., NRZ-L: positive for '1', negative for '0'; NRZ-I:
invert on '1', no change on '0'). Still has synchronization
issues.
Steps in PCM:
1. Sampling:
2. Quantization:
3. Transmission Modes
Definition: How bits are organized for transmission over a data link,
particularly concerning the timing and order of bits.
Types:
1. Parallel Transmission:
Characteristics:
2. Serial Transmission:
Hamza Zahoor What's App 0341-8377-917
Characteristics:
1. Asynchronous Transmission:
Characteristics:
2. Synchronous Transmission:
Hamza Zahoor What's App 0341-8377-917
Characteristics:
Purpose:
1. AM (Amplitude Modulation):
2. FM (Frequency Modulation):
3. PM (Phase Modulation):
1. Transmission Media
2. Guided Media
Types:
1. Twisted-Pair Cable:
Types:
2. Coaxial Cable:
Types:
3. Fiber-Optic Cable:
Types:
Advantages:
1. Radio Waves:
2. Microwaves:
Types:
3. Infrared:
Definition: The Data Link Layer (Layer 2) in the OSI model (and
often integrated into the "Network Access Layer" in TCP/IP) is
responsible for reliable node-to-node data transfer across a physical
link. It ensures that data packets (which it calls "frames") are
transmitted and received accurately between two directly connected
devices.
Main Responsibilities/Functions:
1. Framing: Divides the stream of bits from the Network layer into
manageable units called frames. Adds a header and trailer to
each frame (containing control information like
source/destination physical addresses, frame delimiters, error
detection codes).
5. Block Coding
Purpose:
Mechanism:
o The sender divides the outgoing bit stream into blocks of 'k' bits.
Redundancy: The added (n-k) bits do not carry new information but
provide the desired line characteristics.
Example:
Types/Examples:
Even Parity: The parity bit is set so that the total number
of '1's in the codeword (data + parity) is even.
Hamza Zahoor What's App 0341-8377-917
Odd Parity: The parity bit is set so that the total number
of '1's in the codeword is odd.
7. Cyclic Codes
Mechanism (Simplified):
1. Sender:
2. Receiver:
Advantages:
8. Checksum
Mechanism:
1. Sender:
2. Receiver:
Advantages:
Disadvantages:
Go-Back-N ARQ:
1. Error Detection:
2. Error Correction:
2. Noiseless Channels
Formula: C=2×B×log2L
o B: Bandwidth (Hz)
3. Noisy Channels
Formula: C=B×log2(1+S/N)
o B: Bandwidth (Hz)
Implications:
Hamza Zahoor What's App 0341-8377-917
o For a given bandwidth, higher SNR allows for higher data rates.
4. Multiple Access
Examples:
Examples:
3. Channelization Protocols:
Examples:
5. Connecting Devices
Repeater:
Bridge:
Router:
Gateway:
Firewall:
Key Characteristics:
Components:
Key Characteristics:
Definition: The Network Layer (Layer 3) in the OSI model (and the
Internet Layer in TCP/IP) is primarily responsible for logical addressing
and routing packets from a source host to a destination host across
possibly multiple different networks. It handles the end-to-end delivery
of packets.
Logical Addressing:
Hamza Zahoor What's App 0341-8377-917
2. IPv4 Addressing
Address Format:
o Example: 192.168.1.10
o Class E: Experimental.
o Broadcast Address: All host bits are 1. Used to send data to all
hosts on a specific network. (e.g., 192.168.1.255/24)
3. IPv6 Addressing
Address Format:
o Example: 2001:0DB8:85A3:0000:0000:8A2E:0370:7334
o Simplification Rules:
o Dual Stack: Devices run both IPv4 and IPv6 protocol stacks
simultaneously.
Hamza Zahoor What's App 0341-8377-917
Internetworking:
o Role of IP: The Internet Protocol (IP) is the key protocol that
enables internetworking by providing a universal logical
addressing scheme and routing capabilities across different
physical network technologies.
Subnetting:
o Purpose:
o How it Works:
1. Address Mapping
How it works:
2. ICMP Protocol
router could not be reached. It's often considered an integral part of IP,
not a separate protocol running on top of IP.
Purpose:
Key Characteristics:
1. Destination Unreachable:
3. Redirect:
Hamza Zahoor What's App 0341-8377-917
3. Routing Protocol
Key Concepts:
Examples:
Example:
Goal: To determine the single best path for a packet to travel from a
source host to a single destination host across the network.
Disadvantages:
Hamza Zahoor What's App 0341-8377-917
Advantages:
Definition: The Transport Layer (Layer 4) in the OSI model (and the
"Transport Layer" or "Host-to-Host Layer" in TCP/IP) provides end-to-
end communication between processes (applications) running on
different hosts. It handles multiplexing, demultiplexing, and ensures
reliable or unreliable data transfer.
Key Functions:
3. Error Control (for TCP): Ensures that all data segments arrive
at the destination correctly and in order.
Advantages:
Disadvantages:
Applications:
Advantages:
Disadvantages:
Applications:
3. Process-to-Process Delivery
o Client/Server Model:
Hamza Zahoor What's App 0341-8377-917
1. Congestion
Hamza Zahoor What's App 0341-8377-917
Symptoms of Congestion:
Causes of Congestion:
2. Congestion Control
Methods:
Methods:
1. Slow Start:
2. Congestion Avoidance:
3. Fast Retransmit:
4. Fast Recovery:
3. Flow Control
o How it works:
2. The sender will not send more data than allowed by the
rwnd.
Advantages:
Role:
Hamza Zahoor What's App 0341-8377-917
Characteristics:
Components:
Hamza Zahoor What's App 0341-8377-917
Components:
Characteristics:
Hamza Zahoor What's App 0341-8377-917
Active Mode: Client sends its IP and port to the server via
the control connection. The server then initiates the data
connection from its port 20 to the client's specified port.
Often problematic with firewalls.
Characteristics:
Characteristics:
Characteristics:
Client-Server Model:
2. The user's computer (DNS resolver) checks its local DNS cache. If
found, it uses that.
The local DNS server queries the .com TLD server. The TLD
server responds with the IP address of example.com's
authoritative name server.
Protocol: Uses UDP Port 53 for standard queries (for speed). Uses
TCP Port 53 for zone transfers and larger responses.
Client-Server Model:
DHCP Lease:
Benefits:
1. Network Security
Hamza Zahoor What's App 0341-8377-917
2. Cryptography
Hamza Zahoor What's App 0341-8377-917
Fundamental Concepts:
Types of Cryptography:
Properties:
3. Digital Signatures
Purpose:
o Integrity: Proves that the message has not been altered since it
was signed.
Purpose:
Key Components:
5. Firewalls
Hamza Zahoor What's App 0341-8377-917
Purpose:
Types of Firewalls:
1. Packet-Filtering Firewalls: