Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views13 pages

CN Solution

The document provides an overview of computer networking, including key concepts such as network types, devices, topologies, and guided transmission media. It covers protocols like CSMA/CD and error detection methods like CRC, along with a comparison of IPv4 and IPv6 addressing. Additionally, it discusses subnetting principles and calculations for network management.

Uploaded by

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

CN Solution

The document provides an overview of computer networking, including key concepts such as network types, devices, topologies, and guided transmission media. It covers protocols like CSMA/CD and error detection methods like CRC, along with a comparison of IPv4 and IPv6 addressing. Additionally, it discusses subnetting principles and calculations for network management.

Uploaded by

sigcegroup
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

PDF 1: Chapter-wise Important Questions

Module 1: Introduction to Networking

1. Introduction to computer network, Network Devices, Network topology, Switching.

Ans. Introduction to Computer Network

A computer network is a collection of interconnected devices (computers, servers, network devices) that
communicate and share resources using communication channels.

• Purpose: Resource sharing (files, printers), communication (email, chat), remote access, data
transfer.
• Advantages:
1. Resource sharing
2. Cost reduction
3. Centralized management
4. Scalability

Types of networks:

• LAN (Local Area Network) – small area (office, home)


• MAN (Metropolitan Area Network) – city-level coverage
• WAN (Wide Area Network) – large geographical area, e.g., Internet

Network Devices
Device Function

Hub Broadcasts data to all ports; no filtering; works at Physical Layer.

Forwards data only to the destination port; works at Data Link Layer; supports MAC address
Switch
learning.

Router Connects multiple networks; routes data based on IP addresses; works at Network Layer.

Gateway Connects dissimilar networks (different protocols).

Access
Allows wireless devices to connect to wired network (Wi-Fi).
Point

Modem Converts digital signals to analog and vice versa for ISP connection.

Firewall Monitors and controls network traffic for security.

Network Topology

Network topology = Physical or logical arrangement of network nodes.

Types:

1. Bus – Single backbone cable; all devices connected to it.


o Pros: Easy to set up, less cable.
o Cons: Entire network down if backbone fails.
2. Star – All devices connected to a central hub/switch.
o Pros: Easy fault isolation; one device failure doesn’t affect others.
o Cons: Central device failure = network down.
3. Ring – Devices connected in a circular path.
o Pros: Predictable performance.
o Cons: Single failure disrupts network (unless dual ring).
4. Mesh – Every device connected to every other device.
o Pros: High reliability, redundancy.
o Cons: Expensive, complex.
5. Hybrid – Combination of two or more topologies.

• Switching

Switching = Process of transferring data from source to destination across a network.

Types of Switching:

1. Circuit Switching – Dedicated path established before communication (e.g., traditional telephone).
o Pros: Reliable, fixed bandwidth.
o Cons: Wastes resources when idle.
2. Packet Switching – Data split into packets; each packet may take different routes (e.g., Internet).
o Pros: Efficient use of bandwidth; fault-tolerant.
o Cons: Packet delay, reordering possible.
3. Message Switching – Entire message sent to intermediate nodes before forwarding (store-and-
forward).
o Pros: No dedicated path needed.
o Cons: High delay for large messages.

2. List and describe the different network connection topologies.

Ans. Bus Topology

• Description:
All devices are connected to a single central cable (backbone).
• Data Flow:
Data travels in both directions along the backbone until it reaches the destination.
• Advantages:
o Easy to set up.
o Requires less cable than others.
• Disadvantages:
o A fault in the backbone brings down the entire network.
o Performance drops with more devices.

2. Star Topology

• Description:
All devices connect to a central hub or switch.
• Data Flow:
Communication between devices goes through the central hub.
• Advantages:
o Easy to add/remove devices.
o Fault isolation is simple.
• Disadvantages:
o Failure of the central hub disrupts the network.

3. Ring Topology

• Description:
Devices are connected in a circular manner; each has exactly two neighbors.
• Data Flow:
Data travels in one direction (or both in dual-ring).
• Advantages:
o Predictable performance.
o No collisions in unidirectional ring.
• Disadvantages:
o A single break can disrupt the network (unless dual ring).

4. Mesh Topology

• Description:
Each device is connected to every other device.
• Types:
o Full Mesh: Every device has a direct link to all others.
o Partial Mesh: Some devices are fully connected, others partially.
• Advantages:
o High fault tolerance.
o Reliable data transmission.
• Disadvantages:
o Expensive due to large cabling.
o Complex installation.

5. Tree Topology (Hierarchical)

• Description:
Combines characteristics of star and bus; groups of star-configured networks are connected to a bus
backbone.
• Advantages:
o Scalable and structured.
o Easy to manage in large networks.
• Disadvantages:
o Backbone failure affects the whole tree.

