0% found this document useful (0 votes)
5 views75 pages

Introduction to Computer Networks Basics

The document provides an introduction to computer networks, explaining their purpose, classification, and complexity. It covers key concepts such as the Internet, resource sharing, packet transmission, and error detection methods. The content emphasizes the importance of understanding networking principles and terminology for effective communication and data sharing.

Uploaded by

ibrahimkhan2p123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views75 pages

Introduction to Computer Networks Basics

The document provides an introduction to computer networks, explaining their purpose, classification, and complexity. It covers key concepts such as the Internet, resource sharing, packet transmission, and error detection methods. The content emphasizes the importance of understanding networking principles and terminology for effective communication and data sharing.

Uploaded by

ibrahimkhan2p123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Lecture 1 – Introduction to Computer Networks

(Easy Notes)

🌐 1. What is a Network?
 A network connects computers together so they can share data and communicate.
 Example: You can send files, emails, or messages between connected computers.

👉 Simple words:
A network is a system where computers are linked to share information.

💫 2. What is the Internet?


 The Internet is a big network of networks connected by routers.
 It allows computers all around the world to talk to each other.

👉 Simple words:
The Internet connects many small networks together — even across countries.

🧩 3. Classification of Networks
Networks can be divided in four ways:

1. By Size
2. By Connectivity
3. By Medium
4. By Mobility

Let’s understand each 👇

🧱 1) By Size

There are two types:

Type Meaning Example


LAN (Local Area Network) Small area (room, building) School lab, office network
WAN (Wide Area Network) Large area (city, country) Internet, bank networks
👉 Difference:
LAN = fast, small area, easy to manage.
WAN = large area, slower, expensive.

🔗 2) By Connectivity

It means how computers are connected with each other.

There are two main kinds:

 Point-to-Point
 Broadcast

a) Point-to-Point

Each computer connects to others directly or through a hub.

Two topologies:

1. Star Topology:
o All computers connect to a central hub.
o If hub fails → all communication stops.
o Example: Office network.
2. Tree Topology:
o Computers are connected in a tree-like structure (branches).
o Easy to expand.

b) Broadcast

All computers share the same communication path.

Two main types:

1. Satellite/Radio Topology:
o Communication through radio waves or satellites.
o Used for wireless networks.
2. Ring Topology:
o Every computer connects in a ring (circle).
o Data travels in one direction around the ring.

🧵 3) By Medium (Transmission Media)

Medium = the path used to send data.

Medium Example Features


Copper Wire Telephone cable Cheap, low speed
Medium Example Features
Co-axial Cable TV cable Better speed
Optical Fiber Glass cable Very high speed, expensive
Radio Waves Wireless Long range, no cable needed

👉 Simple:
Each medium has different speed, cost, range, and reliability.

📱 4) By Mobility

It means whether the network is fixed or movable.

Type Meaning Example


Fixed Network Computers do not move Office or home network
Mobile Network Devices move around Mobile phones, Wi-Fi

Issues with Mobile Networks:

 Location & Tracking – device keeps changing location.


 Connections – must remain active while moving.
 Billing & Management – difficult when users move.

🏢 5. Networks in Daily Life


Networks are everywhere!
They are used in:

Area Use
Business Advertising, billing, accounting, planning
Home Controlling smart devices
Government/Military Communication, data sharing
Education Online classes, digital libraries

👉 In short:
Networks make communication and sharing possible in all fields.

⚙️6. Complexity of Network Systems


Networks are complex because:

1. Many Different Technologies Exist:


o Many companies made their own network systems.
oNot all are compatible (work together).
2. No Single Model or Theory:
o There isn’t one standard system.
o Different models (like OSI or TCP/IP) exist for different uses.
3. Models Are Too Simple or Too Complex:
o Some models are so simple they miss details.
o Others are too technical to understand easily.
4. No Uniform Terminology:
o Same thing can have different names in different systems.
o Example: “Node” and “Host” can mean the same thing.

👉 Result:
It becomes difficult for learners and engineers to understand and connect systems.

🧠 7. Mastering the Complexity


To handle the complexity, follow these tips:

1. Understand Concepts, Not Details:


o Focus on what is happening, not how.
o Example: Understand “what is congestion,” not “how each protocol fixes it.”
2. Learn Networking Terminology:
o Learn the common terms used in networking.
o Helps in understanding books, diagrams, and systems.
3. Focus on Breadth, Not Depth:
o First understand the overall picture, then go into details later.
4. Use Analogies and Examples:
o Example: A network works like a postal system — computers send and receive “letters” (data
packets).

📘 Quick Revision Table


Topic Key Point
Network Connection of computers to share data
Internet Biggest network of networks
LAN Small area, fast
WAN Large area, slow
Topologies Star, Tree, Ring, Satellite/Radio
Mediums Copper, Coaxial, Fiber, Radio
Mobility Fixed & Mobile networks
Uses of Networks Business, home, education, govt
Complexity Reasons Many techs, no single model, confusing terms
Mastering Complexity Focus on concepts, learn terms, use examples
🧾 Short Summary
A computer network connects computers so they can share data.
Networks can be classified by size (LAN/WAN), connectivity (topologies), medium (fiber, wire, radio), and
mobility (fixed/mobile).
Networks are used in all areas of life.
They are complex because of many technologies and lack of standard models.
To master them, understand the core concepts and learn basic networking terms.

Lecture 2:
🎯 Main Topic: Motivation and Tools in Networking
💡 1. Motivation for Networking

The main reason people started using computer networks was resource sharing.

🖥️2. Resource Sharing (Main Concept)

Meaning:
Sharing computers, devices, or data among users instead of giving each person separate resources.

Example:
In an office — instead of giving a separate printer to every worker, one printer can be shared through the
network.

Goal:
To make all programs, data, and devices available to any user in the network — no matter where they are.

Early Purpose:
In old days, computers were very expensive, so scientists and engineers shared computers to use their
processing power.

🚀 3. ARPA’s Effort (Birth of Internet)

ARPA (Advanced Research Projects Agency) was a U.S. government agency.

Goal:
To connect research computers so that all scientists could use the best machines.

How they did it:

 Used packet switching and internetworking techniques.


 Created the first network called ARPANET.
 This later became the Internet in the 1970s.

🌍 4. Growth of the Internet

 Internet grew very fast (exponential growth).


 It doubled every 9–12 months in early years.
 On a log scale, this growth looks like a straight line.

(You just need to remember: Internet growth = very fast and exponential.)

🔍 5. Probing the Internet (Checking Connections)


We need tools to check if a computer is connected to the internet or not.
These are called probing tools.

⚙️6. PING Command

Meaning:
A tool to test if a computer or website is online.

How it works:

 Sends small test messages (called packets) to a computer.


 If replies come back → computer is online.
 Shows details like:
o IP address
o Packet sequence
o Time taken (Round Trip Time - RTT)

Example:
ping [Link]
If 5 packets sent and 5 received → connection is OK.

⚠️7. Problems with Ping

Ping can’t always tell why something failed.

Possible reasons:

1. The remote computer has a problem.


2. Your own (local) computer has a problem.
3. Network is congested (too much traffic).
4. Some computers block ping to prevent attacks.

👉 Still, Ping is very useful — network administrators always use it first when something fails.

🧭 8. Tracing a Route (Traceroute Tool)

Purpose:
To find the path data takes from your computer to the destination.

Example:
If you connect to a website, your data passes through many routers/computers.
Traceroute shows each stop (hop) in between.

Output Shows:
 All computers in the path
 Time taken for each step

In short:

 Ping → checks if destination is reachable.


 Traceroute → shows how to reach destination.

🧠 QUICK REVISION POINTS (For Exam)


Concept Simple Meaning
Resource Sharing Sharing data/devices among users
Goal of Sharing Access any program/device anywhere
Early Sharing Reason Computers were expensive
ARPA U.S. agency that started networking (ARPANET)
Internet Growth Very fast, doubled every 9–12 months
Probing Checking if computers are connected
PING Tests connection availability
Ping Problems No reason shown if failure happens
Traceroute Shows full path from source to destination

Lecture No. 3:
NOTE: Chapter 4, 5, 6 deals with the course of DATA COMMUNICATION, which has been studied as a separate, course
earlier. So these chapters are just overviewed and can be seen in the third lecture video. It should also be noted that
these chapters will contain no assignment, or quizzes and these chapters will also be out of the examination.

Lecture No. 4 (CHAPTER 7)

🌐 1. Background
Earlier lectures (Data Communication) explained how bits move through cables and signals.
Now, we’re moving to a higher level — where data is not sent bit by bit, but in chunks called packets.

📦 2. What is a Packet?
📘 Definition:

A packet is a small block of data that networks send instead of sending all bits continuously.

💡 Why use Packets (not bits)?

Because:

1. Error Detection:
Sender and receiver can check each packet separately for errors.
2. Sharing Networks:
Many computers use the same network. Sending full files one by one would make others wait too long.
Packets help everyone share fairly.

⚙️3. Problem with Sharing Networks


 Many computers share the same network line.
 Some users send large files (e.g., videos) → occupy the line for a long time.
 Others have small messages → can’t wait that long.

💡 We need fairness — so all computers get a chance.

✅ 4. Solution: Use Packets


 Split large data into small packets.
 Each computer sends one packet at a time, then lets others send theirs.
 This way, no one waits too long.

