0% found this document useful (0 votes)
4 views33 pages

CN_QP_DEC2023

The document outlines the syllabus and examination structure for a B.Tech course in Computer Networks at APJ Abdul Kalam Technological University. It includes various topics such as connection-oriented vs connection-less services, bandwidth-delay product, CSMA techniques, routing vs forwarding, and network topologies. Additionally, it covers transport service primitives, DNS query resolution, and Quality of Service techniques, along with specific questions for students to answer in the examination.
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)
4 views33 pages

CN_QP_DEC2023

The document outlines the syllabus and examination structure for a B.Tech course in Computer Networks at APJ Abdul Kalam Technological University. It includes various topics such as connection-oriented vs connection-less services, bandwidth-delay product, CSMA techniques, routing vs forwarding, and network topologies. Additionally, it covers transport service primitives, DNS query resolution, and Quality of Service techniques, along with specific questions for students to answer in the examination.
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/ 33

B 1100CST303122101

Reg No.:_______________ Name:__________________________

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY


B.Tech Degree S5 (R, S) / S3 (PT) (R, S) Examination December 2023
Course Code: CST 303
Course Name: COMPUTER NETWORKS
Max. Marks: 100 Duration Duration: 3 Hours
PART A
(Answer all questions; each question carries 3 marks)

1. Differentiate between connection-oriented and connection-less services.


Connection-Oriented Services:
Similar to telephone service
•to use a connection-oriented network service, the service user
•establishes a connection,
•uses the connection, and
•releases the connection
Acts like a tube
• The sender pushes objects (bits) in at one end, and the receiver takes them out at the
other end
•the order is preserved so that the bits arrive in the order they were sent
•When a connection is established, the sender, receiver, and subnet conduct a negotiation
about parameters to be used, such as
•maximum message size,
•quality of service
•error rates,
•bandwidth,
•throughput,
•transmission delay,
•jitter,
•Availability
Typically, one side makes a proposal and the other side can accept it, reject it, or
make a counterproposal
•Classifications: Reliable & Unreliable
• Each service can be characterized by a quality of service
•Some services are reliable in that they never lose data.

Connection-less services

•Similar to the postal system


•Each message (letter) carries the full destination address
•Each one is routed through the system independently of all the others
•Connectionless service is often called datagram service
•Unreliable (meaning not acknowledged) datagram service
•does not return an acknowledgment to the sender. Eg: junk mails
2 . Define bandwidth-delay product with example.
Bandwidth-Delay Product (BDP):
The Bandwidth-Delay Product (BDP) is a measure of the amount of data that can be in
transit in a network at any given time. It is calculated as the product of the network's
bandwidth (in bits per second) and the round-trip time (RTT, in seconds).

Formula:

BDP=Bandwidth×RTT
Significance:
The BDP determines the maximum amount of data that can be "in flight" (unacknowledged)
in the network. For optimal throughput, the sender's transmission window size (e.g., TCP
window size) should be at least equal to the BDP.

Example:

Let’s assume:

● Bandwidth = 100 Mbps=100×106 bits/sec100


● RTT = 50 ms=0.05 sec

BDP Calculation:

BDP=100×106 bits/sec×0.05 sec=5×106 bits=5 Mb

Interpretation:
In this example, a maximum of 5 megabits of data can be in transit in the network at any
moment. To fully utilize the network capacity, the sender should have a TCP window size of
at least 5 Mb.

Real-Life Example:

● Scenario: A file is being uploaded to a remote server over a high-speed network with
a high RTT, such as a satellite link.
● If the BDP is large (high bandwidth and/or RTT), the sender must ensure its sending
window is large enough to keep the link fully utilized. Otherwise, the connection will
be underutilized.

3. Differentiate between 1-persistent and p-persistent CSMA.

1-Persistent CSMA:

● A station senses the channel and transmits immediately if it is idle, with 100%
probability (fully persistent).
● This can lead to collisions if multiple stations sense the idle channel simultaneously.

p-Persistent CSMA:
● A station senses the channel and transmits with a probability ppp if the channel is
idle; if not, it waits and retries in the next time slot.
● Reduces the chance of collisions compared to 1-persistent CSMA by introducing
randomness in transmission.

4 Assuming even parity, find the parity bit for each of the following data:
i. 1011010 ii. 000000 iii. 10010001

i. Data: 1011010

● Number of 1's: 444 (even).


● Parity bit: 0 (already even).

ii. Data: 000000

● Number of 1's: 000 (even).


● Parity bit: 0 (already even).

iii. Data: 10010001

● Number of 1's: 333 (odd).