6. Hybrid Topology

• Description:
Combination of two or more different topologies.
• Example: Star-bus, star-ring.
• Advantages:
o Flexible, can be designed for specific needs.
o Fault isolation possible in certain parts.
• Disadvantages:
o Complex design and maintenance.

Module 2: Physical and Data Link Layer


1. Describe the different guided transmission medias used in the network.

Ans . Guided Transmission Media

Guided media are those in which signals are transmitted through a physical path (cables or wires).
They provide high data security and are less affected by interference compared to unguided media.

1. Twisted Pair Cable

Two insulated copper wires twisted together to reduce electromagnetic interference.

• Types:
1. Unshielded Twisted Pair (UTP): No shielding, cheaper, used in LANs.
2. Shielded Twisted Pair (STP): Has a metallic shield to reduce noise, used in industrial
networks.
• Advantages:
o Low cost.
o Easy installation.
• Disadvantages:
o Limited bandwidth and distance.
• Uses: Ethernet LAN, telephone lines.

2. Coaxial Cable

Consists of a copper conductor, insulating layer, metallic shield, and outer cover.

• Advantages:
o Better shielding than twisted pair.
o Higher bandwidth and distance.
• Disadvantages:
o Bulkier and more expensive than twisted pair.
• Uses: Cable TV, broadband internet.

3. Optical Fiber Cable

Uses thin strands of glass or plastic to transmit data as light pulses.

• Advantages:
o Extremely high bandwidth.
o Immune to electromagnetic interference.
o Long-distance transmission.
• Disadvantages:
o Expensive.
o Requires skilled installation.
• Uses: Backbone networks, high-speed internet, long-distance telecom.

Comparison Table (Quick Revision)

Medium Bandwidth Distance Cost EMI Resistance


Twisted Pair Low–Medium Short (<100m) Low Low
Coaxial Cable Medium Medium Medium Medium
Optical Fiber Very High Very Long High Very High

2. Define guided transmission media? Illustrate with diagram.

Ans. Guided transmission media refers to the physical mediums that guide the transmission of
data signals from one device to another within a network. These media can take the form of
twisted pair cables, coaxial cables, or fiber optic cables, each offering different characteristics
suited to specific networking needs. These media ensure the data is transmitted efficiently with
minimal interference and signal loss.

Twisted Pair Cables

• Unshielded Twisted Pair (UTP): Widely used for low-cost LANs; can be
categorized from Category 1 (telephone) to Category 5 (high-speed data)

• Shielded Twisted Pair (STP): Includes a shielding layer to reduce interference,


providing higher performance than UTP.

Coaxial Cable
Coaxial cables have a central copper conductor, surrounded by a dielectric insulator, a metal
shield, and an outer insulating cover.

• Baseband: It transmits a single signal at a time.


• Broadband: It transmits multiple signals simultaneously
Fiber-optic Cables
Fiber-optic cables transmit data in the form of light through glass or plastic fibers. These cables
have the highest data transmission speed and bandwidth.

• Fiber Core: The central part that carries light signals.


• Cladding: The surrounding layer that reflects light into the core.
• Outer Jacket: Protective outer coating.
• Loose buffer: It is a type of fiber optic cable construction where optical fibers are
placed loosely within a plastic tube

3. Explain sliding window protocol using Go-Back-N.

Ans.

Working of Go-Back-N

1. Sender Side:
o Maintains a window of size N.
o Sends frames within the window without waiting for ACK.
o When an ACK for the oldest unacknowledged frame is received, the window slides forward.
2. Receiver Side:
o Accepts frames in order only.
o If an out-of-order frame is received, it is discarded.
o Sends ACK for the last correctly received frame.

Sliding Window Protocol using Go-Back-N (GBN)


Concept

The Sliding Window Protocol is used for flow control and error control in data communication.
It allows multiple frames to be sent before needing an acknowledgment, improving efficiency.

Go-Back-N is a specific type of sliding window protocol where:

• The sender can send N frames without waiting for an ACK.


• If any frame is lost or damaged, all frames from that frame onward are retransmitted.

4. Channel Allocation Problem. Explain CSMA/CD Protocol.


Ans. Channel Allocation Problem

In computer networks, multiple devices share the same communication channel. The Channel Allocation
Problem deals with deciding how devices share the medium efficiently without collision and how to
recover from collisions.

Two main approaches:

1. Static allocation – Fixed slots or frequency bands for each station (e.g., FDM, TDM).
2. Dynamic allocation – Channel is allocated on demand (e.g., ALOHA, CSMA/CD).

CSMA/CD Protocol (Carrier Sense Multiple Access with Collision


Detection)
Definition