🎯 Example:

Without packets:

 File size = 5 MB
 Network speed = 56 Kbps
 Time = ~12 minutes
→ Other computers wait 12 minutes 😬
With packets:

 Divide file into 1000-byte packets


 Each packet takes only 0.14 seconds
 Other computers wait just 0.14 seconds, not 12 minutes 😄

📘 Result:

 Total transfer time for the file is still 12 min.


 But network becomes fair — all users get turns quickly.

5. Packets and TDM (Time Division Multiplexing)


TDM = Time Division Multiplexing

💡 Idea:

 Packets are sent one after another, each gets a short time slice on the shared line.
 Think of it like sharing a single road, where each car (packet) gets its turn to go.

⚙️Process:

1. Packets leave the source.


2. A multiplexer sends packets from multiple computers onto one line.
3. At the destination, a demultiplexer separates them and sends each to the right computer.

📘 Key Point:
Packets make TDM possible, allowing multiple users to share the same communication channel efficiently.

🧱 6. Packets vs Frames
Term Meaning
Packet General term for a block of data sent over the network.
Frame A packet with a specific structure used by hardware (e.g., Ethernet, Wi-Fi).

💡 Think of it like:

 “Packet” = a box 📦
 “Frame” = a box with a label and address on it so hardware knows what to do.

🧾 7. Frame Format
To send frames, we must mark where each frame starts and ends.
Format:
[SOH | HEADER | DATA | TAIL | EOT ]

Term Meaning
SOH (Start of Header) Shows start of frame
EOT (End of Tail) Shows end of frame
Header Contains sender, receiver, type of data
Data Actual message/content
Tail Error-checking info, etc.

⚡ 8. Framing in Practice
🔹 Overhead Problem:

Every frame adds extra information (header + tail).


This extra data = overhead, which slightly reduces speed.

🔹 Continuous Transmission:

To avoid delays between frames, computers may send special extra characters to mark the gap between
frames.

🔹 Common Problems:

1. Missing EOT → Sender crashed before finishing.


2. Missing SOH → Receiver didn’t detect the start properly.
3. Bad Frame → Data is corrupted; receiver discards it.

🧠 QUICK REVISION NOTES (For Exam)


Concept Explanation
Packet Small chunk of data for network transmission.
Why Packets? To detect errors + ensure fairness in shared networks.
Without Packets One long transmission; others wait too long.
With Packets Data divided; turns taken fairly; no long waits.
TDM Time-based sharing — each packet gets a small time slot.
Multiplexer/Demultiplexer Devices to combine/separate packets.
Frame Packet with defined structure (SOH, Header, Data, Tail, EOT).
Framing Problems Missing start/end → frame lost; bad frame → discarded.

💬 EASY WAY TO REMEMBER:


“Packets make sharing fair, frames give structure there.”
Lecture 5:

– BYTE STUFFING & ERROR DETECTION


(EASY EXPLANATION)

🚦 WHY BYTE STUFFING IS NEEDED?


When we send data, we use special characters to show start and end of a frame:

 SOH = Start of Header


 EOT = End of Transmission

👉 Problem: What if these characters appear inside the data itself?


The receiver will get confused — is it data or frame boundary?

✅ Solution: Change data slightly before sending → called Data Stuffing

🧩 TYPES OF DATA STUFFING


1. Byte Stuffing → Used in character-oriented systems
2. Bit Stuffing → Used in bit-oriented systems

💡 BYTE STUFFING (MAIN TOPIC)


In byte stuffing, the sender adds an extra byte (ESC) before any special character appearing in the data.

Example:

Original After Byte Stuffing


SOH ESC X
EOT ESC Y
ESC ESC Z

Receiver removes stuffing:


 ESC X → SOH
 ESC Y → EOT
 ESC Z → ESC

👉 This helps the receiver differentiate control info (frame markers) from real data.

⚡ TRANSMISSION ERRORS
Even with good data, errors can happen during transmission due to:

 Noise / interference
 Power surges
 Hardware issues

Errors can:

 Change bit values (1 → 0 or 0 → 1)


 Lose bits completely

🧠 ERROR DETECTION AND CORRECTION


To handle errors:

 Sender adds extra bits (error checking info)


 Receiver checks and detects if data is wrong
 If wrong → data is rejected or corrected

🧮 PARITY CHECKING (Simple Error Detection)


Parity = Evenness or oddness of 1s in data.

➕ Two types:

1. Even Parity → Number of 1’s must be even


2. Odd Parity → Number of 1’s must be odd

Parity Bit → Extra bit added to make total 1’s even or odd.

⚙️Example:

Data: 10010001 (has 3 ones = odd)


Type Add Parity Bit Result
Even Parity 1 100100011 (now 4 ones = even ✅)
Odd Parity 0 100100010 (still 3 ones = odd ✅)

If noise changes a bit → parity becomes wrong → error detected.

LIMITATION OF PARITY CHECKING


❌ Detects only single-bit errors
❌ Fails if even number of bits change

Example:
Original (Even Parity): 10010001 + 1
Error: 10110011 + 1 → parity still even → error not detected

✅ ALTERNATIVE ERROR DETECTION METHODS


To improve detection, we use better methods:

1. Checksum
2. CRC (Cyclic Redundancy Check)

🧾 CHECKSUM (Simple & Common)


🔹 Steps:

1. Divide data into equal-size integers (8, 16, or 32 bits).


2. Add them all together.
3. Add carry bits to final sum.
4. Take complement → this becomes checksum.
5. Send data + checksum.
6. Receiver recalculates checksum and compares.
o If same ✅ data is correct
o If different ❌ error detected

🧠 Checksum uses simple addition — easy to implement, but not 100% accurate.

🔄 CYCLIC REDUNDANCY CHECK (CRC)


The most powerful and accurate error detection method.
🧮 Basic Idea:

Treat data bits as a polynomial (math equation).


Then:

1. Divide by a fixed generator polynomial.


2. Take the remainder.
3. Send data + remainder (CRC bits).
4. Receiver divides again →
o If remainder = 0 → ✅ no error
o Else → ❌ error detected

⚙️Hardware Used in CRC:

1. Shift Register → moves bits left during division


2. XOR Unit (Exclusive OR) → performs binary division operation

🔁 Two operations:

 Initialize: set all bits to 0


 Shift: move all bits left during process

✅ CRC detects multiple-bit errors and is easy to build in hardware.

🧾 QUICK REVISION TABLE (Exam Cheat Sheet)


Concept Meaning / Example
Byte Stuffing Adds ESC before control bytes to avoid confusion
ESC Sequences ESC X → SOH, ESC Y → EOT, ESC Z → ESC
Transmission Errors Data damaged by noise/interference
Error Detection Finding if data is corrupted
Parity Bit Extra bit added for error checking
Even Parity Total 1’s even
Odd Parity Total 1’s odd
Parity Limitation Misses even-bit errors
Checksum Adds up data bytes → easy but less accurate
CRC Divides data polynomial → most accurate
CRC Hardware Shift Register + XOR unit

💡 KEY POINTS TO REMEMBER FOR EXAM


✅ Byte Stuffing = solves data/control confusion
✅ Even Parity → even 1’s; Odd Parity → odd 1’s
✅ Parity detects 1-bit errors only
✅ Checksum → simple addition method
✅ CRC → polynomial division, best for error detection
✅ CRC uses Shift Register + XOR Gate

Lecture No. 6

🎯 MAIN TOPICS COVERED


1. Shift Operation in CRC (Cyclic Redundancy Check)
2. Types of Errors (Vertical & Burst Errors)
3. Frame Format and Error Detection
4. LAN Technology and Network Topology
5. Direct Point-to-Point Communication (Advantages & Disadvantages)

🧠 1. SHIFT OPERATION (in CRC)


Concept:
A Shift Operation means moving all bits one position to the left.

 In CRC hardware, bits are shifted through registers.


 Each bit moves one step at a time using shift registers.
 There are XOR gates (Exclusive OR) used to calculate the CRC value.

🔹 Example:

Imagine a 16-bit message:


1011001110001110

When you perform shift operations, each bit moves left — one by one — through 16 registers.

At the end of shifting all bits,


👉 the remainder (CRC value) is left in the registers.

That CRC value is then added to the frame (data being sent) for error checking.

⚙️2. TYPES OF ERRORS DETECTED BY CRC


CRC is more powerful than simple checksum.
It can detect two main types of errors:

a) Vertical Errors

 Happen because of hardware failure.


 Example: If the 2nd bit of every byte gets damaged (e.g., always flips from 1 to 0).
 CRC can detect such consistent bit-position errors.

Think: A column of bits gets damaged → “vertical” error.

b) Burst Errors

 A group of bits get changed near one area (not the whole message).
 Caused by electric noise, lightning, or motor interference.
 Example:
 Original: 110110111000
 Received: 110111111000

(a small burst of bits flipped)

CRC can easily detect this too.

📦 3. FRAME FORMAT AND ERROR DETECTION


When we send a message (frame) over a network:

[Header] + [Data] + [CRC]

 Sender side:
Calculates CRC for the data and attaches it to the frame.
 Receiver side:
Recalculates CRC.
o If CRC matches → frame is correct.
o If CRC doesn’t match → frame has an error → it is discarded.

👉 So, CRC ensures reliability in data transmission.