● Parity bit: 1 (to make it even).

5. Distinguish between routing and forwarding.

Routing:

● Definition: The process of determining the optimal path for data to travel from
source to destination across a network.
● Example: A router uses the OSPF (Open Shortest Path First) protocol to determine
the best path for sending data from New York to Los Angeles, choosing a route with
the least congestion.

Forwarding:

● Definition: The process of moving packets from the router’s input interface to the
appropriate output interface based on routing decisions.
● Example: A router receives a packet destined for IP address 192.168.1.10 and
forwards it to the next-hop router based on its routing table entry.

6. Describe any two techniques for achieving good Quality of Service.

1. Traffic Shaping (Policing):

● Traffic shaping controls the rate at which data packets are sent into the network to
ensure they conform to a specified bandwidth profile.
● It smoothens traffic bursts, reduces congestion, and prioritizes critical data flows.
● Example: The Token Bucket algorithm allows limited bursts of traffic while
maintaining a steady average rate.

2. Priority Queuing:

● Priority queuing assigns higher priority to specific types of traffic (e.g., voice or video)
to ensure they are transmitted with minimal delay.
● Packets in higher-priority queues are always sent before those in lower-priority
queues.
● Example: VoIP packets are prioritized over general web browsing traffic to maintain
call quality.

7. Write notes on internet multicasting.


Internet Multicasting
• Internet multicasting is a communication method where data is sent from one source to
multiple destinations simultaneously using a single transmission.
• A multicast packet starts from the source S1 and goes to all destinations that belong to
group G1. In multicasting, when a router receives a packet, it may forward it through several
of its interfaces.
• eg. IGMP (Internet Group Management Protocol)

8. List the IP address ranges and subnet masks of class A, class B and class C.
Class A:
● IP Range: 1.0.0.0 to 126.0.0.0
● Default Subnet Mask: 255.0.0.0
Class B:
● IP Range: 128.0.0.0 to 191.255.0.0
● Default Subnet Mask: 255.255.0.0
Class C:
● IP Range: 192.0.0.0 to 223.255.255.0
● Default Subnet Mask: 255.255.255.0

9. List the transport service primitives. (Write any three)


● LISTEN: Waits for an incoming connection request from a remote device, typically
used by a server to listen for client connections.
● CONNECT: Initiates a connection request to a remote device, used by a client to
connect to a server.
● SEND: Sends data over an established connection to the remote device
● RECEIVE: Receives incoming data from the remote device over an established
connection.
● DISCONNECT: Terminates the connection between devices, signaling the end of
communication.

10. How recursive query resolution is performed in DNS?


● Client Request: The user’s computer asks the DNS resolver (a DNS server) to find the
IP address of a domain (like example.com).
● Recursive Search: The DNS resolver does all the searching, going through several
DNS servers (starting from the top-level) until it finds the right IP address.
● Answer Back: The DNS resolver sends the final IP address back to the user’s
computer, completing the request without needing more questions from the user’s
side.
PART B
(Answer one full question from each module, each question)
Module -1
11 a) Write the functions of data link and network layer of OSI reference model.
b) Explain the various physical topologies with neat sketches.
a) Data link Layer
•Main task: Error Control
•to transform a raw transmission facility into a line that appears free of undetected
transmission errors to the network layer
•sender break up the input data into data frames (typically a few hundred or a few thousand
bytes) and transmit the frames sequentially
•If the service is reliable, the receiver confirms correct receipt of each frame by sending
back an acknowledgement frame
•Another Issue: Flow control
•how to keep a fast transmitter from drowning a slow receiver in data
•traffic regulation mechanism is often needed to let the transmitter know how much buffer
space the receiver has
•Additional issue in broadcast networks:
•how to control access to the shared channel
•Data link layer is subdivided into 2 for this purpose
•Logical Link Control (LLC) sub layer
•Medium Access Control (MAC) sub layer
•MAC handles the broadcast networks
Network Layer
•controls the operation of the subnet
•design issues
•determining how packets are routed from source to destination
•Routes
•can be based on static tables that are fixed into the network and are rarely changed
•can be highly dynamic, being determined anew for each packet, to reflect the current
network load
•can also be determined at the start of each conversation (e.g., a login to a remote machine)
•Congestion control
•If too many packets are present in the subnet at the same time, they will get in one
another's way creating congestion
•Providing QoS
•transit time, delay, jitter, error rate, bandwidth, availability, throughput, etc
•to allow heterogeneous networks (different addressing, protocols, message size, etc) to be
interconnected
•In broadcast networks, the routing problem is simple
•so the network layer is often thin or even nonexistent
b) •The term physical topology refers to the way in which a network is laid out
physically.
•Two or more devices connect to a link; two or more links form a topology.

