PS 1
A. Mesh Topology: A single connection failure has little effect; data can reroute through
other links. High fault tolerance.
1. B. Star Topology: If one device's cable fails, only that device is affected. If the
central hub fails, the entire network fails.
2. C. Bus Topology: Failure in the main cable disrupts the whole network. If a device's
connection fails, only that device is affected.
3. D. Ring Topology: A single break in the ring disrupts the entire network unless a
redundant ring or bypass mechanism exists.
2. Star Topology
In star topology, all devices are connected to a central hub. Data travels via the hub. If a
device's link fails, only that device is affected. If the hub fails, the whole network stops.
Advantages: Easy to install, fault isolation.
Disadvantages: Hub failure affects all, uses more cables.
3. What is a Repeater?
A repeater is a device that regenerates and strengthens signals in a network. It is used to
extend the communication distance when signals become weak due to attenuation over
long cables.
4. What is a Hub?
A hub is a simple networking device that connects multiple computers in a LAN. It
broadcasts data to all devices. It works at the physical layer and is mainly used in small
networks.
5. Transmission Modes
Simplex: One-way (TV); simple but no return path.
Half-Duplex: Two-way, one direction at a time (walkie-talkie); saves bandwidth.
Full-Duplex: Two-way, simultaneous (telephone); fast, needs more hardware.
Examples:
Simplex: TV, keyboard to CPU
Half-Duplex: Walkie-talkie, CB radio
Full-Duplex: Phone, video call
6. Functions of OSI Model Layers
1. Physical: Transmits raw bits over cables or wireless.
2. Data Link: Frames data, detects/corrects errors.
3. Network: Routes data using IP addressing.
4. Transport: Ensures reliable delivery (TCP), segmentation.
5. Session: Manages sessions and connections.
6. Presentation: Formats data (encryption, compression).
7. Application: Provides network services (HTTP, FTP, email) to users.
7. Functions of TCP/IP Model Layers
1. Application: User services like email, web, file transfer.
2. Transport: Manages end-to-end connections using TCP/UDP.
3. Internet: Handles IP addressing and routing across networks.
4. Network Access (Link): Manages physical data transfer, MAC addressing, and
access to network media.
8. TCP/IP vs OSI Model
OSI has 7 layers; TCP/IP has 4.
OSI separates session and presentation layers; TCP/IP merges them into the
application layer.
OSI is a theoretical model, good for learning; TCP/IP is practical and widely
used.
OSI supports both connection-oriented and connectionless communication;
TCP/IP primarily uses TCP and UDP.
9. Data Rate = 1000 bps
A. 10 bits: 10 / 1000 = 0.01 sec
B. 8 bits: 8 / 1000 = 0.008 sec
C. 100,000 characters = 800,000 bits
→ 800,000 / 1000 = 800 sec
10. Bandwidth = 5 Kbps, Frame = 100,000 bits
Time = 100,000 / 5,000 = 20 seconds
11. File = 28 MB = 224 Mb, Speed = 56 Kbps
Time = 224 / 0.056 = 4000 sec = 66.67 min
12. File = 56 MB = 448 Mb, Speed = 280 Mbps
Time = 448 / 280 = 1.6 sec
13. File = 2 MB = 16 Mb
56 Kbps: 16 / 0.056 = ~286 sec
1 Mbps: 16 / 1 = 16 sec
14. Fiber Delay, v = 2×10⁸ m/s
10 m: 10 / 2×10⁸ = 0.05 μs
100 m: 100 / 2×10⁸ = 0.5 μs
1 km: 1000 / 2×10⁸ = 5 μs
15. Topologies Summary
Topology Description Advantages Disadvantages
Bus Single cable Cheap, easy to install Cable fault affects network
Star Central hub Easy to manage Hub failure breaks network
Ring Circular connection Orderly data flow One break disrupts network
Mesh Fully connected High reliability Complex, costly
16. Transmission Delay (10,000 bits, 1 Mbps)
= 10,000 / 1,000,000 = 0.01 sec
17. Propagation Delay (400 km = 400,000 m, speed = 8×10⁸ m/s)
= 400,000 / 8×10⁸ = 0.0005 sec = 0.5 ms
18. WWW vs Internet
The Internet is a global network of computers, supporting multiple services. The World
Wide Web (WWW) is one service on the Internet that delivers web pages using
browsers. WWW uses HTTP/HTTPS, while the Internet includes email, FTP, etc.
19. Transmission Delay (20,000 bits, 4 Mbps)
= 20,000 / 4,000,000 = 0.005 sec
20. Cables in Topologies (n = 5 Devices)
Mesh: n(n−1)/2 = 5×4/2 = 10 links
Ring: n = 5 links
Bus: 1 shared backbone
Star: 5 links (to central hub)
21. Delay-Sensitive Applications
Most sensitive: Surfing the Internet (real-time)
Less sensitive: Email (not urgent), copying files (bulk data transfer)
Performance drops more in delay-sensitive applications like streaming, online
gaming, or browsing.
22. LAN, MAN, WAN?
This is a LAN (Local Area Network).
Reason: A LAN connects computers and devices within a small geographical area such
as a home, office, or building. Since the two computers are connected by an Ethernet
hub at home, they form a private, short-range network. It does not span cities (like a
MAN) or countries (like a WAN), and it uses local hardware (hub, Ethernet cables),
which is typical of a LAN.
PS2
1. Switching in Data Communication
Switching is used in networks to send data from source to destination. There are three
main types. Circuit switching sets a fixed path before data transfer, like in phone calls.
It is reliable but wastes time when not in use. Packet switching breaks data into packets
sent through different paths. It is efficient but may delay or reorder packets. Message
switching sends the full message, storing it at each node. It saves setup time but is
slower. Each method suits different needs based on speed, reliability, and efficiency.
2. Comparison of Switching Techniques
Circuit switching uses a fixed path, which makes it reliable but wastes resources when
no data is sent. Packet switching sends small packets independently, making it efficient
and suitable for the internet. However, it may cause delays. Message switching sends
entire messages, storing them before forwarding. It does not need a dedicated path but
can be slow. Packet switching is best for modern communication, while circuit switching
is ideal for real-time calls.
3. Point-to-Point vs Broadcast Link
A point-to-point link connects exactly two devices. Data travels directly between them,
like in a USB connection. It is fast, simple, and secure. A broadcast link connects one
device to many. Data is sent once but received by all devices on the network. This is
used in local area networks (LANs). While point-to-point is private and faster,
broadcast links are efficient for group communication.
4. Hamming Distance
Hamming distance counts differing bits:
a. 10000 vs 00000 = 1
b. 10101 vs 10000 = 2
c. 00000 vs 11111 = 5
d. 00000 vs 00000 = 0
5. Even Parity (Parity bit added to make 1s count even):
a. 1001011 → 1s = 4 → Parity = 0
b. 0001100 → 1s = 2 → Parity = 0
c. 1000000 → 1s = 1 → Parity = 1
d. 1110111 → 1s = 6 → Parity = 0
6. Odd Parity (Parity bit added to make 1s count odd):
a. 1001011 → 1s = 4 → Parity = 1
b. 0001100 → 1s = 2 → Parity = 1
c. 1000000 → 1s = 1 → Parity = 0
d. 1110111 → 1s = 6 → Parity = 1
7. CRC Generation (dataword = 101001111, divisor = 10111)
Append 4 zeros to dataword → 1010011110000
Divide using binary division (XOR).
Remainder (4 bits) is the CRC.
Append it to dataword to get codeword.
Final CRC codeword = 101001111 + remainder
8. Byte Stuffing Output
Byte stuffing adds ESC before ESC or FLAG:
Output: A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D ESC ESC E ESC FLAG
ESC FLAG F ESC ESC
9. Internet Checksum (4-bit words)
Message: 1001 + 1100 + 1010 + 0011 = 100000
Drop overflow bit: 0000 + 1 = 0001
Checksum = 1’s complement = 1110
10. Byte Stuffing (E = escape, F = flag, D = data)
Stuff ESC before E and F:
→ D ESC E D ESC F D
11. Byte Unstuffing
Remove ESC before E and F:
→DEDFD
12. Bit Stuffing
After 5 consecutive 1s, insert a 0.
Example: 01111110 becomes 011111010
13. Bit Unstuffing
Remove 0 after 5 ones.
Example: 011111010 becomes 01111110
14. No CSMA/CD in Full Duplex Ethernet
In full duplex, data can go both ways at once.
No collisions happen, so CSMA/CD is not needed.
15. Why MAC Protocols Are Needed
MAC controls device access to the medium.
It prevents collisions and ensures fair, orderly data transfer.
16. Bit Sequence for A B ESC FLAG
Encodings:
A = 01000111
B = 11100011
ESC = 11100000
FLAG = 01111110
a. Byte Count: 05 01000111 11100011 11100000 01111110
b. Byte Stuffing: 01000111 11100011 ESC 11100000 ESC 01111110
c. Bit Stuffing: Insert 0 after 5 ones in sequence
17. Ethernet Data Rates
Standard Ethernet = 10 Mbps
Fast Ethernet = 100 Mbps
Gigabit Ethernet = 1 Gbps
10 Gigabit Ethernet = 10 Gbps
18. Common Standard Ethernet Implementations
10Base2 (thin coax)
10Base5 (thick coax)
10Base-T (twisted pair)
19. Common Fast Ethernet Implementations
100Base-TX (2 wires)
100Base-FX (fiber)
100Base-T4 (4 wires)
20. Common Gigabit Ethernet Implementations
1000Base-T (copper)
1000Base-SX (short fiber)
1000Base-LX (long fiber)
21. Common 10 Gigabit Ethernet Implementations
10GBase-T (copper)
10GBase-SR (short fiber)
10GBase-LR (long fiber)
10GBase-ER (extra long fiber)
24. What is the relationship between a switch and a bridge?
A bridge connects and filters traffic between two LAN segments. A switch is like a
multi-port bridge with many connections. Both work at the data link layer and use
MAC addresses to forward frames. The main difference is that switches handle more
traffic, work faster, and can connect many devices at once. So, a switch is an advanced
version of a bridge used in modern networks.
25. Compare Wired LAN and Wireless LAN Mediums
Wired LAN uses cables (like Ethernet) to connect devices. It offers high speed, low
interference, and better security. Wireless LAN uses radio waves to connect devices
through Wi-Fi. It allows more mobility and easy setup but is slower and can face
interference. Today, wired LAN is best for speed and stability, while wireless is
preferred for flexibility and convenience.
26. Why MAC Protocol is More Important in Wireless LANs
In wireless LANs, many devices share the same air channel. Signals can easily collide,
and it's harder to detect them. So, the MAC protocol becomes very important to avoid
interference, manage access, and ensure smooth communication. It decides who can
send data and when, which is more complex than in wired LANs.
27. Why CSMA/CD Can't Be Used in Wireless LANs
In wireless LANs, a device can’t listen while transmitting, so it can’t detect a collision
(unlike in wired LANs). Also, signals may not reach all devices due to range limits
(hidden node problem). That’s why CSMA/CD (used in Ethernet) doesn’t work in
wireless. Instead, wireless LANs use CSMA/CA (Collision Avoidance).
28. CRC with Bit Stream and Generator x³ + 1
Given: Bit stream = 10011101, Generator = x³ + 1 → 1001
Step 1: Append 3 zeros → 10011101000
Step 2: Divide using XOR (binary division) → get 3-bit remainder
Step 3: Final transmitted bits = 10011101 + remainder
If 3rd bit is flipped, receiver divides it again. Remainder ≠ 0 → error detected.
Example of undetected error: If error causes a change that mimics another valid
message (like symmetrical bit flips), CRC may fail.
29. Stop-and-Wait, Go-Back-N, Selective Repeat Protocols
Stop-and-Wait: Sends 1 frame, waits for ACK. Simple but slow.
Go-Back-N: Sends N frames, but if one fails, resends all after it.
Selective Repeat: Resends only failed frames. Most efficient.
Comparison:
Protocol Efficiency Complexity Resend Strategy
Stop-and-Wait Low Simple One at a time
Go-Back-N Medium Moderate All after error
Selective Repeat High Complex Only lost frames
30. ALOHA and Slotted ALOHA Protocols
ALOHA: Devices send anytime. If collision occurs, resend after random delay.
Slotted ALOHA: Time divided into slots. Devices send only at slot start.
Slotted ALOHA reduces collisions by 50%.
Comparison:
ALOHA Efficiency ≈ 18%
Slotted ALOHA ≈ 36%
Slotted ALOHA is better for shared networks.
31. Data and Signals; Digital vs Analog
Data = information (text, audio, video).
Signals = how data is transmitted (electrical, optical, radio).
Analog signal: Continuous (like human voice).
Digital signal: Discrete (0s and 1s).
Digital transmission is more reliable, secure, and noise-resistant.
Analog is simpler but more affected by distortion.
32. Error Detection and Correction Techniques
Detection: Finds errors (e.g., Parity, Checksum, CRC).
Correction: Fixes errors (e.g., Hamming Code, Reed-Solomon).
Detection is simpler and less costly.
Correction is more complex but useful in unreliable channels (e.g., satellite).
Example: Hamming code can detect and correct single-bit errors.
33. Multiplexing Techniques in Data Communication
Multiplexing allows many signals to share one channel.
Types:
FDM (Frequency Division): Each user gets a frequency band. Used in radio.
TDM (Time Division): Users take turns in time slots. Used in digital networks.
WDM (Wavelength Division): Used in fiber optics. Light of different colors
(wavelengths).
Comparison:
| Type | Medium | Use Case | Shared by |
|------|------------|--------------|---------------------|
| FDM | Analog | Cable TV | Frequency bands |
| TDM | Digital | Telephone | Time slots |
| WDM | Optical | Fiber optics | Light wavelengths |