🌐 4. LAN TECHNOLOGY AND NETWORK TOPOLOGY


Now, moving to the network connection part…

LAN (Local Area Network)

 A local network where many computers share resources (like printer, files).
 All devices are connected in some topology (pattern) using cables or wireless.

Shared Medium Concept:

 All computers share the same transmission medium (like a cable).


 So, they must take turns sending data (to avoid collision).

🔗 5. DIRECT POINT-TO-POINT COMMUNICATION


Before modern LANs, networks used Direct Point-to-Point connections.

🔹 What it means:

Each computer is directly connected to every other computer by a separate wire.

Example:

If you have 4 computers (A, B, C, D):

 A connects to B, C, D
 B connects to C, D
 C connects to D

Total connections = (n² – n) / 2

For 4 computers → (16 – 4) / 2 = 6 connections

✅ Advantages

1. Each connection can use different frame format or error detection.


2. Easier to control security & privacy (since connections are private).
3. Each link can have different speed or type.
❌ Disadvantages

1. Too many wires/connections → becomes expensive.


(For 10 computers → 45 connections!)
2. Adding a new computer means connecting it to all others (N-1 new links).
3. Not scalable and hard to manage.
4. Most computers still share similar physical paths, so redundancy happens.

🧾 QUICK REVISION SUMMARY (for exam)


Concept Quick Definition
Shift Operation Moving bits left one by one through registers (used in CRC).
CRC Error detection method using shift registers and XORs.
Vertical Error Same bit position damaged in every character.
Burst Error Group of bits changed near a location due to noise.
Frame Format Data + CRC; receiver discards frame if CRC mismatches.
LAN Local area network for sharing resources.
Point-to-Point Every computer directly connected to every other.
Advantage of P2P Secure, flexible, customizable links.
Disadvantage of P2P Expensive, complex, not scalable.
Formula for connections (n² – n) / 2

🧩 EXAM-TYPE SHORT QUESTIONS & ANSWERS


Q1: What is the purpose of shift operation in CRC?
👉 To shift bits through registers and calculate CRC value for error detection.

Q2: What types of errors can CRC detect?


👉 Vertical errors and Burst errors.

Q3: What happens if the receiver finds an error using CRC?


👉 The frame is discarded.

Q4: Why is point-to-point communication expensive?


👉 Because the number of connections increases rapidly with the number of computers.

Q5: Write formula for number of connections in point-to-point network.


👉 (n² – n) / 2
Lecture No. 7

🧠 MAIN IDEAS OF LECTURE 7


This lecture explains:

1. How LAN technology started and grew


2. The Locality of Reference Principle
3. The 3 main LAN topologies (Star, Ring, Bus)
4. The reason for multiple topologies
5. Ethernet (as an example of Bus topology)

🚀 1. GROWTH OF LAN TECHNOLOGY


🔹 What is LAN?

LAN (Local Area Network) = A network that connects computers within a small area (like an office,
building, or campus) to share data and resources (e.g. printers, files).

🔹 Origin:

 Started in 1960s–1970s.
 Main goal: To reduce the number of connections by allowing computers to share a single
communication channel.

🔹 How it works:
 LAN has one shared medium (like a cable).
 Computers take turns sending data.
(One sends, then another, etc.)

🔹 Local vs Long Distance:

 Local communication → uses LAN (shared channel).


 Long-distance communication → uses point-to-point links.

✅ LAN = cost-effective
❌ But computers must compete for the same channel.

💡 2. SIGNIFICANCE OF LANs & “LOCALITY OF REFERENCE”


LANs are cheap, fast, and most popular form of networks today.
Their success is explained by the “Locality of Reference Principle”.

⚙️What is “Locality of Reference”?

It helps predict which computers communicate most often.

There are two types:

🅰️Spatial Locality of Reference

Computers often communicate with other computers that are nearby.

✅ Example:
Computers in the same office or department share files more often than distant ones.

👉 Because LAN connects nearby computers, it is efficient for spatial locality.

🅱️Temporal Locality of Reference

Computers often communicate with the same computers repeatedly over time.

✅ Example:
Your PC frequently connects to your company’s main server every day.

👉 This helps decide which computers should be placed together on the same LAN.

✅ Summary Table:
Type Meaning Example
Spatial Locality Nearby computers talk more PCs in same room share data
Temporal Locality Same computers talk repeatedly PC connects daily to same server

🕸️3. LAN TOPOLOGIES


Topology = The shape or structure of a network (how computers are connected).

There are 3 main types:

🌟 1. STAR Topology

 All computers connect to a central device (called Hub or Switch).


 The hub controls data flow between computers.

💡 Logically it looks like a star (not always physically).

✅ Advantages:

 If one cable breaks → only one computer is affected.


 Easy to manage and expand.

❌ Disadvantages:

 If hub fails, the whole network stops.

🔁 2. RING Topology

 Computers are connected in a closed loop.


 Each computer passes data to the next one in a circle.

✅ Advantage:

 Easy to coordinate access (data moves one direction).

❌ Disadvantage:

 If one cable breaks, entire network stops (loop breaks).

📡 3. BUS Topology

 All computers share one long cable (the bus).


 Any computer can send data, but only one at a time.
✅ Advantage:

 Cheaper (needs fewer cables than star).

❌ Disadvantage:

 If the main cable breaks, the whole network stops.


 Needs coordination (to avoid collisions).

✅ Summary Table:

Topology Shape Advantage Disadvantage


Star Central hub Only 1 PC affected if wire cut Hub failure breaks all
Ring Closed loop Easy coordination Whole network fails if cable cut
Bus Single line Few wires, low cost Entire network fails if cable cut

⚙️4. WHY MULTIPLE TOPOLOGIES EXIST?


Because no single topology is perfect — each has trade-offs:

 Star: Reliable (fault isolation easy) but needs more cables.


 Ring: Organized but fails completely if broken.
 Bus: Cheap but not reliable for large networks.

⚡ 5. EXAMPLE BUS NETWORK: ETHERNET


🔹 History:

 Invented at Xerox PARC in 1970s.


 Standardized by Xerox, Intel, and Digital → called DIX Standard.
 Later managed by IEEE 802.3 standard.

🔹 Structure:

 Uses Bus Topology.


 Single coaxial cable shared by all computers.
 Each cable section = segment.

💡 Limits:

 Max cable length = 500 meters.


 Minimum gap between computers = 3 meters.
🔹 Ethernet Speeds:

Version Speed
Original 3 Mbps
Standard Ethernet 10 Mbps
Fast Ethernet 100 Mbps
Gigabit Ethernet 1000 Mbps (1 Gbps)

🔹 Encoding Used:

Manchester Encoding

 Data is represented by voltage changes.


 A transition (change) in signal encodes data bits (e.g., 1 or 0).

Example:

 Change from +V to 0 = represents one bit


 Change from 0 to +V = represents another bit

👉 This helps synchronize sender and receiver easily.

🧾 QUICK REVISION SUMMARY (for exam)


Concept Definition / Key Point
LAN Local network to share data/resources
Origin 1960s–70s; shared medium to reduce connections
Locality of Reference Predicts which computers communicate more
Spatial Locality Nearby computers communicate often
Temporal Locality Same computers communicate repeatedly
Topologies Star, Ring, Bus
Star Topology Central hub; only one PC fails if cable cut
Ring Topology Closed loop; whole network fails if one break
Bus Topology One long cable; cheap but fails on break
Ethernet Example of Bus topology
Ethernet Standard IEEE 802.3
Max Cable Length 500 m
Min Distance Between PCs 3 m
Speeds 3 Mbps → 10 Mbps → 100 Mbps → 1 Gbps
Encoding Manchester Encoding
🧩 EXAM-TYPE SHORT QUESTIONS & ANSWERS
Q1: Why were LANs developed?
👉 To reduce the number of connections by using a shared medium.

Q2: What does “Locality of Reference” mean?


👉 It predicts which computers will communicate frequently.

Q3: Difference between Spatial and Temporal Locality?


👉 Spatial = nearby computers; Temporal = same computers repeatedly.

Q4: Name 3 LAN topologies.


👉 Star, Ring, Bus.

Q5: In Star topology, what happens if one cable breaks?


👉 Only that computer is affected.

Q6: In Ring topology, what happens if cable is cut?


👉 Entire network stops working.

Q7: What is Ethernet?


👉 A LAN technology using bus topology, standardized by IEEE 802.3.

Q8: What encoding is used in Ethernet?


👉 Manchester Encoding.

Q9: What is the maximum Ethernet segment length?


👉 500 meters.

Q10: What was original and fast Ethernet speed?


👉 Original: 3 Mbps, Fast: 100 Mbps.
🧠 LECTURE 8

🌐 1. WHY CSMA IS NEEDED


In Ethernet, many computers share one common cable to send data.
There’s no central controller — so computers must coordinate themselves to avoid chaos.

👉 That coordination method is called CSMA (Carrier Sense Multiple Access).

⚙️2. HOW CSMA WORKS


🔹 Step-by-step:

1. Each computer listens to the cable (this is called “Carrier Sense”).


2. If the cable is idle, the computer starts transmitting.
3. If the cable is busy, it waits until it becomes free.

💥 3. COLLISION
If two computers send data at the same time, their signals interfere —
this is called a collision.

 Collision doesn’t damage hardware,


but the data gets mixed up (garbled) — both frames are lost.