Mesh Topology
● In a mesh topology, every device has a dedicated point-to-point link to every other
device.
● The term dedicated means that the link carries traffic only between the two devices
it connects.
● How to find the number of physical links in a fully connected mesh network with n
nodes?
● n node connected by n-1links
○ n(n-1)
○ n(n-1)/2duplex-mode link
Advantages:
1.Each connection can carry its own data load.
2. It is robust.
3. Privacy and security
4. Fault is diagnosed easily.
Disadvantages:
1.Installation and configuration is difficult.
2. Hardware to connect each link (I/O port and Cable), cost is more.
3. Bulk wiring is required.
Star Topology
● In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub.
● The devices are not directly linked to one another.
● Unlike a mesh topology, a star topology does not allow direct traffic between
devices.
● The controller acts as an exchange: If one device wants to send data to another, it
sends the data to the controller, which then relays the data to the other connected
device.

Advantages:
1. Easy to setup and modify. Hub can be upgraded easily.
2. Less cabling required
3. Robust. Only that node is affected which has failed, rest of the nodes can work smoothly.
Easy to troubleshoot.
4. Fast performance with few nodes and low network traffic.
Disadvantages:
1. Dependency on one point- If the hub fails then the whole network is stopped because all
the nodes depend on the hub.
2. Cost of installation is less expensive than mesh but each node must be linked to a central
hub. For this reason,often more cabling is required in a star than in some other topologies.
Bus Topology
•The preceding examples were point-to-point connections.A bus topology, on the other
hand,is multipoint.
•One long cable acts as a backbone to link all the devices in a network.
•Nodes are connected to the bus cable by drop lines and taps.
•A drop line is a connection running between the device and the main cable.
•A tap is a connector that either splices into the main cable or punctures the sheathing of a
cable to create a contact with the metallic core.

Advantages:
1. It is cost effective.
2. Cable required is least compared to other network topology.
3. Used in small networks.
Disadvantages:
1. Difficult reconnection and fault isolation. A bus is usually designed to be optimally
efficient at installation.It can therefore be difficult to add new devices.
2. Signal reflection at the taps can cause degradation in quality.Ifnetworktrafficisheavyor
nodes are more the performance of the network decreases.
3. Cables fails then whole network fails.
4. Cable has a limited length.
Ring Topology
● Each device has a dedicated point-to-point connection with only the two devices on
either side of it.
● A signal is passed along the ring in one direction, from device to device, until it
reaches its destination.
● Each device in the ring incorporates a repeater.
● When a device receives a signal intended for another device, its repeater regenerates
the bits and passes them along
Advantages:
1. Relatively easy to install and reconfigure.
To add or delete a device requires changing only two connections.
2. Fault isolation is simplified.
Disadvantages:
1. Uni-directional traffic can be a disadvantage. In a simple ring, a break in the ring(such
as a disabled station) can disable the entire network.
This weakness can be solved by using a dual ring or a switch capable of closing off the break.
Hybrid Topology
● A network can be hybrid. For example, we can have a main star topology with each
branch connecting several stations in a bus topology.

12. a) How computer networks are categorized based on scale? Explain the features of
each network.
b) Differentiate between Manchester encoding and Differential Manchester encoding
with suitable example.
a) Based on Scale
•Personal Area Networks
● Networks that are meant for one person
● Eg: a wireless network connecting a computer with its mouse,
keyboard, and printer
•Local Area Networks
● Generally called as LANs
● Privately owned networks
● Inter-processor distance:10m to 1km
● Networks placed in a single room or building or campus
● LANs are distinguished by 3 characteristics –
Size
● Worst-case transmission time is bounded and known in advance.
● Knowing this bound makes it possible to use certain kinds of designs
● Simplifies Network management
Transmission Technology
● consist of a single cable to which all the machines are attached.
● Traditional LAN runs at speed of 10 to 100 Mbps
● Newer LANs operate at 10 Gbps
● Low delay
● Makes very few errors
Topology
● 2 broadcast network types:
○ Bus & Ring
•Metropolitan Area Networks
● A metropolitan area network based on cable TV in a city.
● Another eg: IEEE 802.16 (Broadband wireless MANs) for high-speed
wireless Internet access 30
•Wide Area Networks
•WAN spans a large geographical area, often a country or continent
•It contains a collection of machines called hosts intended for running user
(i.e., application) programs
•The hosts are owned by the customers
•The hosts are connected by a communication subnet, or just subnet
•The communication subnet is typically owned and operated by a telephone
company or Internet service provider
•The job of the subnet is to carry messages from host to host, just as the
telephone system carries words from speaker to listener
•Internetworks or Internet
b)

