Mca II Sem Computer Networks
Mca II Sem Computer Networks
Semester II
UNIT - 1
SYLLABUS TO BE COVERED
Introduction:
Network Topologies WAN, LAN, MAN. Reference models- The OSI Reference Modelthe
TCP/IP Reference Model - A Comparison of the OSI and TCP/IP Reference Models.
Physical Layer:
Introduction to physical layer-Data and Signals, Periodic analog signals, digital
signals, transmission impairment, ,Data rate limits, performance -Introduction to
Guided Media- Twisted-pair cable, Coaxial cable and Fiber optic cable and Unguided
media: Wireless-Radio waves, microwaves, infrared.
CN - UNIT 1 1
Nimra College of Engineering and Technology
UNIT - 1
QUESTIONS TO BE COVERED
Q3. Why we need Unguided media? What are the different Types of Unguided
media? Explain.
Q5. Discuss the major functions performed by the Presentation layer and
Application layer of the ISO -OSI model.
Q6. With neat examples explain analog signals & digital signals and
periodic signals and aperiodic signals.
Q7. Explain the TCP/IP reference model of computer network with a neat
diagram.
Q10. Why are a LAN required and what objectives are achieved by having a
LAN?
Q12. Why twisted pair cables are preferable over coaxial cables?
Explain.
CN - UNIT 1 2
Nimra College of Engineering and Technology
Q6. With neat examples explain analog signals & digital signals and
periodic signals and aperiodic signals.
Q8. What is the significance of Twisted-pair cable? What are the different
categories of UTP? Compare.
Q12. Why twisted pair cables are preferable over coaxial cables? Explain.
Unguided Media
Q3. Why we need Unguided media? What are the different Types of Unguided
media? Explain.
Q5. Discuss the major functions performed by the Presentation layer and
Application layer of the ISO -OSI model.
Q10. Why are LANs required and what objectives are achieved by having a
LAN?
Q7. Explain the TCP/IP reference model of computer network with a neat
diagram.
CN - UNIT 1 3
Nimra College of Engineering and Technology
CN - UNIT 1 4
Nimra College of Engineering and Technology
Q1. Define computer networks. Discuss various types of Network Topologies in computer networks.
Discuss various advantages and disadvantages of each topology.
ANSWER
Network Topologies:
1. Star Topology:
Advantages:
Disadvantages:
Diagram:
2. Bus Topology:
Advantages:
Disadvantages:
CN - UNIT 1 5
Nimra College of Engineering and Technology
Diagram:
3. Ring Topology:
Advantages:
Disadvantages:
iagram:
4. Mesh Topology:
Advantages:
Disadvantages:
Diagram:
CN - UNIT 1 6
Nimra College of Engineering and Technology
5. Hybrid Topology:
Advantages:
Disadvantages:
Diagram:
Advantages:
CN - UNIT 1 7
Nimra College of Engineering and Technology
Disadvantages:
ANSWER
The OSI (Open Systems Interconnection) model and the TCP/IP (Transmission
Control Protocol/Internet Protocol) model are both conceptual frameworks used
to understand and standardize the functions of computer networking. While they
serve similar purposes, they have some key differences:
1) Layers:
OSI Model:
TCP/IP Model:
2) Protocols:
OSI Model:
TCP/IP Model:
CN - UNIT 1 8
Nimra College of Engineering and Technology
TCP/IP Model:
4) Standardization:
OSI Model:
TCP/IP Model:
5) Scope:
OSI Model:
TCP/IP Model:
Figure 2.1 : The seven layers of the OSI model Figure 2.2 : TCP / IP model
CN - UNIT 1 9
Nimra College of Engineering and Technology
Q6. With neat examples explain analog signals & digital signals and periodic signals and aperiodic
signals.
ANSWER
Analog Signals:
Example:
Digital Signals:
Example:
Periodic signals:
x(t) = x(t+T)
Where x(t) represents the signal, and T is the period of the signal.
CN - UNIT 1 10
Nimra College of Engineering and Technology
Sine Wave:
Square Wave:
+1 -1
T.
Triangle Wave:
Figure 6.3 : Sine wave Figure 6.4 : Square wave Figure 6.5 : Triangle wave
Aperiodic signals:
Impulse Signal:
Gaussian Noise:
Speech Signal:
CN - UNIT 1 11
Nimra College of Engineering and Technology
Q8. What is the significance of Twisted-pair cable? What are the different categories of UTP?
Compare.
ANSWERS
There are several categories of unshielded twisted-pair (UTP) cables, each with
different specifications and performance levels:
Cat 3:
Cat 5:
Cat 5e:
Cat 6:
Cat 6a:
Cat 7:
ANSWER
CN - UNIT 1 12
Nimra College of Engineering and Technology
o
o
o
o
o
o
CN - UNIT 1 13
Nimra College of Engineering and Technology
Q12. Why twisted pair cables are preferable over coaxial cables? Explain.
ANSWER
Twisted pair cables are often preferred over coaxial cables for several reasons:
1. Cost-effectiveness:
2. Flexibility:
3. Interference reduction:
4. Scalability:
5. Versatility:
6. Ease of termination:
While coaxial cables also have their advantages, such as higher bandwidth
capabilities over longer distances, twisted pair cables often provide a more practical
and cost-effective solution for many networking and communication applications.
Unguided Media
Q3. Why we need Unguided media? What are the different Types of Unguided media? Explain.
CN - UNIT 1 14
Nimra College of Engineering and Technology
ANSWER
Unguided media, also known as wireless media, are essential in modern communication systems for
several reasons:
Mobility:
Flexibility:
Scalability:
Accessibility:
There are several types of unguided media, each with its own characteristics and applications:
Radio Waves:
Microwaves:
Infrared Waves:
Q5. Discuss the major functions performed by the Presentation layer and Application layer of the
ISO -OSI model.
ANSWER
The Presentation layer and Application layer are two crucial components of the OSI (Open Systems
Interconnection) model, each serving distinct but interconnected functions.
Presentation Layer:
The Presentation layer is primarily responsible for ensuring the compatibility of data exchanged
between different systems. It functions as a translator, converting data from the format used by the
application layer into a standardized format that can be transmitted over the network. This layer is also
involved in data compression and encryption, optimizing the efficiency and security of data transmission.
Data Translation:
Data Compression:
CN - UNIT 1 16
Nimra College of Engineering and Technology
Syntax Formatting:
Application Layer:
The Application layer serves as the interface between the user and the network services. It is
responsible for providing network services directly to the user or application software. This layer
encompasses various protocols and services that enable users to access network resources and
communicate with other users or applications.
User Interface:
Network Services:
Protocol Support:
Data Representation:
Q10. Why are LANs required and what objectives are achieved by having a LAN?
ANSWER
Local Area Networks (LANs) are required for several reasons, primarily to
facilitate communication and resource sharing within a localized environment,
such as an office building, school campus, or home. The objectives achieved by
having a LAN include:
Resource Sharing:
Data Transfer:
Communication:
Centralized Management:
Scalability:
Increased Efficiency:
Enhanced Collaboration:
Improved Security:
CN - UNIT 1 18
Nimra College of Engineering and Technology
ANSWER
The TCP/IP (Transmission Control Protocol/Internet Protocol) reference model is a conceptual framework
used for understanding how data is transmitted over a network. It consists of four layers, each responsible
for different aspects of network communication. Here's a brief explanation of each layer along with a
diagram:
Application Layer:
Transport Layer:
TCP provides reliable, connection-oriented communication with error checking and flow
control, while UDP offers faster, connectionless communication without guaranteed
delivery.
Internet Layer:
Link Layer:
Ethernet,
Wi-Fi, and
PPP (Point-to-Point Protocol).
Diagram:
CN - UNIT 1 19
Nimra College of Engineering and Technology
ANSWER
Physical Layer:
CN - UNIT 1 20
Nimra College of Engineering and Technology
Network Layer:
Transport Layer:
Session Layer:
Presentation Layer:
Application Layer:
CN - UNIT 1 22
Nimra College of Engineering and Technology
UNIT - 2
SYLLABUS TO BE COVERED
CN - UNIT 2 24
Nimra College of Engineering and Technology
UNIT - 2
QUESTIONS TO BE COVERED
Q1. Compare the merits and demerits of Stop and Wait Protocol and
Sliding Window Protocol.
i. Go back NARQ.
ii. Selective repeat ARQ.
Q6. Calculate the polynomial checksum for the following frame and
generator.
Q8. Explain how hamming code can be used to correct burst errors.
Q10. What kinds of can Vertical Redundancy check determine? What kinds
of errors it cannot determine?
CN - UNIT 2 25
Nimra College of Engineering and Technology
Q1. Compare the merits and demerits of Stop and Wait Protocol and Sliding Window Protocol.
Q3. Discuss about the following:
i. Go back NARQ.
ii. Selec ve repeat ARQ.
Q7. Explain Sliding window protocols in detail.
Q9. Discuss sliding window protocol using Go back n.
Error Control
Q2. Consider a 32-bit block of data 11100111 11011101 00111001 10101001 that has to be
transmi ed. If Longitudinal Redundancy Check is used what is the transmi ed bit stream?
Q5. What are the various types of error detec on methods?
Q6. Calculate the polynomial checksum for the following frame and generator.
Frame: 110101101 land Generator: x4+x+1
Q8. Explain how hamming code can be used to correct burst errors.
Q10. What kinds of can Ver cal Redundancy check determine? What kinds of errors it cannot
determine?
Multiplexing
CN - UNIT 2 26
Nimra College of Engineering and Technology
Stop-and-Wait Protocol:
Merits:
Simplicity:
Reliable:
Flow Control:
Error Detection:
Demerits:
Low Efficiency:
High Latency:
Limited Throughput:
Merits:
Improved Throughput:
CN - UNIT 2 27
Nimra College of Engineering and Technology
Reduced Latency:
Flow Control:
Demerits:
Complexity:
Higher Overhead:
Synchronization Issues:
Transmission Window:
Cumulative Acknowledgment:
CN - UNIT 2 28
Nimra College of Engineering and Technology
Retransmission:
Efficiency:
Individual Acknowledgment:
Transmission Window:
Retransmission:
Efficiency:
Both Go-Back-N ARQ and Selective Repeat ARQ are widely used in various network protocols, with each having its
advantages and trade-offs in terms of simplicity, efficiency, and reliability in different network conditions.
Sliding Window
i. Go-Back-N ARQ
CN - UNIT 2 30
Nimra College of Engineering and Technology
CN - UNIT 2 31
Nimra College of Engineering and Technology
Sliding window protocol with Go-Back-N (GBN) is a technique used in computer networks to ensure
reliable data transmission between a sender and a receiver. The sliding window protocol allows for multiple
packets to be in transit simultaneously, enhancing network efficiency. Here's how it works:
Window Size:
Sequence Numbers:
Go-Back-N:
Sliding Window:
CN - UNIT 2 32
Nimra College of Engineering and Technology
Sender Operation:
Receiver Operation:
Timeouts:
Error Control
Q2. Consider a 32-bit block of data 11100111 11011101 00111001 10101001 that has to be
transmi ed. If Longitudinal Redundancy Check is used what is the transmi ed bit stream?
ANSWER
1 1 1 0 0 1 1 1
1 1 0 1 1 1 0 1
0 0 1 1 1 0 0 1
1 0 1 0 1 0 0 1
1 0 1 0 1 0 1 0
Error detection methods are techniques used to identify errors or discrepancies in data transmission or
storage. Here are some common types:
Parity Checking:
CN - UNIT 2 33
Nimra College of Engineering and Technology
Checksums:
Hamming Codes:
Q6. Calculate the polynomial checksum for the following frame and generator.
Frame: 110101101 land Generator: x4+x+1
ANSWER
To calculate the polynomial checksum for the given frame using the generator polynomial x4 + x + 1,
we'll perform polynomial long division. Here's how it's done:
o Frame: 110101101110101101
o Generator: 1001110011
o Frame: 110101101000110101101000
Perform polynomial long division:
CN - UNIT 2 34
Nimra College of Engineering and Technology
1010000010100000.
Q8. Explain how hamming code can be used to correct burst errors.
ANSWER
Hamming codes are a type of error-correcting code used in digital communication systems,
including computer networks, to detect and correct errors that may occur during transmission. One of the
advantages of Hamming codes is their ability to correct both single-bit errors and certain types of burst
errors.
Burst errors refer to consecutive bits that are corrupted during transmission, which can occur due to various
factors such as electrical interference or noise in the communication channel. Hamming codes can correct
burst errors by incorporating redundancy into the transmitted data.
Here's a simplified explanation of how Hamming codes work to correct burst errors:
Encoding:
Adding Redundancy:
Error Detection:
Error Correction:
Recovery:
CN - UNIT 2 35
Nimra College of Engineering and Technology
Hamming codes enhance the reliability of communication in computer networks by providing error
detection and correction capabilities, including the correction of burst errors. However, it's important to
note that the effectiveness of Hamming codes in correcting burst errors depends on the specific design
parameters of the code and the characteristics of the communication channel.
Q10. What kinds of can Ver cal Redundancy check determine? What kinds of errors it cannot
determine?
ANSWER
Vertical Redundancy Check is also known as Parity Check. In this method, a redundant bit also called parity
bit is added to each data unit. This method includes even parity and odd parity. Even parity means the total
number of 1s in data is to be even and odd parity means the total number of 1s in data is to be odd.
Example -
Parity generator will count number of 1s in data unit and will add parity bit. In the above example, number
of 1s in data unit is 5, parity generator appends a parity bit 1 to this data unit making the total number of
1s even i.e 6 which is clear from above figure. Data along with parity bit is then transmitted across the
network. In this case, 11001111 will be transmitted. At the destination, this data is passed to parity checker
at the destination. The number of 1s in data is counted by parity checker. If the number of 1s count out to
be odd, e.g. 5 or 7 then destination will come to know that there is some error in the data. The receiver then
rejects such an erroneous data unit.
Advantages :
CN - UNIT 2 36
Nimra College of Engineering and Technology
Disadvantages :
Multiplexing
Q4. Explain in detail about the synchronous me division mul plexing.
ANSWER
Synchronous Time Division Multiplexing (TDM) is a method of transmitting multiple signals
simultaneously over a single communication channel by dividing the channel into discrete time slots. Each
signal is allocated a specific time slot, and these time slots are arranged in a sequential manner.
Synchronous TDM ensures that each signal is transmitted in a synchronized manner, allowing for efficient
multiplexing and demultiplexing of data.
Channel Division:
Signal Sampling:
CN - UNIT 2 37
Nimra College of Engineering and Technology
Multiplexing:
Transmission:
Demultiplexing:
Reconstruction:
Synchronization:
Efficiency:
Low Latency:
Simple Implementation:
A Token Ring LAN (Local Area Network) operates on a ring topology where each device in the
network is connected to two neighboring devices, forming a closed loop or ring. The key concept behind
Token Ring is the passing of a token, a special control frame, around the network to regulate access to the
shared communication medium.
Token Passing:
Access Control:
Frame Format:
Fault Tolerance:
Performance:
CN - UNIT 2 39
Nimra College of Engineering and Technology
Note: The time taken by a single bit to travel around the ring is known as ring latency.
Where,
d = length of the ring
v = velocity of data in ring
N = no. of stations in ring
b = time taken by e
CN - UNIT 2 40
Nimra College of Engineering and Technology
UNIT - 3
SYLLABUS TO BE COVERED
CN - UNIT 3 42
Nimra College of Engineering and Technology
UNIT - 3
QUESTIONS TO BE COVERED
Q2. What is Dynamic Channel Allocation? What are the assumptions for
Dynamic Channel Allocation?
Q5. What is pure ALOHA and slotted ALOHA? Consider the delay of both at
low load, which one is less? Explain your answer.
Q7. Explain the frame format, operation and ring maintenance feature of
IEEE 802.5 MAC protocol.
Q9. Describe the working principle of Carrier sense multiple access with
collision Detection (CSMA/CD).
CN - UNIT 3 43
Nimra College of Engineering and Technology
Q1. Explain about the Carrier Sense Mul ple Access Protocols.
Q9. Describe the working principle of Carrier sense mul ple access with collision
Detec on (CSMA/CD).
Q2. What is Dynamic Channel Alloca on? What are the assump ons for Dynamic Channel
Alloca on?
Ethernet
Q3. What is fast Ethernet, gigabit Ethernet and 10 gigabit Ethernet? Compare them.
Q11. What are the common Ethernet Implementa ons? Explain them.
ALOHA Protocols
Q5. What is pure ALOHA and slo ed ALOHA? Consider the delay of both at low load,
which one is less? Explain your answer.
Q10. Dis nguish between pure ALOHA and slo ed ALOHA.
Q7. Explain the frame format, opera on and ring maintenance feature of IEEE 802.5 MAC
protocol.
CN - UNIT 3 44
Nimra College of Engineering and Technology
Q1. Explain about the Carrier Sense Mul ple Access Protocols.
ANSWER
CSMA
CAMA/CA
Carrier Sense Multiple Access (CSMA) protocols are a class of methods used in computer networks to
regulate how multiple devices share a communication medium, such as a cable or wireless spectrum. The
fundamental principle behind CSMA protocols is that before transmitting data, a device listens to the
communication medium to detect whether it's currently in use by another device. If the medium is busy, the
device waits for a clear window before attempting to transmit its data.
CSMA:
CSMA protocols are efficient in regulating access to shared communication mediums and are widely used in
various networking technologies to ensure fair and reliable data transmission. However, they may suffer from
inefficiencies in highly congested or noisy environments, leading to increased latency and reduced throughput.
Q9. Describe the working principle of Carrier sense mul ple access with collision Detec on
(CSMA/CD).
CN - UNIT 3 45
Nimra College of Engineering and Technology
ANSWER
Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a network protocol used in Ethernet
networks to manage how devices access the shared communication medium (such as a coaxial cable or a
twisted pair cable). The protocol ensures efficient and fair transmission of data among multiple devices
connected to the same network segment. Here's how it works:
Carrier Sense:
Multiple Access:
Collision Detection:
Exponential Backoff:
The primary goal of Dynamic Channel Allocation is to efficiently utilize the available spectrum
resources while meeting the quality of service (QoS) requirements of users. This is achieved by dynamically
CN - UNIT 3 46
Nimra College of Engineering and Technology
assigning channels to users based on factors such as channel availability, signal strength, interference levels,
traffic load, and user priority.
Real-time Monitoring:
Interference Management:
Ethernet
Q3. What is fast Ethernet, gigabit Ethernet and 10 gigabit Ethernet? Compare them.
ANSWER
Fast Ethernet, Gigabit Ethernet, and 10 Gigabit Ethernet are three different standards of Ethernet
technology, each offering varying speeds and capabilities. Here's a comparison of these three:
Fast Ethernet:
Gigabit Ethernet:
CN - UNIT 3 47
Nimra College of Engineering and Technology
10 Gigabit Ethernet:
Typical Use
Q11. What are the common Ethernet Implementa ons? Explain them.
ANSWER
Common Ethernet implementations refer to the various standards and technologies used to transmit data
over Ethernet networks. These implementations define the physical and data link layers of the OSI model,
ensuring compatibility and interoperability among different networking devices. Here are some of the most
common Ethernet implementations:
Ethernet (10BASE-T):
CN - UNIT 3 48
Nimra College of Engineering and Technology
The 802.11 architecture, commonly known as Wi-Fi, is a set of protocols for wireless local area
networking (WLAN) developed by the Institute of Electrical and Electronics Engineers (IEEE). It defines the
standards for wireless communication in various frequency bands including 2.4 GHz and 5 GHz.
CN - UNIT 3 49
Nimra College of Engineering and Technology
CN - UNIT 3 50
Nimra College of Engineering and Technology
The Medium Access Control (MAC) layer in the IEEE 802.11 standard plays a crucial role in managing access
to the wireless medium and ensuring efficient communication among devices within a wireless network.
Here are the key functions of the MAC layer in IEEE 802.11:
Channel Access:
Frame Management:
Power Management:
Frame Acknowledgment:
Error Handling:
CN - UNIT 3 51
Nimra College of Engineering and Technology
Coverage:
Bandwidth:
Security:
Scalability:
Interference Mitigation:
Roaming Support:
ALOHA Protocols
Q5. What is pure ALOHA and slo ed ALOHA? Consider the delay of both at low load, which one is
less? Explain your answer.
ANSWER
Pure ALOHA and Slotted ALOHA are both multiple access protocols used in data communication systems,
particularly in the context of shared communication channels. They were developed to manage the
transmission of data from multiple users or stations accessing the channel simultaneously.
CN - UNIT 3 52
Nimra College of Engineering and Technology
Pure ALOHA:
Slotted ALOHA:
At low loads, there are fewer stations attempting to transmit data, resulting in less congestion and lower
chances of collisions. In this scenario:
Pure ALOHA:
Slotted ALOHA:
CN - UNIT 3 53
Nimra College of Engineering and Technology
Time
Vulnerable
time
Probability
𝑆 =𝐺×𝑒 𝑆 =𝐺×𝑒
Maximum
efficiency
Number of
collisions
IEEE 802.5 is a standard for token ring networks, defining the Media Access Control (MAC) protocol for
these networks. Here's an explanation of the frame format, operation, and ring maintenance feature of IEEE
802.5:
1. Frame Format:
Starting Delimiter (SD):
Access Control (AC):
Controlled access protocols are used in computer networks to regulate the access of devices to the network
medium in an orderly manner. These protocols ensure that only one device can transmit data at a time,
thereby preventing collisions and maintaining efficient communication. Here are some of the main
controlled access protocols:
2. Token Passing:
CN - UNIT 3 55
Nimra College of Engineering and Technology
3. Reservation-based Protocols:
4. Polling:
5. Priority-based Protocols:
6. Round Robin:
7. Controlled Access with Reservation:
CN - UNIT 3 56
Nimra College of Engineering and Technology
UNIT - 4
SYLLABUS TO BE COVERED
Internet Working:
How networks differ- How networks can be connected- Tunneling, internetwork
routing-, Fragmentation, network layer in the internet – IP protocols-IP Version 4
protocol-, IP addresses-, Subnets-IP Version 6-The main IPV6 header- Internet control
protocols- ICMP-ARP-DHCP
CN - UNIT 4 56
Nimra College of Engineering and Technology
UNIT - 4
QUESTIONS TO BE COVERED
i. Hierarchical Routing
ii. Internet control protocols
Q11. Mention the limitations of Distance vector and Link state routing
algorithm.
CN - UNIT 4 57
Nimra College of Engineering and Technology
Routing Algorithms
Internet Working
CN - UNIT 4 58
Nimra College of Engineering and Technology
Connection-oriented services are implemented using protocols and algorithms designed to establish,
maintain, and terminate reliable communication channels between networked devices. These services
ensure data delivery with guaranteed order and integrity, typically through a combination of mechanisms
such as acknowledgment, sequencing, and error detection/correction. Here's how it's typically
implemented:
Connection Establishment:
Flow Control:
Connection Termination:
CN - UNIT 4 59
Nimra College of Engineering and Technology
The network layer, also known as Layer 3 in the OSI model, plays a crucial role in the process of data
communication by providing logical addressing, routing, and forwarding functions. Several design issues
need to be considered when designing a network layer protocol.
Addressing:
Routing:
Forwarding:
Scalability:
Interoperability:
Security:
CN - UNIT 4 60
Nimra College of Engineering and Technology
Congestion prevention policies are crucial in computer networks to ensure efficient and reliable data
transmission. Congestion occurs when the demand for network resources exceeds the available capacity,
leading to degraded performance, packet loss, and increased latency.
Traffic shaping:
Load balancing:
CN - UNIT 4 61
Nimra College of Engineering and Technology
Capacity planning:
Encapsulation:
Protocol Stacks:
Tunneling Protocols:
CN - UNIT 4 62
Nimra College of Engineering and Technology
Use Cases:
Q11. Men on the limita ons of Distance vector and Link state rou ng algorithm.
ANSWER
Distance Vector Routing:
Count-to-Infinity Problem:
Slow Convergence:
CN - UNIT 4 63
Nimra College of Engineering and Technology
Routing Loops:
Scalability:
Resource Consumption:
Initial Flooding:
Vulnerability to Attacks:
Routing Algorithms
Q4. With an example, explain the distance vector rou ng.
ANSWER
How Distance Vector Routing Protocol Works :
The Distance Vector Routing protocol follows these basic steps:
1. Initialization:
CN - UNIT 4 64
Nimra College of Engineering and Technology
5. Periodic updates:
6. Convergence:
In the network shown below, there are three routers, A, C, and D, with the following weights − AC
=8, CD =4, and DA =3.
Step 1 − Each router in this DVR(Distance Vector Routing) network shares its routing table with
every neighbor. For example, A will share its routing table with neighbors C and D, and neighbors
C and D will share their routing table with A.
CN - UNIT 4 65
Nimra College of Engineering and Technology
Step 2 − If the path via a neighbor is less expensive, the router adjusts its local table to send
packets to the neighbor. In this table, the router updates the lower cost for A and C by updating
the new weight from 8 to 7 in router A and from 8 to 7 in router C.
Step 3 − The final revised routing table with the reduced cost distance vector routing protocol for
all routers A, C, and D is shown below-
CN - UNIT 4 66
Nimra College of Engineering and Technology
ANSWER
Selecting flooding and flooding are both techniques used in networking, particularly in the context of
routing in computer networks. Here's how they differ:
Flooding:
Selective Flooding:
Conclusion:
Internet Working
Q1. Explain about The IP Version 4 Protocol.
ANSWER
Internet Protocol version 4 (IPv4) is a fundamental protocol used for communication on the internet. It's the
fourth version in the Internet Protocol (IP) family and is widely deployed across the globe. IPv4 provides the
framework for addressing and routing packets of data so that they can travel across networks and reach
their intended destinations.
Addressing:
CN - UNIT 4 67
Nimra College of Engineering and Technology
Packet Structure:
Routing:
Subnetting:
Network Classes:
Address Exhaustion:
ICMP stands for Internet Control Message Protocol. It is a protocol used in the Internet Protocol (IP) suite to
report errors and exchange control messages. ICMP is primarily used by network devices, like routers, to
communicate error messages or informational messages to other devices in the network.
Error Reporting:
CN - UNIT 4 68
Nimra College of Engineering and Technology
Ping:
Network Troubleshooting:
Router Discovery:
Type (8-bit):
Code (8-bit):
Checksum (16-bit):
CN - UNIT 4 69
Nimra College of Engineering and Technology
The next 32 bits of the ICMP Header are Extended Header which has the work of pointing out the problem in
IP Message. Byte locations are identified by the pointer which causes the problem message and receiving
device looks here for pointing to the problem.
The last part of the ICMP packet is Data or Payload of variable length. The bytes included in IPv4 are 576
bytes and in IPv6, 1280 bytes.
i. Hierarchical Rou ng
ii. Internet control protocols
ANSWER
i. Hierarchical Routing:
Internet Control Protocols (ICPs) are a set of protocols and standards used to manage and control
various aspects of internet infrastructure and operations. These protocols play a crucial role in ensuring
the smooth and efficient functioning of the internet by facilitating tasks such as routing management,
network monitoring, and resource allocation.
CN - UNIT 4 70
Nimra College of Engineering and Technology
Investment in Infrastructure:
CN - UNIT 4 71
Nimra College of Engineering and Technology
Parking Management:
CN - UNIT 4 72
Nimra College of Engineering and Technology
UNIT - 5
SYLLABUS TO BE COVERED
Application Layer
World Wide Web:
CN - UNIT 5 73
Nimra College of Engineering and Technology
UNIT - 5
QUESTIONS TO BE COVERED
Q5. What are the properties of HTTP? What are the four groups of HTTP
header? Explain.
Q7. Explain the TCP header and working of the TCP protocol.
Q8. Discuss how simple mail transfer protocol (SMTP) works? Can
multimedia messages be transmitted using SMTP? Discuss.
Q9. What are the functions of transport layer? State transport service
primitives.
Q11. Give the format of the UDP segment and TCP segment? Explain when
UDP is preferred to TCP.
CN - UNIT 5 74
Nimra College of Engineering and Technology
Transport Layer
Q7. Explain the TCP header and working of the TCP protocol.
CN - UNIT 5 75
Nimra College of Engineering and Technology
Transport Layer
Q1. Explain the du es of Transport layer.
ANSWER
The Transport layer in the OSI (Open Systems Interconnection) model is responsible for facilitating
communication between devices across a network. It ensures that data is reliably transmitted from the
source to the destination, regardless of the underlying network infrastructure.
End-to-End Communication:
Flow Control:
Congestion Control:
Port Addressing:
CN - UNIT 5 76
Nimra College of Engineering and Technology
Q9. What are the func ons of transport layer? State transport service primi ves.
ANSWER
The transport layer in a computer network plays a crucial role in ensuring reliable and efficient
communication between hosts. Its primary functions include:
End-to-End Connection:
Flow Control:
Error Control:
The transport service primitives define the interface between the transport layer and the upper layers
(session, presentation, and application).
Connect:
Disconnect:
Send:
Receive:
CN - UNIT 5 77
Nimra College of Engineering and Technology
UDP (User Datagram Protocol) is a connectionless protocol in the Internet Protocol suite. Unlike TCP
(Transmission Control Protocol), UDP does not establish a direct connection before sending data, nor does
it ensure delivery or guarantee the order of packets. Despite these limitations, UDP finds numerous
applications due to its simplicity, low overhead, and real-time capabilities.
Streaming Media:
Online Gaming:
CN - UNIT 5 78
Nimra College of Engineering and Technology
Conclusion:
TCP (Transmission Control Protocol) is a core protocol of the Internet Protocol Suite, responsible for
ensuring reliable and ordered delivery of data packets over networks. It operates at the transport layer of the
OSI model and provides a connection-oriented, point-to-point communication service between hosts.
The TCP header consists of various fields, each serving a specific purpose in facilitating communication
between sender and receiver.
CN - UNIT 5 79
Nimra College of Engineering and Technology
Reserved (6 bits):
Flags (6 bits):
PSH (Push):
RST (Reset):
SYN (Synchronize):
FIN (Finish):
Window Size (16 bits):
Options (Variable):
Padding (Variable):
Connection Establishment:
Data Transfer:
Connection Termination:
Error Handling:
CN - UNIT 5 80
Nimra College of Engineering and Technology
HyperText Transfer Protocol (HTTP) and File Transfer Protocol(FTP) are the protocols used
for file transfer between client and server. There is a lot of difference between FTP and
HTTP. In this article, we will learn what are the differences between HTTP and FTP.
CN - UNIT 5 81
Nimra College of Engineering and Technology
Q5. What are the proper es of HTTP? What are the four groups of HTTP header? Explain.
ANSWER
HTTP (Hypertext Transfer Protocol) is the foundation of data communication on the World Wide Web. It is
a protocol that defines how messages are formatted and transmitted, and how web servers and browsers
should respond to various commands.
Properties of HTTP:
Statelessness:
Connectionless:
CN - UNIT 5 82
Nimra College of Engineering and Technology
Text-based:
Flexibility:
HTTP headers are components of HTTP messages that provide additional information about the request or
response. They are key-value pairs separated by a colon, with the key and value separated by whitespace.
General headers: These headers provide general information about the message, such as the date
and time of the message and the protocol version being used.
Examples include:
Date
Cache-Control
Connection
Via
Request headers: These headers provide additional information about the client's request, such as
the type of browser being used, the preferred language of the user, or authentication credentials.
Examples include:
User-Agent
Accept
Authorization
Host
Response headers: These headers provide additional information about the server's response, such
as the content type of the response, the server software being used, or caching directives.
Examples include:
Content-Type
Server
Content-Length
Last-Modified
Entity headers: These headers provide information about the body of the message, such as the
content length or encoding. They are only present in messages that have a body, such as POST
requests or responses with content.
Examples include:
Content-Length
Content-Encoding
Content-Disposition
Content-Language
CN - UNIT 5 83
Nimra College of Engineering and Technology
An email system consists of several key components that work together to facilitate the sending, receiving,
and management of electronic messages.
Here's an overview of the architecture and services typically involved in an email system:
Exchange ActiveSync:
CN - UNIT 5 84
Nimra College of Engineering and Technology
Q8. Discuss how simple mail transfer protocol (SMTP) works? Can mul media messages be
transmi ed using SMTP? Discuss.
ANSWER
Simple Mail Transfer Protocol (SMTP) is a communication protocol used for sending email messages
between servers. It works on the application layer of the TCP/IP protocol suite. SMTP facilitates the transfer
of emails from a sender's email client or server to the recipient's email server.
Establishing Connection:
Handshake:
Sender Verification:
Recipient Verification:
Message Transfer:
CN - UNIT 5 85
Nimra College of Engineering and Technology
Delivery to Recipient:
SMTP was primarily designed for sending text-based email messages, and it does not natively support
multimedia content such as images, audio files, or videos. However, multimedia content can still be
transmitted via email using MIME (Multipurpose Internet Mail Extensions) within the SMTP framework.
MIME allows email messages to contain various types of data, including text, images, audio, video, and
other multimedia content. When sending a multimedia message, the content is encoded using MIME, and
then the encoded data is transmitted via SMTP.
Here's how multimedia messages are transmitted using SMTP and MIME:
Content Encoding:
Message Composition:
SMTP Transmission:
Recipient Delivery:
DNS, or Domain Name System, is a fundamental component of the internet infrastructure that translates
human-readable domain names into IP addresses, allowing computers to locate and connect to websites,
servers, and other resources on the internet.
Domain Names:
CN - UNIT 5 86
Nimra College of Engineering and Technology
Authoritative Nameservers:
Recursive Resolver:
DNS Records:
Working of DNS:
The Domain Name System (DNS) plays a pivotal role in the application layer of the internet. Its significance
lies in translating human-readable domain names (like "example.com") into machine-readable IP addresses
(such as "192.0.2.1").
CN - UNIT 5 87
Nimra College of Engineering and Technology
Human-Readable Addresses:
Global Accessibility:
Scalability:
Name Resolution:
Caching:
Security:
Service Discovery:
CN - UNIT 5 88
Nimra College of Engineering and Technology
Client-Server Interaction:
Authentication:
File Transfer:
Data Connection:
Modes of FTP:
Security:
CN - UNIT 5 89
Nimra College of Engineering and Technology
Diagram:
CN - UNIT 5 90