⚡ 4. COLLISION DETECTION (CD)


Ethernet uses CSMA/CD → “Carrier Sense Multiple Access with Collision Detection”.

🔹 How it works:

 Ethernet interface monitors the outgoing signal.


 If it notices a garbled signal, it means collision happened.
 When collision is detected:
o All computers stop sending immediately.
o A special jamming signal is sent to notify everyone about the collision.

🔄 5. RECOVERY FROM COLLISION


After a collision:

1. Each computer waits before sending again.


2. But if both wait the same time, collision may repeat — so they wait for a random delay.
3. The computer with the shorter delay transmits first.
4. This helps avoid repeated collisions.

📈 6. EXPONENTIAL BACKOFF
If collisions happen repeatedly (especially on busy networks):

 Computers double their waiting time after every new collision.

👉 This is called Exponential Backoff


and it reduces the chance of repeated collisions.

📡 7. WIRELESS NETWORKS (IEEE 802.11) &


CSMA/CA
🔹 Problem:

In wireless LANs, computers use radio waves, not cables.

 Not all computers can “hear” each other (due to distance, walls, weak signals).
 So they can’t detect collisions like wired LANs.

👉 That’s why wireless uses CSMA/CA (Collision Avoidance) instead of CSMA/CD.

🛰️8. HOW CSMA/CA WORKS


🔹 Step-by-step:

1. The sender sends a short request message (RTS) to the receiver.


2. Receiver replies with a short confirmation (CTS).
3. CTS is broadcasted to everyone — so all others know the line is reserved.
4. The sender transmits data safely.

🔹 What if two senders send RTS at the same time?

 Their signals collide at the receiver.


 The receiver receives nothing valid → no CTS sent.
 Both senders wait random times and retry.
📶 9. BLUETOOTH & LOCAL TALK
🔹 Bluetooth:

 Works over short distances.


 Uses radio waves and shared medium.
 Works similar to CSMA/CA.

🔹 LocalTalk (by Apple):

 Uses Bus topology.


 Built into Macintosh computers.
 Speed: 230.4 Kbps (very slow).
 Cheap and easy to install.
 Also uses CSMA/CA for coordination.

🔁 10. TOKEN RING NETWORK


🔹 Concept:

Instead of CSMA, Ring networks use a token for coordination.

 A token is a small control frame that gives permission to send.


 Only the computer holding the token can transmit.
 After sending, it passes the token to the next computer.

👉 Ensures no collisions because only one token exists.

🔹 Token Features:

 Token is short and unique, cannot appear in data.


 Hardware regenerates token if lost.
 If no one wants to send, token keeps circulating.
 If all computers want to send → works as Round Robin (one by one).

🔹 IBM TOKEN RING:

 Developed by IBM.
 Speed: 4 Mbps (old) → 16 Mbps (newer).
 Uses special cables for ring connection.
💡 11. FDDI (Fiber Distributed Data Interface)
🔹 Features:

 Uses fiber optic cable (light signals).


 Speed: 100 Mbps.
 Has two rings (dual rings):
o One main ring (primary)
o One backup ring (secondary)

🔹 Reliability:

If one ring or station fails, the system automatically loops back


and reroutes data through the second ring.

✅ This makes FDDI highly reliable and self-healing.

🌟 12. ATM (Asynchronous Transfer Mode)


🔹 Topology: Star Network

 Uses electronic switches (hubs) at the center.


 Computers connect to the hub using fiber optics.

🔹 How it works:
Feature Description
 Each computer has a point-to-point connection to the hub. Speed Over 100 Mbps
 Hub forwards data directly to the destination.
Medium Fiber optics
 Fast and efficient (like dedicated paths).
Connection Two fibers per link (send + receive)
🔹 Features: Structure Star network (hub/switch in center)

🧾 QUICK REVISION SUMMARY


Concept Key Point
CSMA Method to coordinate transmission in Ethernet (listen before send)
Collision When two signals overlap
CSMA/CD Detects collisions, stops transmission, and retries
Exponential Backoff Doubles delay after each collision
CSMA/CA Used in wireless; avoids collisions using RTS/CTS
LocalTalk Apple’s LAN using Bus & CSMA/CA (230.4 Kbps)
Concept Key Point
Token Ring Uses a token to permit transmission; one at a time
IBM Token Ring 4–16 Mbps, reliable
FDDI Dual-ring fiber network, 100 Mbps, self-repairing
ATM Star network using switches & fiber optics (100+ Mbps)

🧩 EXAM-TYPE SHORT Q/A


Q1: What does CSMA stand for?
👉 Carrier Sense Multiple Access.

Q2: What is collision?


👉 When two computers transmit simultaneously, causing data interference.

Q3: What is CSMA/CD?


👉 Ethernet technique for detecting and handling collisions.

Q4: What is Exponential Backoff?


👉 Increasing delay after each collision to reduce future collisions.

Q5: Why wireless LANs use CSMA/CA instead of CSMA/CD?


👉 Because not all devices can hear each other, so collisions can’t be detected.

Q6: What is Token Ring?


👉 Ring network where a token is passed to control who can transmit.

Q7: Speed of IBM Token Ring?


👉 4 Mbps to 16 Mbps.

Q8: What is FDDI and its speed?


👉 Fiber Distributed Data Interface; 100 Mbps using dual rings.

Q9: What happens if FDDI ring breaks?


👉 System loops back data through the backup ring (auto repair).

Q10: What topology does ATM use?


👉 Star topology using switches.

Q11: What is the data rate of LocalTalk?


👉 230.4 Kbps.
Lecture 9

🌟 HARDWARE ADDRESSING (Ultra-Simple


Explanation)
Imagine a LAN (Local Area Network) as a classroom where everyone can hear any message shouted out.
But what if you want to whisper to only one friend?
You need a name so the right person listens.

That name in computer networks = Hardware Address.

✅ 1. Why do we need hardware addressing?


When a computer sends data on a LAN, all computers physically receive it, but:

 We only want one specific computer to read the message.


 To choose the correct computer, the sender puts a hardware (physical) address inside the frame.

💡 Hardware address = ID of the computer’s network card.

✅ 2. How does a LAN interface work?


The LAN interface (Network card) is like a postman inside the computer.

It does many tasks automatically:

For sending:

 Adds destination hardware address


 Adds sender hardware address
 Adds error-checking code (to detect mistakes)
 Uses DMA to copy data fast from memory
 Follows LAN rules (e.g., CSMA/CD in Ethernet)

For receiving:

 Reads the destination address


 If it matches its own → accepts the frame
 If not → ignores the frame completely
 Checks for errors
 Uses DMA to place data in memory

This filtering ensures only correct computers accept the correct frames.

✅ 3. Format of hardware address


 Numeric value
 Size depends on LAN type
 Usually 1 to 6 bytes
 Most common today: 6-byte MAC address

Example:
A4-F3-C1-90-11-2B

✅ 4. How hardware addresses are assigned?


Every device must have a unique address.
There are 3 types:

🔹 (1) Static Addressing

 Given by manufacturer
 Cannot be changed
 Always unique
 Example: MAC address of Ethernet card

🔹 (2) Configurable Addressing

 User can set the address


 Using switches, jumpers, or software
 Admins must avoid duplicates manually

🔹 (3) Dynamic Addressing

 Address picked automatically each time device starts


 Must have a system to avoid duplicate addresses
 Rare in modern LANs
✅ 5. Broadcasting
Sometimes we want to send message to all computers.

For example:

 Announcements
 ARP requests
 Network discovery

To do this:

 Sender uses a special broadcast address


 All stations accept the frame

Example broadcast address (Ethernet):


FF-FF-FF-FF-FF-FF

🎯 Summary in 10 Seconds
 LAN sends frames to everyone, but only the target accepts it using hardware address.
 Hardware address = unique ID of network card.
 LAN interface handles sending/receiving, error checking, and filtering.
 Addresses can be static, configurable, or dynamic.
 Broadcast address sends to all devices on LAN.

🎓 Possible Exam Questions & Answers (Ready-


Made)
Q1. What is hardware addressing?

A method of identifying each device on a LAN using a unique physical address.

Q2. Why is destination hardware address needed?

To ensure only the intended computer accepts the frame and others ignore it.

Q3. What does a LAN interface do?

Adds addresses, error codes, follows access rules, checks errors, and filters frames.
Q4. Explain static, configurable and dynamic hardware addressing.

 Static: Manufacturer-assigned, permanent


 Configurable: User-set, must avoid duplicates
 Dynamic: Auto-assigned each time

Q5. What is broadcasting?

Sending a frame to all devices using a special broadcast address.

🌟 Lecture 10 — FRAME TYPE IDENTIFICATION


(Ultra-Easy Explanation)
LAN frames reach many computers, so the receiver must know:

1. Should I accept this frame or ignore it? (Addressing)


2. What kind of data is inside this frame? (Frame type)

This chapter focuses on identifying frame types, multicasting, and how frames are structured.

⭐ 1. Problems with Broadcast


Broadcast = sending a frame to every computer.

Problems:

❌ Problem 1: Wastes CPU time

Every computer receives broadcast frames →


Each one must check them →
This interrupts the CPU unnecessarily.
❌ Problem 2: If two computers communicate using broadcast

All other computers waste time discarding frames.

So broadcast is expensive when used too much.

⭐ 2. Solution → Multicasting
Multicasting = broadcast, but only to a specific group, not everyone.