Feature Manchester Encoding Differential Manchester Encoding

Encoding Rule Transitions occur at the Always a transition at the middle of


middle of each bit: each bit; additional transition at the
High-to-Low for 1, start indicates 0. No transition at start
Low-to-High for 0. indicates 1.

Transition Depends on the data bit. Depends on the previous bit and the
Dependence data bit.

Clock Self-synchronizing due to Self-synchronizing but more complex


Synchronization transitions in the middle of due to dependency on previous bits.
bits.

Example for High-to-Low, Low-to-High, Transition at the middle for each bit;
"1010" High-to-Low, Low-to-High initial state transition only for 0s.
(alternating transitions).

Complexity Simpler to implement. Slightly more complex due to


differential dependency.

Manchester Encoding
In this Manchester encoding, 0 is represented as high-to-low and 1 is represented as
low-to-high.

Differential Manchester Encoding


In Differential Manchester Encoding 0 should contain an edge but 1 should not contain any
edge it should be continuous.

Module -2
13 a) Explain the various framing methods used in data link layer.
1. Character count.
● Uses a field in the header to specify the number of characters in the frame
● When the DLL at the destination sees the character count, it knows how many
characters follow and hence where the end of the frame is
● Eg: A character stream. (a) Without errors. (b) With one error.

Problem with this algorithm


● Count can be garbled by a transmission error
● Eg: If the character count of 5 in the second frame becomes a 7, the destination will
get out of synchronization
● destination will be unable to locate the start of the next frame even if the checksum
is incorrect
● destination does not know how many characters to skip over to get to the start of
the retransmission
● So, character count method is rarely used.
2. Flag bytes with byte stuffing.
● Solves the problem of resynchronization after an error by having each frame start
and end with special bytes
● Earlier, the starting and ending bytes were different
● Now, most protocols have used the same byte, called a FLAG byte, as both the
starting and ending delimiter.
● if the receiver ever loses synchronization, it can just search for the flag byte to find
the end of the current frame.
● Two consecutive flag bytes indicate the end of one frame and start of the next one

(a) A frame delimited by flag bytes.


(b) Four examples of byte sequences before and after stuffing.

Problem with this method:


● when binary data, such as object programs or floating-point numbers, are being
transmitted.
● It may easily happen that the flag byte's bit pattern occurs in the data
● Solution:
● Sender's DLL insert a special escape byte (ESC) just before each ''accidental'' flag byte
in the data.
● The DLL on the receiving end removes the escape byte before the data are given to
the network layer.
● This technique is called byte stuffing or character stuffing.
● Thus, a framing flag byte can be distinguished from one in the data by the absence or
presence of an escape byte before it
3. Starting and ending flags, with bit stuffing.
● a new technique developed to allow arbitrary sized characters
● allows data frames to contain an arbitrary number of bits &
● allows character codes with an arbitrary number of bits per character
● Each frame begins and ends with a special bit pattern, 01111110 (in fact, a flag byte).
● Whenever the sender's DLL encounters 5 consecutive 1s in the data, it automatically
stuffs a 0 bit into the outgoing bit stream.
● This bit stuffing is analogous to byte stuffing, in which an escape byte is stuffed into
the outgoing character stream before a flag byte in the data
● When the receiver sees 5 consecutive incoming 1 bits, followed by a 0 bit, it
automatically destuffs (i.e., deletes) the 0 bit.
● Just as byte stuffing, bit stuffing is completely transparent to the network layer in
both computers
● If the user data contain the flag pattern, 01111110, this flag is transmitted as
011111010 but stored in the receiver's memory as 01111110.
● With bit stuffing, the boundary between two frames can be unambiguously
recognized by the flag pattern.
● Thus, if the receiver loses track of where it is, all it has to do is scan the input for flag
sequences, since they can only occur at frame boundaries and never within the data

Bit stuffing
(a) The original data.
(b) The data as they appear on the transmission line.
(c) The data as they are stored in receiver’s memory after destuffing.
4. Physical layer coding violations.
● Applicable to networks in which the encoding on the physical medium contains some
redundancy
● Eg: some LANs encode 1 bit of data by using 2 physical bits.
● Normally, a 1 bit is a high-low pair and a 0 bit is a low-high pair.
● The scheme means that every data bit has a transition in the middle, making it easy
for the receiver to locate the bit boundaries.
● The combinations high-high and low-low are not used for data but are used for
delimiting frames in some protocols
b) Which are the different types of errors? Explain with examples.