A media access control method used in Ethernet where multiple stations share the same channel.
Stations first listen to the channel before sending and detect collisions while transmitting.

Working Steps

1. Carrier Sense:
o Before sending data, a station listens to the channel to check if it is idle.
2. Transmit:
o If channel is idle → start sending data.
o If busy → wait until it becomes free.
3. Collision Detection:
o While sending, station monitors the channel for signal interference.
o If collision is detected → stop transmitting immediately.
4. Jam Signal:
o The station sends a jam signal to ensure all stations know a collision happened.
5. Backoff Algorithm:
o Each station waits a random time (using Binary Exponential Backoff) before retrying.

Advantages

• Efficient for bursty traffic.


• Simple to implement in LANs like Ethernet.

Disadvantages

• Performance drops at high load due to frequent collisions.


• Not suitable for long-distance links (collision detection delay).

5. Error Detection and Correction using CRC Code.


Ans. Concept of CRC
CRC treats the data as a binary number and divides it by a fixed generator polynomial (G(x)).

• Sender:
o Append extra bits (called redundancy bits) to the data based on the remainder of the
division.
o Send the data + CRC bits.
• Receiver:
o Divide the received message by the same generator polynomial.
o If the remainder is 0 → no error; otherwise → error detected.

3. Steps for CRC Generation and Checking


At the Sender

1. Represent the data as a binary string (M).


2. Choose a generator polynomial (G) of degree r (length = r+1 bits).
3. Append r zeros to the end of the data.
4. Divide the padded data by G using binary division (XOR).
5. The remainder (R) of length r is the CRC code.
6. Append R to the original data → send this as Codeword.

At the Receiver

1. Receive the Codeword.


2. Divide the received bits by the same generator polynomial (G).
3. If remainder = 0, data is error-free; else, error detected.

4. Example
Data: 110101
Generator (G): 1011 (degree r = 3)

1. Append 3 zeros → 110101000


2. Divide by 1011 (binary division, XOR method).
3. Remainder = 011
4. Send → 110101011 (data + CRC).

Receiver:

• Divides 110101011 by 1011 → if remainder = 0 → no error.

5. Advantages
• Detects single-bit, double-bit, burst errors effectively.
• Hardware implementation is simple and fast.

6. Limitation
• Only detects errors, cannot correct them directly.
• If undetected errors occur (rare for a good polynomial), wrong data may pass.

Module 3: Network Layer


1. IPv4 vs IPv6 comparison.

Ans. IPv4 vs IPv6


Feature IPv4 IPv6
Address Length 32 bits (4 bytes) 128 bits (16 bytes)
Decimal, dotted notation Hexadecimal, colon-separated (e.g.,
Address Format
(e.g., 192.168.0.1) 2001:0db8:85a3::8a2e:0370:7334)
Address Space ~4.3 billion addresses ~3.4 × 10³⁸ addresses (practically unlimited)
Header Size 20–60 bytes (variable) Fixed 40 bytes
12 fields (includes
Header Fields checksum, fragmentation, 8 fields (simplified, no checksum)
etc.)
Auto-configuration (Stateless Address Auto-config,
Configuration Manual or DHCP
SLAAC)
Not mandatory; IPSec
Security IPSec support is mandatory
optional
Quality of Service Uses Type of Service (ToS)
Uses Flow Label field for better QoS handling
(QoS) field
Broadcast Support Yes (broadcast addresses) No broadcast (uses multicast and anycast)
Can be done by sender or Only sender does fragmentation (routers do not
Fragmentation
routers fragment)
Unicast, Broadcast,
Address Types Unicast, Multicast, Anycast
Multicast
More complex due to large
Packet Routing Simplified with hierarchical addressing
routing tables
NAT (Network Commonly used due to
Not required due to vast address space
Address Translation) shortage of addresses
Deployment Widely deployed Slowly replacing IPv4

2. Subnetting problems (Subnet mask, number of subnets, IP calculations).

Ans. Subnetting Basics

• Subnetting: Dividing a large network into smaller subnetworks to improve management,


performance, and security.
• Key Formulae:
1. Number of subnets = 2n2^n2n (where n = number of borrowed bits from host part)
2. Hosts per subnet = 2h−22^h - 22h−2 (where h = number of host bits left, “−2” for network
& broadcast addresses)
3. Subnet mask = Add borrowed bits to network prefix.

Example 1 – Find number of subnets and hosts per subnet

Given: IP = 192.168.10.0, Subnet mask = 255.255.255.192

1. Step 1 – Convert mask to CIDR