Example:
Only computers running an audio chat application should receive audio frames.

How it works:

The network interface (NIC) is programmed to accept:

1. Multicast frames (for a specific group)


2. Broadcast frames
3. Frames addressed to itself

Other computers ignore these multicast frames → no CPU waste.

⭐ 3. Multicast Addressing
A multicast address is a special address that identifies a group of computers.

Example:
Audio application → NICs are programmed to accept the audio multicast address.

Computers not in the group will not accept these frames.

⭐ 4. Identifying Packet Contents


After receiving a frame, the computer must know:

👉 “What type of data is inside?”


(Email? IP packet? ARP? Audio?)

There are two ways to identify frame type:


🔹 A. Explicit Frame Type
 A field inside the frame directly says the type.
 Example: Ethernet Type field
o 0800 → IP
o 0806 → ARP

Receiver reads the field → knows exactly what data is inside.

🔹 B. Implicit Frame Type


 No type field is present.
 Receiver must infer the type from the first few bytes of data.
 Sender and receiver must agree on the encoding format.

This is less flexible.

⭐ 5. Headers and Frame Format


Every LAN frame has:

1. Header
o Destination address
o Source address
o Type field
2. Payload (data)
3. CRC
o Error-checking code

⭐ 6. Ethernet Frame Format (Simple View)


Field Purpose
Preamble Helps receiver synchronize
Destination Address Identify receiver
Source Address Identify sender
Type Field What type of data is inside
Data / Payload Actual message
CRC Detect errors

💡 In diagrams, preamble & CRC often not shown.


⭐ 7. Frames Without Type Fields
Some older LANs have no type field.

How do they identify data?

Two methods:

✔ Method 1:

All devices agree on one type of data only → not flexible.

✔ Method 2:

Use first few bytes of the data area to encode the type.

This requires a standard format that everyone must follow.

⭐ 8. Encoding the Data Type


Instead of a type field, the first few bytes inside data specify the type.

Requires universal agreement → defined in standards.

⭐ 9. IEEE 802.2 LLC + SNAP


Used in many LANs including Ethernet.

Contains:

 LLC header
 SNAP header
 OUI (Organizationally Unique Identifier) → identifies protocol owner
 Type field → same as Ethernet type field

This makes frame identification standardized & flexible.

⭐ 10. Unknown Frame Types


If a computer receives a frame with:

 Unknown type
 Protocol not installed

→ It simply discards the frame.

⭐ 11. Network Analyzers (Sniffers)


Used to monitor, analyze, and debug networks.

Examples: Wireshark, tcpdump.

They can show:

 Frame size distribution


 Collision rate
 Capacity utilization
 Token passing speed (in token ring)

How they work:

Network interface enters promiscuous mode:

 Accepts all frames, not just those addressed to it.


 Shows them to user for analysis.
 Does NOT respond to them.

Network analyzers can filter frames:

 Specific address
 Specific type
 Specific size
 Any field value

🎯 Lecture 10 Summary in 10 Seconds


 Broadcast is expensive → sends to all computers.
 Multicast sends only to a selected group.
 Frame type tells receiver what kind of data is inside.
 Ethernet uses a Type field for this.
 Some LANs put type info in first bytes of data.
 LLC/SNAP adds standardized type encoding.
 Unknown types → discarded.
 Network analyzers capture all frames in promiscuous mode.
🎓 Exam-Ready Questions + Answers
Q1. What is multicasting?

Sending frames to a specific group of computers using multicast addresses.

Q2. Why is broadcasting inefficient?

Because every computer must check the frame, wasting CPU time.

Q3. What is the difference between explicit and implicit frame types?

 Explicit: Frame contains a type field.


 Implicit: Type must be inferred from data area.

Q4. Explain Ethernet frame fields.

Header (addresses + type), data, CRC.

Q5. What is SNAP/LLC?

A standardized method to include type information when type field is absent.

Q6. What is promiscuous mode?

NIC accepts all frames, used in network analyzers.

Lecture 11

🌟 Lecture 11 — INTERFACE HARDWARE (Super


Easy Explanation)
LANs (like Ethernet) transmit data very fast.
But CPUs are slower than LAN speeds, so they cannot talk to the network directly.

So computers need special hardware to connect to a network.

⭐ 1. Why do we need Network Interface Hardware?


 LAN speeds are high (10 Mbps, 100 Mbps, 1 Gbps)
 CPU can’t keep up with these speeds
 Therefore, computers use a Network Interface Card (NIC)

💡 NIC = special hardware that handles network communication.

⭐ 2. What is a NIC (Network Interface Card)?


NIC is a card installed inside computer (like in PCI slot).

It has:

 Connectors for the LAN cable


 Hardware to send & receive data
 Hardware to format frames
 Sometimes its own microprocessor

NIC handles network tasks without burdening CPU.

⭐ 3. NIC as an I/O Device


To the CPU, NIC looks like any other input/output device.

How CPU and NIC work together:

1. CPU gives instructions → “Send this data”


2. NIC handles transmission
3. NIC receives incoming data
4. NIC interrupts CPU when data arrives

So CPU does not constantly check network; NIC handles everything.


⭐ 4. NIC is Network-Specific
A NIC is designed for a specific LAN technology.

Examples:

NIC Type Works With


Ethernet NIC Ethernet cable (10Base-T, 100Base-T)
Token Ring NIC Token Ring LAN
ATM NIC ATM Network
FDDI NIC FDDI Fiber Network

❌ Ethernet NIC cannot work on Token Ring


❌ ATM NIC cannot work on FDDI

But…

Some Ethernet NICs support:

 10 Mbps and 100 Mbps both


 Thick, thin, and 10Base-T Ethernet

⭐ 5. Connection Between NIC and Physical Network


There are two ways NIC connects to the network:

1. NIC directly connects to cable

Example: Thin Ethernet or 10Base-T

2. NIC uses an external transceiver

Example: Thick Ethernet

⭐ 6. Thick Ethernet Wiring (Old style)


 Uses thick coax cable
 NIC does NOT send analog signals directly
 NIC sends digital signals through AUI cable
 Transceiver converts digital → analog signals for the coax cable

Components:
 NIC → AUI cable → Transceiver → Thick Coax Cable
 Terminators at both ends to prevent signal reflection

This setup was strong but:

 Expensive
 Hard to install

⭐ 7. Connection Multiplexing
Problem: Transceivers are expensive.

Solution: Connection Multiplexer

 Many computers connect to one transceiver


 Each computer has its own AUI cable to multiplexer
 Multiplexer connects to Ethernet cable

Good for:

 Labs
 Offices with many computers

⭐ 8. Thin Ethernet Wiring (Simpler and Cheaper)


Thin Ethernet uses thin coax cable.

Improvements:

 Transceiver is built inside NIC


 NIC connects directly to the cable using BNC connector
 No extra external transceiver

Cable Layout:

Computers are connected in a line using:

 BNC connector
 T-connector

Problem:

 If one cable breaks, entire network goes down


🎯 Lecture 11 Summary in 10 Seconds
 LANs are fast → CPU can’t handle raw LAN data
 NIC used to connect computer to LAN
 NIC can have its own microprocessor
 NICs are technology-specific (Ethernet, ATM, Token Ring)
 Thick Ethernet uses AUI cable + external transceiver
 Thin Ethernet uses built-in transceiver + BNC cable
 Multiplexer allows many computers to share one transceiver
 Thin Ethernet is cheaper but unreliable (one break → network down)

🎓 Exam-Ready Questions & Answers


Q1. Why is NIC needed?

Because CPU is too slow to process high-speed LAN data, so NIC handles network communication.

Q2. Why NICs are technology-specific?

Because each LAN technology uses different signaling, speed, and connector type.

Q3. Difference between Thick and Thin Ethernet?

Thick Ethernet Thin Ethernet


Uses thick coax Uses thin coax
Needs external transceiver Transceiver built into NIC
Uses AUI cable Uses BNC connector
More reliable Cheaper but more fragile

Q4. What is connection multiplexing?

Sharing one transceiver among many computers using a multiplexer.

Q5. How does NIC communicate with CPU?

CPU sends commands; NIC processes them and interrupts CPU when data arrives.
🌟 Lecture 12 — LAN Wiring & Physical Topology
(Ultra-Easy Explanation)
This lecture explains how Ethernet is wired, why different wiring schemes exist, and the difference between
logical vs physical topology.

⭐ 1. What is 10Base-T? (Most Important)


10Base-T is:

 10 Mbps
 Baseband signaling
 Twisted Pair (TP) cable

It replaces:

 Thick/thin coax cables → ❌


 AUI cables → ❌
 Uses twisted pair cable and hub

Why is it popular?
👉 Very cheap, simple, easy to install → Most used Ethernet wiring today

⭐ 2. What is a Hub?
Think of the hub as a central connection box.

 All computers connect to a hub using twisted pair cables


 Internally the hub behaves like a small Ethernet segment (like a mini-bus)
 Extends connections (multiplexing concept)

Nickname: Ethernet-in-a-box

⭐ 3. Protocol Software & Wiring


No matter which wiring you use (thick, thin, twisted pair), Ethernet always uses:

 Same frame format


 Same CSMA/CD
 Same protocol rules

Software DOES NOT care about wiring differences.


NIC provides multiple connectors so you can choose the wiring.