1. Single-Bit Error:

● Definition: Occurs when only one bit in a data unit is altered during transmission (e.g.,
0 changes to 1 or 1 changes to 0).
● Example: Original data: 1011010 → Received data: 1011000 (one bit is flipped).

2. Burst Error:

● Definition: Occurs when two or more bits in a data unit are altered during
transmission, typically within a specific time span.
● Example: Original data: 1011010 → Received data: 1000110 (several consecutive bits
are flipped).

14 a) Draw and explain the frame format of IEEE 802.11.

Frame Structure

1. Frame Control (2 bytes):


○ Contains control information like protocol version, type of frame
(management, control, or data), and flags for retransmissions or encryption.
2. Duration/ID (2 bytes):
○ Indicates the duration of the frame or the identifier for a specific frame type,
like power-saving modes.
3. Address Fields (6 bytes each):
○ Address 1: Destination MAC address.
○ Address 2: Source MAC address.
○ Address 3: Typically the BSSID (Basic Service Set Identifier) or intermediate
address.
4. Sequence Control (2 bytes):
○ Includes a sequence number to track and reassemble fragmented frames.
5. Address 4 (6 bytes, optional):
○ Used only in wireless distribution systems (WDS) when there are multiple
access points (APs) in the network.
6. Payload (0-2312 bytes):
○ Contains the actual data or message being transmitted.
7. Frame Check Sequence (4 bytes):
○ Used for error detection to ensure data integrity during transmission.

b) A bit stream 10011101 is transmitted using the CRC method. The generator
polynomial is x3 + 1. Show the actual bit string transmitted.

Message transmitted=10011101100

Module -3
15 a) Explain distance vector routing algorithm with an example.
● In addition to direct link cost to neighbors, a router will receive from its direct
neighbors knowledge about their accessible destinations and associated links’ costs
to access them.
● Hence, it calculates the shortest path to each destination via an iterative routing
algorithm utilizing the neighbors distances to each target destination.
● Dynamic Algorithm, operate by having each router maintain a table(i.e, a vector)
giving the best known distance to each destination and which line to use to get
there.
● These tables are updated by exchanging information with the neighbors
● Define
● Dx(y):=cost of least-cost path from x to y
● Then


● where min is taken over all neighbors v of x
● Algorithm
● Basic idea:
● 🠶🠶From time-to-time,each node sends its own distance vector estimate to neighbors
● 🠶🠶Asynchronous
● 🠶🠶When a node x receives new DV estimate from neighbor,it updates its own DV
using B-F equation:
● Dx(y)←minv{c(x,v)+Dv(y)}
● for each node y εN
● •Under minor, natural conditions, the estimate Dx(y) converge to the actual least
cost dx(y).
● Iterative, asynchronous: each local iteration caused by:
● 🠶🠶local link cost change
● 🠶🠶DV update message from neighbor
● Distributed:
● 🠶🠶each node notifies neighbors only when its DV changes
● 🠶🠶neighbors then notify their neighbors if necessary

● Consider 3-routers X, Y and Z as shown in figure. Each router have their routing table.
Every routing table will contain distance to the destination nodes.
● Consider router X , X will share it routing table to neighbors and neighbors will share
it routing table to it to X and distance from node X to destination will be calculated
using bellmen- ford equation.
Dx(y) = min { C(x,v) + Dv(y)} for each node y ∈ N
● As we can see that distance will be less going from X to Z when Y is intermediate
node(hop) so it will be update in routing table X.

● Similarly for Z also

● Finally the routing table for x,y,z


b) Explain any three closed loop congestion control techniques.

1. Backpressure :

Backpressure is a technique in which a congested node stops receiving


packets from upstream node. This may cause the upstream node or nodes
to become congested and reject receiving data from above nodes.
Backpressure is a node-to-node congestion control technique that
propagate in the opposite direction of data flow. The backpressure
technique can be applied only to virtual circuit where each node has
information of its above upstream node.

2. Choke Packet Technique :

Choke packet technique is applicable to both virtual networks as well as


datagram subnets. A choke packet is a packet sent by a node to the source
to inform it of congestion. Each router monitors its resources and the
utilization at each of its output lines. Whenever the resource utilization
exceeds the threshold value which is set by the administrator, the router
directly sends a choke packet to the source giving it a feedback to reduce
the traffic. The intermediate nodes through which the packets has traveled
are not warned about congestion.

