Module1_AnswerBank
Module1_AnswerBank
Internetworking devices connect different networks or extend a single network. The main devices are:
• Repeater – works at Physical layer (Layer 1)
• Hub – works at Physical layer (Layer 1)
• Bridge – works at Data Link layer (Layer 2)
• Switch – works at Data Link layer (Layer 2)
• Router – works at Network layer (Layer 3)
• Gateway – works at all layers (Layer 4 to 7)
Repeater: It receives a weak signal and retransmits it at full strength. It just boosts the signal — it does NOT
filter or process data. Used to extend cable length.
Hub: A simple device that connects multiple computers in a LAN. When one computer sends data, the hub
sends it to ALL connected devices. It does not check who the data is for.
Bridge: Connects two separate LAN segments. It reads the MAC address of the frame and forwards it only to
the correct segment. This reduces traffic.
Switch: A smarter version of a hub. It sends data only to the specific device it is meant for (using MAC
address table). Reduces collisions and improves speed.
Gateway: Connects two completely different types of networks (e.g., a LAN to the internet). It converts
protocols so both networks can understand each other. It works at all layers.
Q2. Compare Circuit-Switched Networks and Packet-Switched Networks.
Point Circuit Switching Packet Switching
Path Fixed dedicated path for whole call No fixed path; each packet
chooses its own route
Resources Resources reserved before communication Resources shared dynamically
Delay No delay once connection is set up Variable delay (queuing)
Bandwidth Waste Yes, if no data is sent, bandwidth is wasted No waste; bandwidth used only
when needed
Reliability Very reliable for continuous data Packets may arrive out of order
Example Old telephone (PSTN) Internet, emails, web browsing
Setup Time Takes time to set up connection first No setup time needed
Q2.b. OSI model with the function of each layer.
OSI stands for Open System Interconnection. It is a reference model created by ISO (International Organization
for Standardization) that describes how data travels from one computer to another across a network. It has 7
layers. Each layer has a specific job.
LayerName Main Job / Function Example Protocols
Application Closest to user. Provides network services like email, web HTTP, FTP, SMTP, DNS
browsing, file transfer.
Presentation Converts data format. Handles encryption, compression, and SSL/TLS, JPEG, MPEG
translation.
Session Starts, manages, and ends communication sessions between NetBIOS, RPC
two computers.
Transport Breaks data into segments. Ensures reliable delivery with
TCP, UDP
error checking.
Network Decides best path for data (routing). Handles logical IP, ICMP, RIP, OSPF
addressing (IP address).
Data Link Handles physical addressing (MAC address). Error detection Ethernet, Wi-Fi (802.11),
in frames. ARP
Physical Transmits raw bits (0s and 1s) over physical media like cable, USB, Ethernet cable, Hubs
fiber, radio.
Layer 7 – Application Layer: This is the layer the user directly interacts with. It provides services like browsing
the web (HTTP), sending emails (SMTP), and transferring files (FTP). It does NOT refer to apps like Chrome — it
refers to the network interface those apps use.
Layer 6 – Presentation Layer: It acts like a translator. It converts data into a format that the application layer can
understand. It also handles encryption (to keep data secure) and compression (to reduce size). Example:
converting a file from EBCDIC to ASCII.
Layer 5 – Session Layer: Manages sessions (connections) between two computers. It starts a session, keeps it
alive during communication, and ends it when done. Example: logging into a remote server.
Layer 4 – Transport Layer: This layer ensures complete data transfer. It breaks large data into small segments,
numbers them, and reassembles them at the receiver. TCP provides reliable delivery (with acknowledgement);
UDP is faster but without guarantee.
Layer 3 – Network Layer: Responsible for routing — deciding the best path for data to travel from sender to
receiver. It uses logical addresses (IP addresses). Routers work at this layer.
Layer 2 – Data Link Layer: Converts data into frames and adds MAC (hardware) addresses. It detects errors in
transmission. Switches and bridges work at this layer.
Layer 1 – Physical Layer: The lowest layer. It transmits raw bits over physical media (cables, fiber optic, radio
waves). It deals with voltage levels, connector types, and cable specs. Hubs and repeaters work here.
Q3. Circuit, Message, Datagram Packet, and Virtual-Circuit Packet Switching.
Switching is the technique used to decide how data is transferred from one network node to another. There are 4
main types:
1. Circuit Switching
• A dedicated physical path is set up between sender and receiver BEFORE communication starts.
• The path stays open for the entire duration of the communication.
• Even if no data is being sent, the path (bandwidth) is reserved — causing waste.
• Best for: voice calls (telephone network / PSTN).
• Phases: Connection Setup → Data Transfer → Connection Teardown.
2. Message Switching
• There is NO dedicated path. Data is sent as a complete message.
• Each intermediate node (router) receives the entire message, stores it, then forwards it — called
store-and-forward.
• Good for non-urgent data. Creates delays for large messages.
• Not suitable for real-time communication.
• Example: Old telegraph systems, early email systems.
3. Datagram Packet Switching
• Message is broken into small packets. Each packet travels independently through the network.
• Each packet may take a different path to reach the destination.
• Packets may arrive OUT OF ORDER — they are re-ordered at the destination.
• No setup required. Faster and more flexible than circuit switching.
• Example: Internet (IP protocol).
4. Virtual-Circuit Packet Switching
• A logical (virtual) path is set up before sending data — like circuit switching.
• But data is still broken into packets — like datagram switching.
• All packets follow the SAME path and arrive IN ORDER.
• Path is called a 'virtual circuit' because it's logical, not physical.
• Example: ATM (Asynchronous Transfer Mode), MPLS networks.
Feature Circuit Message Datagram Virtual-Circuit
Dedicated Path? Yes No No Logical path (virtual)
Store & Forward? No Yes (whole msg) Yes (per packet) Yes (per packet)
Order of Arrival? In order In order Out of order In order
Bandwidth Waste? Yes No No No
Setup Required? Yes No No Yes (virtual)
Delay Low High Variable Low (after setup)
Best Used For Voice calls Non-urgent msgs Internet traffic Video, ATM networks
Q4. Compare TCP/IP Model and OSI Model.
TCP/IP is the practical model used in the real internet. OSI is the theoretical reference model. Both describe how
data travels through a network but differ in structure and purpose.
Point OSI Model TCP/IP Model
No. of Layers 7 layers 4 layers
Developed By ISO (International Standard Org) US DoD (Department of Defense)
Usage Theoretical / reference model Practical model, used in real internet
Protocol Dependency Protocol independent Protocol specific (TCP, IP, etc.)
Session & Presentation Separate layers (5 & 6) Merged into Application layer
Data Link & Physical Separate layers (1 & 2) Merged into Network Access layer
Reliability Can support both reliable & unreliable Reliability handled at Transport layer
(TCP)
Flexibility More flexible & general Less flexible but more practical
Communication Connection-oriented at all layers Both connection-oriented (TCP) &
connectionless (UDP)
Q5. Compare Twisted Pair Cable, Coaxial Cable, and Fiber Optic Cable.
The three main types of guided transmission media are Twisted Pair, Coaxial, and Fiber Optic cables. Here is a
comparison:
Feature Twisted Pair Coaxial Cable Fiber Optic
Structure Two insulated copper wires Central copper wire with Glass/plastic fiber carries light
twisted together metal shield signals
Speed Slow to Medium (up to 100 Mbps) Medium (up to 1 Gbps) Very High (up to 100 Gbps+)
Distance Short (up to 100 m) Medium (up to 500 m) Long (many km)
Cost Cheapest Moderate Most Expensive
Interference High (picks up noise easily) Low (shielded) Zero (uses light)
Use LAN, telephone lines Cable TV, internet Backbone networks, long
distance
Flexibility Very flexible, easy to install Less flexible Fragile, needs care
Q6 Explain Guided and Unguided Transmission Media and Draw Electromagnetic Spectrum
Transmission media is the path or channel through which data travels from the sender to the receiver. It is also
called a communication channel. There are two main types:
• Guided Media (Wired) — Data travels through a physical wire or cable.
• Unguided Media (Wireless) — Data travels through air or space using electromagnetic waves.
1. Guided (Wired) Transmission Media
In guided media, a physical cable guides the signal from one place to another. There are three types:
A. Twisted Pair Cable
It consists of two independently insulated copper wires twisted around each other in a spiral pattern.
The twisting of the wires is crucial because it significantly reduces electromagnetic interference (EMI) and
"crosstalk" (signal bleeding) from neighboring cables.
Two Types:
UTP (Unshielded Twisted Pair): No extra metal covering. Used in LAN (Ethernet) and telephone lines. Easy to
install, cheap.
STP (Shielded Twisted Pair): Has extra metal foil around it for more protection. Used where interference is high.
Advantages: Very cheap and easy to install.; Widely available everywhere.
Disadvantages:
• Gets affected by electrical noise and interference.
• Only works for short distances (up to 100 m for LAN).
B. Coaxial Cable
A coaxial cable has a central copper wire, surrounded by a layer of insulation, then a metal mesh (shield), and
finally an outer plastic cover. The shield protects signals from outside noise.
Advantages: Better shielding = less interference than twisted pair; Can carry signals over longer distances.
Disadvantages: More expensive than twisted pair.; Bulky and less flexible.
Uses: Cable TV (CATV), broadband internet, older Ethernet networks.
C. Fiber Optic Cable
Fiber optic cable uses light (not electricity) to carry data. It has a thin glass or plastic core that carries light signals.
The core is surrounded by cladding (a reflective layer) that bounces the light back inside. This is called Total
Internal Reflection.
Two Types:
Single Mode Fiber (SMF): Very thin core, carries one light beam, used for long distances (telephone networks,
ISPs).
Multi Mode Fiber (MMF): Thicker core, carries multiple light beams, used for shorter distances (inside buildings).
Advantages:
• Extremely fast — highest bandwidth of all cables.
• Not affected by electromagnetic interference at all.
• Works over very long distances without signal loss.
• Very secure — hard to tap into.
Disadvantages:
• Most expensive of the three.
• Fragile — glass breaks easily.
• Difficult to install and repair.
2. Unguided (Wireless) Transmission Media
In unguided media, signals travel through air or free space without any physical cable. They use electromagnetic
(EM) waves. The type of wave depends on the frequency used.
Electromagnetic Spectrum (Draw this in exam):
The electromagnetic spectrum arranges all EM waves by their frequency (Hz). Higher frequency = more data but
shorter range.
Frequency Range Wave Type Used For
3 KHz – 30 MHz Radio Waves (AM/FM) AM/FM Radio, walkie-talkies
30 MHz – 300 MHz VHF Radio FM Radio, TV broadcasting
300 MHz – 3 GHz Microwaves (lower) WiFi, Bluetooth, cellular (3G/4G)
3 GHz – 300 GHz Microwaves (upper) Satellite, radar, 5G
300 GHz – 400 THz Infrared TV remotes, short-range transfer
400 THz – 700 THz Visible Light Fiber optic, experimental
Types of Unguided Media:
A. Radio Waves
• Frequency range: 3 KHz to 300 MHz.
• Travel in all directions — called omnidirectional.
• Can pass through walls and buildings easily.
• Used in: AM/FM radio, TV broadcasting, walkie-talkies.
B. Microwaves
• Frequency range: 300 MHz to 300 GHz.
• Travel in straight lines (line of sight) — need clear path between sender and receiver.
• Used for: satellite communication, WiFi, mobile networks (4G/5G), radar.
• Two types: Terrestrial Microwave (between towers on ground) and Satellite Microwave (via satellites in
space).
C. Infrared Waves
• Frequency range: 300 GHz to 400 THz.
• Very short range — cannot pass through walls.
• Used for: TV remotes, some wireless keyboards, short-distance file transfer.
• Advantage: No interference with other devices. Disadvantage: Very limited range
Q7. Explain Ethernet Protocol.
Ethernet is the most widely used technology for connecting computers in a Local Area Network (LAN). It defines
how data is sent and received over a wired network using cables.
Key Points:
• Ethernet works on the Data Link Layer and Physical Layer of the OSI model.
• It uses a standard called IEEE 802.3.
• Data is sent in small packets called frames.
• Each device on an Ethernet network has a unique MAC address.
• It uses CSMA/CD (Carrier Sense Multiple Access with Collision Detection) to control data transfer.
Ethernet Frame Format:
An Ethernet frame contains: Preamble | Destination MAC | Source MAC | Type | Data | FCS (Frame Check
Sequence)
Types of Ethernet:
• Standard Ethernet — 10 Mbps
• Fast Ethernet — 100 Mbps
• Gigabit Ethernet — 1 Gbps
• 10 Gigabit Ethernet — 10 Gbps
Q8. What is the difference between MAC address and IP address?
MAC Address: A permanent hardware address given to a network device by the manufacturer. It is 48 bits long
and written in hexadecimal (e.g., AA:BB:CC:DD:EE:FF).
IP Address: A logical address assigned to a device to identify it on a network. It can change and is assigned by
the network (e.g., [Link]).
Feature MAC Address IP Address
Full Form Media Access Control Internet Protocol
Type Physical / Hardware Address Logical / Software Address
Length 48 bits (6 bytes) IPv4: 32 bits, IPv6: 128 bits
Assigned By Manufacturer (permanent) Network Admin or DHCP (can
change)
Layer Data Link Layer (Layer 2) Network Layer (Layer 3)
Scope Local Network only Global (used across internet)
Format Hexadecimal (AA:BB:CC:DD:EE:FF) Decimal ([Link]) or Hex (IPv6)
Can Change? No (fixed by hardware) Yes (dynamic via DHCP)
Q9. Sliding Protocol? Compare Go-Back-N and Selective Repeat.
Sliding Window Protocol is a method used in data communication to control the flow of data between a sender
and receiver. Instead of waiting for an acknowledgement (ACK) after every single frame, the sender can send
multiple frames at once — up to a set limit called the window size.
• It improves efficiency by keeping the communication channel busy.
• It avoids wasting time waiting for ACKs for every single packet.
• It handles errors by allowing retransmission of lost or damaged frames.
How it Works:
1. The sender has a window — it can send W frames without waiting for ACK.
2. When ACK for the first frame arrives, the window slides forward by one.
3. New frames can now be sent as the window moves ahead.
4. If a frame is lost or damaged, it is retransmitted.
Feature Go-Back-N (GBN) Selective Repeat (SR)
Window Size Up to 2^n - 1 Up to 2^(n-1)
On Error Retransmit error frame + ALL frames after it Retransmit only the error frame
Receiver Buffer No buffer needed (discards bad frames) Buffer required to store
out-of-order frames
Efficiency Lower (wastes bandwidth) Higher (less retransmission)
Complexity Simple More complex
Example Use Simple, low-error links High-speed, error-prone links
Q10. Explain Go-Back-N Protocol in detail.
Go-Back-N is a type of Sliding Window Protocol where the sender can send multiple frames without waiting for
ACKs. However, if one frame is lost or has an error, the sender must go back and retransmit that frame AND all
the frames that came after it.
• Sender window size = up to 2^n - 1 (where n = number of bits in sequence number).
• Receiver window size = 1 (it only accepts frames in order).
• If a frame is damaged, the receiver sends a Negative ACK (NAK).
• Sender retransmits the damaged frame and all subsequent frames.
Working Example: Suppose window size = 4 and frames 0,1,2,3 are sent.
If frame 1 is lost — sender must retransmit frame 1, 2, and 3 (go back to frame 1).
Even though frames 2 and 3 arrived correctly, they are discarded and resent.
Advantages: Simple to implement; Receiver does not need a large buffer.
Disadvantages:
• Wastes bandwidth — retransmits frames that were already received correctly.
• Less efficient when errors are frequent.
Q11. CSMA protocols. Explain how collisions are handled in CSMA/CA and CSMA/CD.
CSMA stands for Carrier Sense Multiple Access. It is a media access control protocol used in networks where
multiple devices share the same communication channel. Before sending data, a device first listens (senses) to
check if the channel is free or busy.
Types of CSMA:
1-Persistent CSMA — If the channel is busy, keep listening. As soon as it is free, send it immediately. High
chance of collision.
Non-Persistent CSMA — If busy, wait a random time and check again. Less collision but wastes the channel.
p-Persistent CSMA — If free, send with probability p or wait with probability (1-p).
CSMA/CD — Collision Detection (Used in Wired Ethernet):
CSMA/CD = Carrier Sense Multiple Access with Collision Detection
• The device listens to the channel before sending.
• If the channel is free, it sends the data.
• While sending, it also monitors the channel.
• If a collision is detected (two devices sent at the same time), both STOP sending.
• Both send a jam signal to inform all devices about the collision.
• Each device waits a random time (Binary Exponential Backoff) and tries again.
CSMA/CA — Collision Avoidance (Used in Wireless — WiFi):
CSMA/CA = Carrier Sense Multiple Access with Collision Avoidance
Why not CSMA/CD in wireless? Because detecting collisions is difficult in wireless networks — a device cannot
send and listen at the same time effectively.
• Device checks if the channel is free.
• If free, it waits for a short time called DIFS (Distributed Inter-Frame Space).
• Then it sends an RTS (Request to Send) message to the receiver.
• Receiver replies with CTS (Clear to Send) if channel is available.
• All other devices hear the CTS and stay silent (this avoids collision).
• Sender sends the data, receiver sends ACK after receiving.
Feature CSMA/CD CSMA/CA
Full Form Collision Detection Collision Avoidance
Used In Wired Networks (Ethernet) Wireless Networks (WiFi / 802.11)
Collision Handling Detect and retransmit Avoid before it happens
Method Listen while sending RTS/CTS handshake before sending
Efficiency Good for wired links Better for wireless (less collision)
Standard IEEE 802.3 IEEE 802.11
Q12. What is Controlled Media Access? Explain Reservation, Polling, and Token Passing.
What is Controlled Media Access?
Controlled Media Access (also called Controlled Access) is a method where access to the shared communication
channel is controlled or managed. Only one device is allowed to transmit at a time, and this is decided in an
organized way to avoid collisions.
There are three main techniques:
1. Reservation:
In this method, time is divided into slots. A device must first reserve a slot before it can send data. All devices
announce their need to transmit during a reservation period. Then data is sent in the reserved slots.
• No collisions because slots are pre-booked.
• Wastes time if a device reserves a slot but has no data.
2. Polling:
There is a Primary device (controller) and many Secondary devices. The primary device polls (asks) each
secondary device one by one: 'Do you have data to send?' If yes, the secondary sends. If no, the primary moves
to the next device.
• Works well in master-slave networks.
• No collision at all.
• Disadvantage — If primary fails, the whole network stops.
• Also wastes time polling idle devices.
3. Token Passing:
A special control message called a Token is passed around the network in a ring. Only the device that holds the
token is allowed to send data. After sending, it passes the token to the next device.
• Used in Token Ring networks (IEEE 802.4 / 802.5).
• Completely fair — every device gets an equal turn.
• No collisions because only one device sends at a time.
• Disadvantage — If a device fails and keeps the token, the whole network stops.
Feature Reservation Polling Token Passing
Control Method Time slot reservation Primary asks devices Token circulates
Collision None None None
Fairness Based on reservation Depends on polling Very fair (equal turns)
order
Failure Risk Low Primary device failure Token loss
Efficiency Good with heavy load Good for few devices Good for ring networks