⭐ 4. Comparison of Wiring Schemes (VERY


IMPORTANT)
✔ Thick Ethernet (Expensive, Old)

 Uses AUI cable + external transceiver


 Very reliable
 Disconnecting one computer does not stop the network
 Hard to install

✔ Thin Ethernet (Cheaper)

 Uses thin coax cable


 Direct connection (BNC + T-connector)
 Cheapest before twisted pair
 One loose connection breaks entire network → major drawback

✔ Twisted Pair (10Base-T) (Most Popular)

 Uses twisted pair cable + hub


 Cheapest
 Very easy to manage
 One cable cut affects only one computer, not entire network

👉 This is why 10Base-T is the winner!

⭐ 5. Logical vs Physical Topology (Most Exam


Questions!)
❗ Physical Topology

How wires are physically arranged.

❗ Logical Topology

How data actually flows according to the network protocol.


Examples:

Technology Physical Topology Logical Topology


10Base-T Ethernet Star Bus
Token Ring Star Ring

This is known as the Topology Paradox:

👉 It looks like a star, but works like a bus (10Base-T).


👉 Or looks like a star, works like a ring (Token Ring).

⭐ 6. NICs Support Multiple Wiring Schemes


Modern NICs can support:

 Thick Ethernet
 Thin Ethernet
 Twisted Pair

All on the same NIC, using different ports.

⭐ 7. 10/100 NICs & Auto-Negotiation


Twisted pair Ethernet has:

 10Base-T → 10 Mbps
 100Base-T → 100 Mbps

100Base-T is backward compatible with 10Base-T.

When connected:
👉 NICs automatically decide the best common speed.

This process = Auto-negotiation

⭐ 8. Categories of Wires (CAT5, CAT6 etc.)


Choosing cable depends on:

 Data rate needed


 Distance
 EMI noise
 Future requirements
 Cost

Typical categories:

Cable Category Usage


CAT 3 10 Mbps
CAT 5 100 Mbps
CAT 5e / CAT 6 1 Gbps
CAT 7+ Higher speeds

⭐ 9. Wiring Schemes Used in Other Network


Technologies
Ethernet is not alone.

Other networks also use mixed wiring:

 LocalTalk → Uses hubs to simulate bus


 Token Ring → Uses hubs to simulate ring
 FDDI → Uses dual ring but different physical layouts

⭐ 10. Filtering of Frames (Network Analyzers)


Network analyzers (sniffers) can:

 Capture specific frames using filters


 Count frames
 Show frames of specific size or type
 Show frames from or to a specific computer
 Match any field in the frame

This helps in debugging and monitoring networks.

🎯 Lecture 12 Summary in 10 Seconds


 10Base-T (twisted pair) is cheapest and most popular
 Hubs form a physical star, but Ethernet works as a logical bus
 Thick Ethernet uses transceiver
 Thin Ethernet uses BNC cable, but one loose connection breaks everything
 Twisted pair is reliable & easy
 NICs support multiple wiring types
 Auto-negotiation decides speed in 10/100 NICs
 Different categories of cable support different speeds

🎓 Most Expected Exam Questions (With Answers)


Q1. Why is 10Base-T the most popular wiring scheme?

Because it is cheapest, easiest to install, supports hubs (central management), and a cable cut affects only one
computer.

Q2. Explain Logical vs Physical topology with examples.

 Logical: Data flow → Ethernet logically a bus, Token Ring logically a ring
 Physical: Wiring layout → Both use star wiring

Q3. Difference between thick, thin, and twisted pair Ethernet.

Thick Thin Twisted Pair


Thick coax Thin coax Twisted pair
External transceiver Built-in transceiver Hub-based
Reliable One break → network down Reliable
Expensive Cheaper Cheapest

Q4. What is auto-negotiation?

NICs choose the best speed (10 or 100 Mbps) automatically when connected.

Q5. What is a hub?

A central device that connects multiple Ethernet cables; forms a physical star but logical bus.
✅ Lecture 13 — Fiber Modems, Repeaters &
Bridges (SUPER EASY EXPLANATION)
LANs are designed for short distances (within a building). But companies often need to connect other floors
or even other buildings → so LAN must be extended beyond its normal limit.

⭐ 1. Why LAN Can't Go Very Far? (Distance


Limitation)
Signals weaken as they travel:

 Electrical signals (copper cable) = weaken quickly


 Light signals (fiber optic) = travel far with low delay

Also, network access methods like CSMA/CD (Ethernet) and Token Passing (Token Ring) require short
delays to work correctly.

👉 So LAN cable has a maximum length.

But we must extend LAN beyond this limit → So we use special hardware.

⭐ 2. LAN Extension Techniques


To extend LAN distance safely, we use extra hardware like:

✔ Fiber Modems

✔ Repeaters

✔ Bridges

These devices allow communication across long distances without breaking LAN rules.

⭐ 3. Fiber Optic Extension (Fiber Modems)


Used when distance is very large (several kilometers).

How it works:
 Fiber modem converts digital data → light pulses
 Sends through fiber optic cable
 Other fiber modem converts light → digital data

Why fiber works well?

 Very small delay


 Very high bandwidth
 Very long distance supported

👉 Used to connect two buildings far apart.

Easy example:
Head office ↔ Branch office several km away.

⭐ 4. Repeaters (For Copper Cable Extension)


Used when network uses electrical/copper cable.

What repeater does:

✔ Receives weak signal


✔ Amplifies (boosts) it
✔ Sends it to next segment

Repeater = Signal amplifier

Effect:

 1 repeater → doubles cable length


 2 repeaters → triples cable length

BUT…

❗Limit: Maximum 4 repeaters between any two stations (Ethernet rule)

Reason:
Each repeater adds delay, and too much delay breaks CSMA/CD.

⭐ 5. Disadvantages of Repeaters
Repeaters do NOT understand frames.

They blindly amplify:


 Good signals
 Bad signals
 Collisions
 Errors

So:

❌ If a collision happens in one segment → repeater sends the collision to all segments
❌ Noise spreads everywhere

This is why repeaters are not intelligent.

⭐ 6. Bridges (Smarter than Repeaters)


A bridge connects two LAN segments intelligently.

Bridge hardware:

 2 NICs
 CPU
 Memory
 ROM (program is fixed)

Bridge understands frame format:

✔ Checks if frame is valid


✔ Only forwards correct frames
❌ Drops collided or error frames

So it is better than repeater.

