Computer Networks ASNWER-KEY
Computer Networks ASNWER-KEY
com
• Resource sharing: Sharing printers, files, and storage between multiple computers
• Information access: The internet lets us access websites, news, and online databases
• Cloud services: Storing files online (Google Drive, Dropbox) and using web apps
• Point-to-point: A direct connection between exactly two devices, like a wire between two
computers. It's private and dedicated.
• Point-to-multipoint: One device connects to multiple devices, like a Wi-Fi router connecting
to many phones/laptops. It's shared and can broadcast to many.
• Fixed size framing: Data is divided into same-size pieces (like ATM cells always being 53
bytes). Easier to handle but may waste space.
• Variable size framing: Data pieces can be different sizes (like Ethernet frames from 64 to
1518 bytes). More efficient but harder to manage.
Delivery means sending packets from source to destination. There are two types:
• Direct delivery: When sender and receiver are on same network (like same office LAN)
• Indirect delivery: When packets must travel through routers to reach different networks (like
sending email to someone in another country)
• To send data, you need tokens (1 token per byte, for example)
• This prevents network flooding while allowing bursts of data when tokens are available
www.gradamic.com
6. What are headers and trailers? How are they added and removed?
• Headers: Extra information added at the beginning of data (like address labels on a package)
• Trailers: Extra information added at the end (like a checksum to detect errors)
• Adding/Removing:
o When sending: Each layer adds its own header (like wrapping a gift in multiple boxes)
o When receiving: Each layer removes its header (like unwrapping the boxes one by
one)
o Example: Transport layer adds port numbers, network layer adds IP addresses
This is a routing issue where routers keep increasing hop counts forever:
• Like a "hot potato" game where the packet gets too "cold" to keep passing
9. What is the difference between network layer and transport layer delivery?
• Network layer: Focuses on getting packets from one computer to another using IP addresses
(like postal service delivering to a house)
• Transport layer: Focuses on getting data to the right program on that computer using port
numbers (like delivering to the right person in that house)
• Allows flexible network organization (you can change IPs without changing hardware)
www.gradamic.com
16. Explain HTTP. State the difference between HTTP and HTTPS.
• HTTP: Basic web page transfer protocol (sends data in plain text)
• Like hanging up the phone suddenly when the call gets messed up
• Connection-oriented (TCP): Like a phone call - setup first, then talk, then proper hangup
• Connection-less (UDP): Like mailing letters - just send and hope they arrive
• They're equal for simple signals, but differ with complex encoding
• When computer A sends data to B, it can include ACK for B's previous message
• Like writing "Got your letter" when sending your own letter
www.gradamic.com
Advantages:
Disadvantages:
o b1: 1,3,5,7
o b2: 2,3,6,7
o b4: 4,5,6,7
Transmission delay is the time to push all bits into the wire:
2. Internet Layer:
3. Transport Layer:
4. Application Layer:
o User-facing services
TCP Features:
• Connection-oriented
• Reliable delivery
• Flow control
• Error checking
• Ordered data
Components:
Operations:
Used for monitoring performance, detecting faults, and configuring devices remotely.
5. Define topology. Explain bus, star, and ring topologies with pros and cons.
Bus Topology:
Star Topology:
Ring Topology:
1. Twisted Pair:
o Phone/network cables
o Cheap, flexible
o Limited distance/speed
2. Coaxial Cable:
3. Fiber Optic:
o Expensive, fragile
4. Wireless:
o Convenient
o Security/signal issues
o Down-up=1, Up-down=0
1. Stop-and-Wait ARQ:
2. Go-Back-N ARQ:
10. Explain working of TCP and differentiate TCP and UDP with frame format.
TCP Working:
TCP vs UDP:
CSMA/CD (Ethernet):
CSMA/CA (Wi-Fi):
Diagram would show TCP window size growing then reducing when packet loss occurs.
www.gradamic.com
Go-Back-N:
Selective Repeat:
16. Discuss asymmetric cryptography. Explain RSA algorithm with example (character "F" or custom
input).
2. n = p*q = 55
3. φ(n) = (5-1)*(11-1) = 40
QoS measures:
18. List and explain four network devices and transmission impairment.
Devices:
Impairments:
1. Physical Layer:
o Units: Bits
o Error detection/correction
o MAC addressing
o Units: Frames
3. Network Layer:
o Routing
o Units: Packets
4. Transport Layer:
o End-to-end connections
o Flow control
o Units: Segments
5. Session Layer:
o Manages dialogues
o Synchronization
o Units: Data
6. Presentation Layer:
o Data translation
o Encryption/compression
o Units: Data
7. Application Layer:
o User interfaces
o Network services
www.gradamic.com
o Units: Data
Mesh:
Tree:
Hybrid:
Layer 1 (Physical):
Layer 3 (Network):
Layer 4+:
• Wired LAN
• CSMA/CD
• Wireless LAN
• CSMA/CA
• Standards: 802.11a/b/g/n/ac/ax
• Token passing
• Mostly obsolete
1. ALOHA:
2. CSMA:
3. CSMA/CD:
o Ethernet's method
4. CSMA/CA:
o Wi-Fi's method
Cryptography Types:
RSA Steps:
10. Solve: CRC using polynomial (e.g., x³ + x + 1) for data like 10011101, 110101, etc.
Copy
Download
110101000
1011
----- XOR
1100
1011
---- XOR
1110
1011
---- XOR
1010
www.gradamic.com
1011
---- XOR
001 (remainder)
1. Error Detection:
o Parity bits
o Checksums
o CRC
2. Error Correction:
o Hamming codes
o Reed-Solomon
3. Retransmission:
o ARQ protocols
o Sequence numbers
o Acknowledgments
3. Subnets:
o 200.1.2.0/26
o 200.1.2.64/26
o 200.1.2.128/26
o 200.1.2.192/26
www.gradamic.com
Session Layer:
• Establishes/manages/terminates connections
• Synchronization (checkpoints)
Application Layer:
15. Calculate total time for transmission (given data size, bandwidth, headers).
16. Sliding window: calculate window size and sequence number (given Tp, Tt).
BOOTP:
• Older protocol
• Static IP assignments
• No lease time
DHCP:
• Dynamic IP assignments
• Lease management
• Additional options
20. Encode bitstreams using line coding schemes (Unipolar, NRZ-L, Manchester, etc.)