o 255.255.255.192 → last octet 192 = 11000000 (2 bits borrowed)
o CIDR = /26 (24 original network bits + 2 borrowed bits)
2. Step 2 – Number of subnets
o Borrowed bits = 2 → 22=42^2 = 422=4 subnets.
3. Step 3 – Hosts per subnet
o Host bits left = 32−26=632 - 26 = 632−26=6
o 26−2=622^6 - 2 = 6226−2=62 hosts per subnet.
4. Step 4 – Subnet ranges
o Block size = 256−192=64256 - 192 = 64256−192=64
o Subnets:
▪ 192.168.10.0 → .0 to .63
▪ 192.168.10.64 → .64 to .127
▪ 192.168.10.128 → .128 to .191
▪ 192.168.10.192 → .192 to .255

Example 2 – Given number of hosts, find subnet mask

Question: IP = 10.0.0.0, Need at least 500 hosts per subnet.

1. Step 1 – Find host bits needed


o 2h−2≥5002^h - 2 \geq 5002h−2≥500
o 29−2=5102^9 - 2 = 51029−2=510 so h = 9.
2. Step 2 – Find network bits
o Network bits = 32−9=2332 - 9 = 2332−9=23 → CIDR = /23.
3. Step 3 – Subnet mask
o /23 → 255.255.254.0.

3. Routing Algorithms — Distance Vector & Link State.

Ans.

Aspect Distance Vector Routing (DVR) Link State Routing (LSR)

Router maintains a table (“vector”) of the Router learns the entire network
Concept best-known distance to every destination. topology by exchanging link state
Shares it with neighbors periodically. information with all routers.
Aspect Distance Vector Routing (DVR) Link State Routing (LSR)

Algorithm Used Bellman–Ford algorithm Dijkstra’s shortest path algorithm

Knows only about directly connected


Knowledge Scope Knows full network topology
neighbors

Event-driven updates (only on topology


Update Method Periodic updates to neighbors
changes)

Information Link State Advertisements (LSAs)


Entire routing table sent to neighbors
Shared flooded to all routers

Convergence
Slow convergence Fast convergence
Speed

Prone to routing loops (Count-to-Infinity Loops are rare due to complete


Loop Issues
problem) topology knowledge

Processing &
Low CPU and memory requirements High CPU and memory requirements
Memory Needs

Overhead Low High (due to flooding LSAs)

Metric Used Hop count, cost, delay, etc. Link cost (bandwidth, delay, etc.)

Example Protocols RIP (Routing Information Protocol) OSPF (Open Shortest Path First), IS-IS

Accurate routing, quick convergence,


Advantages Simple, low processing overhead
loop prevention

High resource usage, complex to


Disadvantages Slow convergence, loop problems
implement

4. Shortest Path Algorithms (Dijkstra’s Algorithm).


Ans.
Aspect Dijkstra’s Algorithm
Finds the shortest path from a source node to all other nodes in a weighted graph (no
Purpose
negative weights).
Type Greedy algorithm
Iteratively picks the unvisited node with the smallest tentative distance, updates distances to
Key Idea
its neighbors, and repeats until all nodes are visited.
Output Shortest distance from source to all vertices and their paths
1. Assign distance = 0 for source and ∞ for others.2. Mark all nodes as unvisited.3. Choose
Steps the unvisited node with the smallest distance (start with source).4. Update distances to all
unvisited neighbors.5. Mark current node as visited.6. Repeat until all nodes are visited.
Applications Network routing (OSPF), GPS navigation, game AI pathfinding
Limitations Works only for graphs with non-negative edge weights
Aspect Dijkstra’s Algorithm

5. NAT (Network Address Translation) functionalities.

Ans. Definition:
NAT is a method of mapping multiple private IP addresses to a single public IP address (or a few public
IPs) to enable communication over the internet.

Purpose:

• Conserve public IPv4 addresses.


• Enhance network security by hiding internal IP addresses.
• Allow multiple devices in a private network to share one public IP.

Types of NAT:

1. Static NAT – One-to-one mapping between a private IP and a public IP.


2. Dynamic NAT – Maps private IPs to available public IPs from a pool.
3. PAT (Port Address Translation) – Many-to-one mapping using port numbers to differentiate
connections (also called NAT Overloading).

Key Functionalities:

• Address Translation: Converts source or destination IP addresses in packets.


• Port Mapping: Changes TCP/UDP port numbers in the case of PAT.
• Session Tracking: Maintains a mapping table for ongoing sessions.
• Security: Hides the internal network structure from the external world.

Advantages:

• Saves IPv4 addresses.


• Provides a basic firewall effect.
• Enables private networks to access the internet.

Limitations:

• Breaks true end-to-end connectivity.


• Certain applications like VoIP and P2P may face issues.
• Increases processing delay on the NAT device.

Common Uses:

• Home routers.
• Enterprise gateways.
• Cloud network address management.

6. IPv4 Header Format Diagram.


Ans.

You might also like