3. Implicit Signaling :

In implicit signaling, there is no communication between the congested


nodes and the source. The source guesses that there is congestion in a
network. For example when sender sends several packets and there is no
acknowledgment for a while, one assumption is that there is a congestion.
16 a) Explain how routing is performed using link state algorithm. Illustrate with an
example.
Link-State(LS)(Dijkstra)
● A router will have a global & complete knowledge of the network topology(Graph),
through node routing information flooding.
● Hence, algorithmically, it calculates the shortest path to all nodes in the network
graph(target destinations).
● A routing algorithm that creates least-cost trees(shortest path tree) and forwarding
tables is link-state(LS) routing.
● The cost associated with a Link defines its State.
● Links with lower costs are preferred.
● If the link cost is infinity, then the link does not exist or has been broken.
b) Write notes on load shedding.
Load shedding is a fancy way of saying that when routers are being flooded by packets that
they cannot handle, they just throw them away
Methods for dropping:
● Can just pick packets random to drop
● Discard may depend on the applications running
● For file transfer, an old packet is worth more than a new one
● old is better than new is often called wine
● For multimedia, a new packet is more important than an old one.
● new is better than old is often called milk
● To implement an intelligent discard policy, applications must mark their packets in
priority classes to indicate how important they are.
● Senders might be allowed to send high-priority packets under conditions of light
load.
● but as the load increased they would be discarded, thus encouraging the users to
stop sending them
● Another option is to allow hosts to exceed the limits specified in the agreement
negotiated when the virtual circuit was set up (e.g., use a higher bandwidth than
allowed but subject to the condition that all excess traffic be marked as low priority.
Random Early Detection
•Dealing with congestion after it is first detected is more effective than letting it gum up the
works and then trying to deal with it.
•Idea is to discarding packets before all the buffer space is really exhausted
•To determine when to start discarding, routers maintain a running average of their queue
lengths.
•When the average queue length on some line exceeds a threshold, the line is said to be
congested and action is taken.

Module -4
17. a) Illustrate subnetting with an example.
● Subnetting is a process of dividing a larger network into smaller, more manageable
subnetworks or "subnets."
● Subnetting is a key networking concept used to create multiple logical networks
within a single IP address range, which is vital for organizing networks, managing
traffic, and enhancing security.

Example Scenario

Suppose we have the IP address 192.168.1.0 with a /24 (24 bit long) subnet mask, and we
want to create 8 subnets.

● Identify the Number of Bits to Borrow:


o To create 8 subnets, we need 3 bits because 23 = 8.
o Starting with a /24 subnet mask, we increase it by 3 bits, resulting in a /27
subnet mask (255.255.255.224).
● Calculate Subnet Ranges and Hosts:
o With a /27 subnet mask, there are 32 IP addresses per subnet (since 25=32, as
we have 5 bits remaining for hosts).
o Each subnet can support 30 usable hosts (subtracting 2 for the network and
broadcast addresses).
● Determine Subnet Ranges:
o With a subnet mask of /27 (255.255.255.224), the subnet increments by 32 IP
addresses:
▪ Subnet 1: 192.168.1.0 - 192.168.1.31

▪ Subnet 2: 192.168.1.32 - 192.168.1.63

▪ Subnet 3: 192.168.1.64 - 192.168.1.95

▪ Subnet 4: 192.168.1.96 - 192.168.1.127

▪ Subnet 5: 192.168.1.128 - 192.168.1.159

▪ Subnet 6: 192.168.1.160 - 192.168.1.191

▪ Subnet 7: 192.168.1.192 - 192.168.1.223

▪ Subnet 8: 192.168.1.224 - 192.168.1.255

b) Draw the IPv6 header. Explain the significance of each field.

1) Version (4 bits):
● Description: This field specifies the version of the IP protocol. For IPv6, this field is
always set to 6.
2) Traffic Class (8 bits):
● Description: This field is used for differentiated services and quality of service (QoS).
It helps routers prioritize packets by setting the priority level.
3) Flow Label (20 bits):
● Description: This field identifies the flow of packets for which the sender requests
special handling, such as non-default quality of service or routing treatment.
4) Payload Length (16 bits):
● Description: This field indicates the length of the data portion of the packet,
excluding the IPv6 header.
5) Next Header (8 bits):
● Description: This field specifies the type of the next header immediately following
the IPv6 header. It could indicate the type of transport layer protocol (TCP, UDP, etc.)
or another extension header.
6) Hop Limit (8 bits):
● Description: This field is similar to the TTL (Time To Live) field in IPv4. It specifies the
maximum number of hops (routers the packet can pass through) before being
discarded. Each time the packet passes through a router, the hop limit is
decremented by 1.
7) Source Address (128 bits):
● Description: This field contains the IPv6 address of the originator of the packet (the
sender).
8) Destination Address (128 bits):
● Description: This field contains the IPv6 address of the destination of the packet.