⭐ 7. Frame Filtering (Bridge's Main Job)


Bridge uses filtering to reduce traffic.

Rule:

If source and destination are in same segment → do NOT forward frame to other segment.

Only forward when:


✔ Frame is destined for other segment
✔ It is a broadcast or multicast frame

This reduces unnecessary network traffic.


⭐ 8. Self-Learning Bridge (Very Important for
Exams!)
Bridge maintains a list = Address Table
For each segment, it stores MAC addresses of attached computers.

How does it learn automatically?

When a frame arrives:

1. Bridge reads source MAC address


2. Adds it to the list of that segment
3. Builds the table automatically
→ No configuration required

This is why it is called Self-Learning Bridge.

🎯 SUPER FAST REVISION TABLE


Understand Sends
Device Boost Signal? Use Case
Frames? Errors?
Repeater ❌ No ✔ Yes ✔ Yes Extend copper LAN
Fiber ✔ Converts data
✔ Yes ❌ Long-distance optical LAN
Modem to light
❌ Drops Connect two LAN segments
Bridge ✔ Yes ❌ No
errors intelligently

🎓 Exam-Style One-Line Answers


✔ Why can't LAN be too long?

Because signals weaken and network delay increases, breaking CSMA/CD or token passing.

✔ What is a repeater?

A device that amplifies weak signals to extend LAN cable distance.

✔ Disadvantage of repeater?
It also amplifies errors and collisions.

✔ What is a bridge?

A device that connects two LAN segments and forwards only valid frames.

✔ What is frame filtering?

Bridge forwards frames only if needed; otherwise, it blocks them.

✔ What is a self-learning bridge?

A bridge that builds address tables automatically by reading source MAC addresses.

✔ Why use fiber modems?

To connect LANs over several kilometers using optical fiber.


⭐ Lecture 14 — Bridges (SUPER EASY & EXAM-
FOCUSED)

✅ 1. Startup vs Steady State of a Bridge


Startup State

 When the bridge starts, its address tables are empty.


 It doesn’t know where computers are.
 So it forwards every frame to both segments (flooding).

Steady State

 After receiving at least one frame from each computer, the bridge learns all MAC addresses.
 Now it knows:
o which computer is on which segment
 So it forwards frames only when needed.

👉 Startup = no knowledge
👉 Steady state = full knowledge

⭐ 2. Planning a Bridge Network (Why Use Bridges?)


Bridges divide a LAN into segments.

Benefits:

✔ Each segment carries its own traffic → less congestion


✔ Computers that communicate frequently can be placed on the same segment
✔ Frames on one segment do not disturb the other

👉 Bridges improve performance by reducing unnecessary traffic

⭐ 3. Bridging Between Buildings


When two buildings are separated, we can connect their LANs using:

 1 bridge
 2 fiber modems
 1 optical fiber cable

Advantages:

✔ Cost

One fiber connection can serve many computers.

✔ Maintenance

No need to change inter-building cable when adding/removing computers.

✔ Performance

Traffic in one building stays inside that building


→ Does not affect the other building.

⭐ 4. Connecting Buildings Over LONG Distances


Sometimes fiber cannot be used:

 Land does not belong to you


 Distance is too large
 Permission not allowed

So we use:

1. Leased Serial Line (Medium Distance)

Telco provides a dedicated line.

2. Leased Satellite Channel (Very Long Distance)

Can span any distance on Earth.


Example: Pakistan ↔ USA.

Problem:

Satellite links have low bandwidth → frames arrive faster than they can be sent.

Solution:

Bridge uses buffering:

 Stores frames in memory until satellite link is free.


 If too many frames arrive → memory overflow possible.
⭐ 5. Cycles in Bridge Networks (Major Concept)
You can connect many bridges together to connect many segments.

But if bridges form a cycle, then:

BIG PROBLEM: Broadcast Storm

A broadcast frame will loop forever around the cycle.

⚠ Result:

 Infinite copies
 Network collapse
 Huge congestion
 Computers receive the same frame again and again

⭐ 6. Distributed Spanning Tree (DST)


To solve the broadcast looping problem.

What does DST do?

✔ All bridges communicate with each other


✔ They automatically detect cycles
✔ They disable some bridge ports to break the cycle
✔ A tree-like structure is formed without loops
✔ Only one path remains active between any two segments

👉 This ensures no broadcast loops.

⭐ SUPER EASY SUMMARY TABLE


Concept Meaning
Startup state Bridge has empty address table; floods traffic
Steady state Bridge table complete; forwards only necessary frames
Bridge usage Reduces traffic; improves performance
Fiber connection Connects far buildings with high speed
Leased line Medium-distance connection
Satellite link Very long distance, low bandwidth
Bridge cycle problem Broadcast frames loop infinitely
Concept Meaning
DST Algorithm that stops looping by disabling some bridge paths

🎯 Exam-Style One-Line Answers


✔ What happens in startup state?

Bridge forwards all frames because address tables are empty.

✔ What is steady state?

Bridge has learned all MAC addresses and forwards frames intelligently.

✔ Why use bridges in LAN design?

To reduce traffic and improve performance by segmenting the LAN.

✔ What is bridging between buildings?

Connecting two LANs in different buildings using fiber modem + optical fiber.

✔ What is the problem with satellite links?

Low bandwidth → frames need buffering → memory may overflow.

✔ What is the bridge cycle problem?

Broadcast frames circulate endlessly causing network failure.

✔ What is Distributed Spanning Tree?

An algorithm bridges use to remove cycles by disabling some ports.


⭐ Lecture 15

🔵 PART 1 — SWITCHES (LAN TECHNOLOGY)

✅ 1. What is Switching?
 A switch is a device used inside a LAN.
 It sends frames between computers individually, not to everyone.

👉 Think of a switch like a postman who delivers each letter to the correct house.

✅ 2. Hub vs Switch (MOST IMPORTANT)


Feature Hub Switch
Type Shared device Intelligent device
Who receives frames? Everyone Only the correct computer
Simultaneous communication ❌ Only one pair at a time ✔ Many pairs at the same time
Efficiency Low High

⭐ Key Idea:

A hub = shared bus


A switch = many small LANs connected internally (like mini-bridges)

✅ 3. Combining Switches and Hubs


To reduce cost:

 Computers connect to hubs


 Hubs connect to a switch

Switch handles multiple hubs efficiently like multiple LAN segments.


✅ 4. Bridges, Switches, Hubs for Other Networks
Not only Ethernet—these devices also exist for:

 Token Ring
 FDDI

Concept is the same; only the technology changes.

🔵 PART 2 — WAN (Wide Area Network)


LAN → building
MAN → city
WAN → country/continent

LANs cannot be extended forever (even with satellite, fiber, bridges).


So for very large networks, we need WAN technologies.

⭐ WHY LAN CANNOT BE EXTENDED


FOREVER?
 Distance limits
 Too many computers
 LAN protocols like CSMA/CD fail on long distances

👉 So WAN is needed for long-distance communication.

🔵 PART 3 — PACKET SWITCHES (Core of WANs)

✅ 1. What is a Packet Switch?


A packet switch = a small computer with:

 Processor
 Memory (for storing packets)
 Network interfaces

It receives a packet, stores it, and forwards it to the next point.


🌟 2. WAN uses PACKET SWITCHES
LAN uses shared medium
WAN uses packet switching

⭐ Packet Switching = Store & Forward


How it works:

1. Packet arrives at switch


2. Switch stores it in memory
3. When outgoing line is free → switch forwards it

Each connection has its own queue of packets.

👉 This allows WAN to work smoothly even if lines are busy.

🔵 PART 4 — ADDRESSING IN WAN


WAN packets have:

 Source address
 Destination address

WAN Address Format:

Usually hierarchical:

Example:

Switch number + Port number

This makes routing easier.

🔵 PART 5 — NEXT HOP FORWARDING


(Important Exam Point)
Switch must decide where to send the packet next.
Two cases:

✔ Case 1: Destination computer is directly connected

Switch sends packet to the computer port.

✔ Case 2: Destination is somewhere else

Switch sends packet to next hop switch.

👉 The decision is made by reading the destination address in the packet.

⭐ SUPER SUMMARY (Learn This and You Ace the


Paper)
Concept Meaning
Switch Sends frames intelligently to correct computer
Hub Broadcasts to all computers
Switch vs Hub Switch = fast, multiple simultaneous connections
WAN Long distance network (country, continent)
Packet Switch Stores and forwards packets
Store & Forward Packet saved in memory before sending
Hierarchical Address Switch ID + Port ID
Next Hop Packet forwarded to next switch until it reaches destination

🎯 EXAM-STYLE ONE LINE ANSWERS


✔ What is switching?

Communication using a device that forwards frames only to the intended computer.

✔ Why switches are better than hubs?

They allow multiple simultaneous communications.

✔ Why do we need WAN?

LAN cannot support very long distances or very large number of computers.

✔ What is a packet switch?

A small computer that forwards packets between WAN nodes.


✔ What is store-and-forward?

Switch stores packet in memory and forwards it when the line is free.

✔ What is hierarchical addressing?

WAN address structure: switch identifier + port identifier.

✔ What is next-hop forwarding?

Selecting the next switch to forward packet toward destination.

🌟 Lecture 16 — ROUTING (Easy & Fast


Explanation)
Routing = The process of sending packets from source → destination using routing tables.
✅ 1. SOURCE INDEPENDENCE
Meaning:
The next hop (next switch) for a packet does NOT depend on where the packet came from.

👉 The router only cares about where the packet is going, not about its source.

Benefits:

1. Fast routing — router checks only destination, not full history.


2. Less information needed — routing tables become small.
3. Robust network — if network topology changes, no need to inform all routers.
4. Efficient handling of packets — simple and independent.

Example:
If Destination = D, always go to same next hop, whether packet came from A, B, or C.

✅ 2. HIERARCHICAL ADDRESSING &


ROUTING
Routing:
Forwarding packets using routing tables.

Important point:
Many destinations have same next hop.
Example:

Destination Next Hop


PC1 Switch 3
PC2 Switch 3
PC3 Switch 3

👉 All are on the same switch, so the router forwards packets to the same next hop.

Routing table can be collapsed/shortened using ranges or defaults.

✅ 3. ROUTING IN A WAN
WAN = Wide Area Network
More switches + more links → more routing needed.
There are two types of switches:

🔹 Interior Switch

 No computers attached.
 Used only for forwarding packets.
 Example: core router in the middle of the network.

🔹 Exterior Switch

 Has computers attached.


 Connects end devices (PCs, servers) to WAN.

👉 Both need routing tables.

✅ 4. TWO REQUIREMENTS OF ROUTING


TABLES
Every routing table in a WAN must provide:

1️⃣ Universal Routing

It must have a next hop for every possible destination in the network.

2️⃣ Optimal Routes

The next hop must be on the shortest path (minimum cost/distance).

✅ 5. MODELING A WAN WITH A GRAPH


We use a graph to represent WAN:

 Nodes = switches
 Edges = direct connections between switches

Attached computers are ignored in graph modeling because switches forward packets, not end devices.

This helps to run graph algorithms like:

 Dijkstra
 BFS
to compute shortest paths.
✅ 6. ROUTE COMPUTATION USING GRAPH
A routing table is basically derived from the graph:

For each destination:

 choose the shortest path


 pick the next hop (nearest switch)

Graph algorithms compute:

 Shortest path tree


 Next hop for each destination

✅ 7. REDUNDANT ROUTING INFORMATION


Sometimes routing tables have duplicate/extra information.

Example:
If a switch has only ONE outgoing link, then all traffic will go through that link anyway.

So multiple entries in the table pointing to the same next hop are unnecessary.

✅ 8. DEFAULT ROUTES
Default route = A general "catch-all" rule.

If a destination is not found in routing table, use the default next hop.

Example:

 For unknown destinations → send to Switch 2.

This helps:

 reduce table size


 simplify routing
 remove redundant entries

Router logic:

If destination exists in table → use specific next hop


Else → use default route
🎯 SUPER SHORT SUMMARY (Exam Cracker)
Concept One-Line Explanation
Source Independence Routing depends only on destination, not source
Hierarchical Routing Many destinations share same next hop
Interior Switch No computers attached
Exterior Switch Computers attached
Universal Routing Next hop for every destination
Optimal Route Must be shortest path
Graph Model Switch = node, link = edge
Redundant Info Extra entries not needed
Default Route Used when no specific entry exists

🎓 You Can Now Answer Any Question Like:


✔ What is source independence?
✔ What is hierarchical routing?
✔ Types of switches in WAN?
✔ What is universal routing?
✔ What is optimal route?
✔ What is default route?
✔ Why use a graph?
✔ Why is redundant info a problem?

✅ 7 Exam-Style One-Line Answers


1. What is routing?

Routing is the process of selecting a path to forward packets to ward their destination.

2. What is source independence?

Source independence means the next hop is chosen based only on the destination, not the source.

3. What is hierarchical routing?

Hierarchical routing groups destinations so multiple addresses share the same next hop.

4. What is an interior switch?


An interior switch is a packet switch that has no computers attached.

5. What is an exterior switch?

An exterior switch is a packet switch that has computers attached to it.

6. What is an optimal route?

An optimal route is the shortest-path route between a source and destination.

7. What is a default route?

A default route is a routing entry used when no specific route for the destination exists.

🌟 LECTURE 17 — ROUTING ALGORITHMS


(Super Simple Notes)

✅ 1. BUILDING ROUTING TABLES


Routers can build routing tables in TWO ways:

A. Manual Entry

 Admin enters routes manually.


 Used in small/static networks.

B. Software (Automatic)

 Routing software automatically discovers routes.

⭐ Two Routing Types for Table Computation


1. Static Routing

 Routes set once at boot time.


 Simple, low overhead, but inflexible.
 Does NOT update automatically if a link fails.

2. Dynamic Routing

 Routes update automatically.


 Can detect network failures and choose new paths.
 Used in large/real networks.

✅ 2. COMPUTING SHORTEST PATH (Dijkstra


Algorithm)
To fill routing tables, routers:

1. Convert network into a graph (nodes = switches, edges = links)


2. Apply Dijkstra’s Algorithm
3. Find shortest path from one node to all others
4. Extract next hop from that path
5. Insert next hop into routing table

⭐ 3. WEIGHTED GRAPH
 Each link can have a weight (cost).
 Weight may be:
✔ delay
✔ money cost
✔ hop count (1)

👉 Shortest path = path with smallest total weight, NOT necessarily the path with fewest hops.

⭐ 4. DISTANCE MATRIX
 A matrix storing the cost between nodes.
 Helps routers compute shortest paths.
 Cost may be time, dollars, or hop counts.

💡 Key Point:
Shortest path ≠ fewest hops.
Shortest path = minimum total weight.

✅ 5. DISTRIBUTED ROUTE COMPUTATION


Two main algorithms:

⭐ A. DISTANCE-VECTOR ROUTING (e.g., RIP)


How it works:

 Each router stores a vector/list of distances to all destinations.


 Sends this list to neighbors only.
 Updates its table based on neighbor information.
 Periodically broadcasts updates.

Features:

 Very simple.
 Router updates its table first.
 Automatically adjusts to link failures.
 Used in RIP.
⭐ VECTOR-DISTANCE ALGORITHM (Working)
 Router receives update message.
 For each entry:
o If new path is shorter, update routing table.
o Distance = neighbor distance + cost to neighbor.

⭐ B. LINK-STATE ROUTING (e.g., OSPF)


How it works:

 Each router sends link-state packets to ALL routers.


 Every router builds a complete map of the network.
 Then each router runs Dijkstra’s Algorithm itself.

Features:

 More complex than distance-vector.


 Each router computes routes independently.
 Used in OSPF.
 Very accurate and fast.

⭐ Comparison Summary
Feature Distance-Vector Link-State
Complexity Simple Complex
Updates Router updates its own table first Compute global topology first
Shares Distance only Full topology
Example RIP OSPF

🌐 6. EXAMPLE WAN TECHNOLOGIES


⭐ ARPANET

 First packet-switched network (1960s).


 Funded by US Defense (ARPA).
 Birthplace of internet technologies.

⭐ X.25

 Early connection-oriented network standard.


 Designed before modern computer networking.
 Used for terminal-to-mainframe connections.

⭐ Frame Relay

 Telecommunication service.
 Connection-based (need contract with Telco).
 Speeds: 56 kbps → 100 Mbps.

⭐ SMDS (Switched Multimegabit Data Service)

 Connectionless service.
 Any SMDS device can send data to any other.
 Speeds: 1.5 Mbps → 1000 Mbps.

⭐ ATM (Asynchronous Transfer Mode)

 Designed for voice, video, and data.


 Low jitter → consistent delivery.
 Uses fixed-size 53-byte cells:
o 48 bytes data
o 5 bytes header

🎯 SUPER-FAST EXAM REVISION


 Static routing → simple, no auto-updates.
 Dynamic routing → automatically finds new routes.
 Dijkstra → shortest path using weights.
 Distance-vector → neighbors share distance only; used in RIP.
 Link-state → full topology sharing + Dijkstra; used in OSPF.
 Weights ≠ hops; shortest path = lowest total cost.
 WAN examples: ARPANET, X.25, Frame Relay, SMDS, ATM.

7 One-Line Answers (Set-2)

1. What is a routing table?


A routing table is a data structure that stores destination networks and their next hops.

2. What is a next hop?


A next hop is the immediate router to which a packet is forwarded on its path.

3. What is flooding?
Flooding is a routing method where a packet is sent out through all outgoing links except the one it arrived on.
4. What is static routing?
Static routing uses manually configured fixed routes that do not change automatically.

5. What is dynamic routing?


Dynamic routing automatically updates routes using routing algorithms based on network changes.

6. What is distance vector routing?


Distance vector routing chooses paths based on distance metrics shared with neighboring routers.

7. What is link state routing?


Link state routing uses complete network information to compute shortest paths using algorithms like
Dijkstra’s.

Lecture 18 Made Super Easy (ATM & Connection-


Oriented Networking)
🔹 What is ATM?
ATM = Asynchronous Transfer Mode
It is one single technology designed by telephone companies to replace both:

 LANs
 WANs

✔ It can carry voice, video, and data all together


✔ It gives guaranteed service when needed
✔ It is fast, efficient, and works for long distances

🔹 Why ATM Was Needed?


Because:

 LANs were good for small areas but gave jitter (uneven delay)
 WANs were large but slow and complicated
 Voice/video need very consistent timing

ATM solves everything using:


👉 Small fixed-size cells
👉 Connection-oriented communication

🔹 What is Jitter?
Jitter = Change in packet delay time
Example:
If one packet arrives in 10 ms and next in 18 ms → jitter = 8 ms

Voice and video become:

 Noisy
 Shaky
 Choppy

So jitter must be minimized. ATM reduces jitter.

🔹 Why Not Use Large Packets for Voice?


Large packets = more delay
Voice creates tiny samples every 125 microseconds.

If packet is too big:

 It takes LONG to fill the packet


 Voice becomes delayed
 Echo cancellation becomes harder

So ATM uses small packets = better for voice & video.

🔹 ATM Cells (THE MOST IMPORTANT POINT)


ATM uses small fixed-sized packets called cells.

Each cell = 53 bytes

 5 bytes header
 48 bytes data
Why fixed and small?

✔ Fast processing
✔ Low jitter
✔ Suitable for real-time voice/video
✔ Easy for hardware switching

Although overhead is high (10% header), speed & timing are more important.

🔹 Important Header Fields in ATM Cells


VPI/VCI = Address of where the cell should go

 VPI (Virtual Path Identifier) – 8 bits


 VCI (Virtual Channel Identifier) – 16 bits
Total = 24-bit connection identifier

PRIO = Whether the cell can be dropped


CRC = Checks header for errors

Engineers call the overhead the cell tax because header is 10% of the cell (Ethernet overhead is lower ~1%).

🔹 ATM is Connection-Oriented (Like a Phone Call)


Exactly like making a phone call:

1. Dial number → send connection request

2. Phone rings → waiting

3. Person picks up → connection established

4. Conversation happens → data transfer

5. Hang up → connection ends

ATM works the same way:

 Before sending data → a connection must be set up


 After connection is ready → send cells
 End the connection when done

This is not like IP (which is connectionless).


🔹 Virtual Circuits (VC) / Virtual Channels
ATM connections are called:

✔ Virtual Circuits or
✔ Virtual Channels

They’re called virtual because no physical wires change—only tables inside switches store the path.

Virtual Circuit Identifier = VPI + VCI

 VPI = Virtual Path Indicator (8 bits)


 VCI = Virtual Channel Indicator (16 bits)

Together they uniquely identify the ATM connection.

VC = The route (path)


Cell header contains VPI/VCI so switches know where to forward

🧠 EXAM-READY SUMMARY (Memorize This)


1. ATM = single technology replacing LAN + WAN for all traffic types (voice, video, data).
2. Jitter = variation in delay; harmful for voice/video; ATM reduces jitter.
3. Large packets → high delay → bad for real-time voice.
4. ATM cells are small and fixed (53 bytes: 5 header, 48 data).
5. Overhead = 10% (called cell tax).
6. ATM is connection-oriented (like a telephone call).
7. Virtual Circuits are identified using VPI (8-bit) + VCI (16-bit) → 24-bit identifier.
8. ATM switches use tables to forward cells (not physical circuits).

You might also like