CN_QP_DEC2023
CN_QP_DEC2023
Connection-less services
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:
BDP Calculation:
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.
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
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.
● 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.
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
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)
Transition Depends on the data bit. Depends on the previous bit and the
Dependence data bit.
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).
Manchester Encoding
In this Manchester encoding, 0 is represented as high-to-low and 1 is represented as
low-to-high.
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.
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).
Frame Structure
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.
1. Backpressure :
3. Implicit Signaling :
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.
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.
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.