18 a) Describe the features of BGP. How does BGP avoid count to infinity problem?
Features of Border Gateway Protocol (BGP)
1. Inter-domain Routing: BGP is used for routing between different autonomous
systems (ASes), making it the core protocol for internet routing.
2. Path Vector Protocol: BGP uses a path vector approach, where each route is
associated with a list of ASes it has traversed, known as the AS path.
3. Policy-based Routing: BGP allows network administrators to define routing policies
based on attributes such as AS path, prefix length, and next-hop IP, giving more
control over how traffic is routed.
The Count to Infinity problem occurs in distance-vector routing protocols like RIP. It happens
when routers propagate incorrect routing information, causing an endless increment of a
route's metric. In simple terms, when a route fails (e.g., a destination becomes unreachable),
routers will increment the "distance" or "hop count" to the destination indefinitely without
discovering the true status of the route. This results in a routing loop where the metric keeps
increasing but the destination remains unreachable, consuming network resources.
Solution for Count to Infinity Problem in BGP
1. AS Path: BGP uses the AS path attribute, which records the ASes a route has
traversed. If a BGP router receives a route that includes its own AS number in the AS
path, it rejects that route to prevent loops, thereby avoiding the count to infinity
issue.
2. Triggered Updates: BGP sends triggered updates instead of periodic updates,
reducing the time for bad routing information to propagate. This helps minimize the
chances of incorrect routing loops.
3. Route Filtering and Policies: BGP allows policy-based routing and route filtering to
prevent the advertisement of invalid routes or bad paths. By filtering routes with
invalid or excessively high AS path lengths, BGP helps avoid loops and count to
infinity scenarios.
b) Draw and explain BOOTP message format.

1) Operation (1 byte): Indicates if the message is a request (1) or a reply (2).


2) Hardware Type (1 byte): Specifies the type of network hardware (e.g., Ethernet = 1).
3) Hardware Address Length (1 byte): Length of the hardware address in bytes.
4) Hops (1 byte): Counts relay hops taken by the message.
5) Transaction ID (4 bytes): Random ID to match requests and replies.
6) Seconds Elapsed (2 bytes): Time since the client started booting.
7) Flags (2 bytes): Contains flags like the broadcast flag.
8) Client IP Address (4 bytes): IP address if the client already has one.
9) Your IP Address (4 bytes): IP address assigned to the client by the server.
10) Server IP Address (4 bytes): IP address of the responding server.
11) Gateway IP Address (4 bytes): IP address of the relay agent or gateway.
12) Client Hardware Address (16 bytes): MAC address of the client.
13) Server Hostname (64 bytes): Optional hostname of the BOOTP server.
14) Boot Filename (128 bytes): Filename for the client’s boot image.
15) Vendor-specific Area (64 bytes): Contains optional parameters for configuration.

Module -5
19 a) How does FTP handle file transfer operation?
FTP is a standard protocol for transferring files between a client and a server over a TCP/IP
network.

Steps in FTP File Transfer Operation


1. Establishing the Control Connection:
o The client connects to the FTP server’s port 21 and logs in with a username
and password or anonymously.
2. File Transfer Commands:
o The client sends commands over the control connection to navigate
directories, list files (LIST command), and request specific files.
o Commands include:

▪ STOR: To upload a file from the client to the server.

▪ RETR: To download a file from the server to the client.

▪ DELE: To delete a file on the server.

3. Opening the Data Connection:


o For each file transfer or directory listing, the server and client establish a
temporary data connection.
o The client can request either active or passive mode based on its network
configuration.
4. Transferring Files:
o Once the data connection is open, the file transfer occurs in binary or ASCII
mode, depending on the client’s specified transfer type.
o After the file transfer completes, the data connection is closed.
5. Terminating the Session:
o When all transfers are complete, the client sends a QUIT command, and the
server closes the control connection.

b) What is the significance of SNMP? Describe its components.


Simple Network Management Protocol(SNMP)
SNMP is a protocol used for network management, allowing network administrators to
monitor, configure, and manage network devices like routers, switches, and servers.
Significance of SNMP (3 Marks)
1. Efficient Network Management: SNMP enables centralized monitoring and
management of network devices, such as routers, switches, and servers, making it
easier to manage large networks.
2. Fault Detection and Troubleshooting: SNMP allows for real-time monitoring and
alerts for network issues, helping network administrators to quickly detect,
troubleshoot, and resolve faults.
3. Remote Configuration and Scalability: SNMP provides remote access to configure
network devices, allowing it to scale effectively and manage numerous devices in
complex networks, improving overall network reliability and performance.
Components of SNMP (5 Marks)
1. Managed Device:
o Description: Managed devices are network elements like routers, switches,
servers, or workstations that are monitored and controlled using SNMP. These
devices are equipped with SNMP agents to allow communication with the
network management station.
o Function: Managed devices collect data about their performance, status, and
usage, which is accessible via SNMP.
2. SNMP Agent:
o Description: An SNMP Agent is software that resides on each managed
device. It is responsible for gathering information about the device’s status
and environment.
o Function: The agent collects data (such as CPU usage, memory status, and
network traffic) and stores it in the Management Information Base (MIB). It
responds to requests from the SNMP Manager and sends alerts (traps) for
specific events.
3. Network Management Station (NMS):
o Description: The NMS, also known as the SNMP Manager, is centralized
software on a server or workstation that manages and monitors multiple
agents on managed devices.
o Function: It sends requests to SNMP agents to retrieve information or
configure device settings, receives responses, and processes trap messages
sent by agents. The NMS can display collected data for network monitoring
and troubleshooting.

20 a) Three-way handshake procedure is used to establish a connection in TCP rather than


two-way handshake. Justify.
Limitations of Two-Way Handshake (3 Marks)
1. Lack of Synchronization:
o In a two-way handshake, only one side (usually the client) initiates and
receives an acknowledgment, which doesn’t confirm if both client and server
have synchronized sequence numbers. Without synchronization, data packets
may be lost or misordered, impacting reliable data transmission.
2. Risk of Duplicate or Delayed Connection Requests:
o With a two-way handshake, if a client’s initial connection request (SYN) is
delayed and the client retransmits another SYN, the server may receive
duplicate requests. This can lead to duplicate connections or data
transmission errors.
3. Unverified Bidirectional Communication:
o A two-way handshake only confirms one direction of communication (from
client to server), leaving the reverse path unverified. This can result in
unreliable or broken connections if one side is ready to transmit but the other
is not.
Three-Way Handshake in TCP (4 Marks)

Step 1: Client Sends SYN:


● The client initiates the connection by sending a SYN (synchronize) packet to the
server, which includes an initial sequence number (ISN) x. This packet indicates that
the client wants to establish a connection and is ready to synchronize sequence
numbers.
Step 2: Server Responds with SYN-ACK:
● The server receives the SYN and responds with a SYN-ACK packet. The SYN part of
this packet contains the server’s initial sequence number y, while the ACK part
acknowledges the client’s sequence number by setting Ack=x+1. This means the
server has received the client’s SYN and is ready for communication.
Step 3: Client Sends ACK:
● The client sends an ACK packet back to the server, acknowledging the server’s
sequence number by setting Ack=y+1. This packet confirms that both sides have
synchronized sequence numbers and are ready for data transfer.

b) Describe the working of electronic mail system.


Diagram (3marks)
Explanation of Email System (4 Marks)
1. Sender’s MUA (Mail User Agent):
o The sender uses an email client (e.g., Outlook, Gmail) to compose an email.
Once the email is ready, the sender clicks "send," and the message is passed
to the SMTP server (Mail Transfer Agent).
2. Sender’s SMTP Server (MTA):
o The SMTP (Simple Mail Transfer Protocol) server on the sender's side takes
the email from the MUA and routes it towards the recipient. It looks up the
recipient’s email address, finds the recipient’s mail server (via DNS lookup),
and forwards the message to the recipient's SMTP server.
3. Recipient’s SMTP Server:
o The recipient’s SMTP server receives the email from the sender's SMTP
server and forwards it to the Mail Delivery Agent (MDA). The MDA stores the
email in the recipient's mailbox.
4. Mail Delivery Agent (MDA):
o The MDA is responsible for storing the received email in the recipient’s
mailbox on the server. It ensures the message is properly placed in the
appropriate folder (e.g., inbox).
5. Recipient’s MUA:
o The recipient's email client (MUA) accesses the email by connecting to the
recipient’s mail server using IMAP (Internet Message Access Protocol) or
POP3 (Post Office Protocol). IMAP allows the email to remain on the server,
while POP3 typically downloads it to the client and deletes it from the server.
o The recipient opens the email client, retrieves the message, and can read,
reply, or delete it as needed.

You might also like