SET 1
DEPARTMENT OF ARTIFICIAL INTELLIGENCE
PREPARATORY EXAMINATION ANSWER KEY
18AIC303J – COMPUTER NETWORKS
Year/Semester & Branch: III/V & AI&DS and AIML Date:
Faculty Name: Ms.A.Nithyasri & Max. Marks: 100 Time:
Mr.K.Jeya Ganesh Kumar
PART-A Answer ALL Questions (10x2=20 Marks)
1. Suppose two computers are connected by an Ethernet hub at home. Is this a
LAN, a MAN, or a WAN?
CO1 K1
This is a LAN. LAN stands for Local Area Network that connects small
networks.
How many lines are required to direct connect 256 nodes in a mesh system?
2. CO1
n*(n-1)/2 = 256*255/2 = 32640.
Identify the address class of the following IP address. CO2
3. a) 200.58.20.165 – Class C
b) 128.167.23.20 – Class B
Among packet switch and circuit switch, which is preferred for modern digital CO2
4. data communication?
Packet Switching
Define piggy back. CO3
Piggybacking is the technique of delaying outgoing acknowledgment and
attaching it to the next data packet.
When a data frame arrives, the receiver waits and does not send the control
5. frame (acknowledgment) back immediately. The receiver waits until its network
layer moves to the next data packet. Acknowledgment is associated with this
outgoing data frame. Thus the acknowledgment travels along with the next data
frame. This technique in which the outgoing acknowledgment is delayed
temporarily is called Piggybacking.
6. Compare unicast, multicast and broadcast. CO3
Feature Unicast Broadcast Multicast
A A A
communication communication communication
where a message where a message where a message
Definition
is sent from one is sent from one is sent from one
sender to one sender to all sender to a group
receiver. receivers. of receivers
Data is sent to all Data is sent to a
Data is sent to a
Transmission recipients in a group of
single recipient
network recipients
Uses a unique Uses a special
Uses a special
Addressing destination broadcast
multicast address
address address
SET 1
Not all devices
Not all devices
Guaranteed may be
Delivery may be interested
delivery interested in the
in the data
data
Email, file DHCP requests, Video streaming,
Examples
transfer ARP requests online gaming
Describe the term “Jitter” in networks. CO4
7. Jitter is a variance in latency, or the time delay between when a signal is
transmitted and when it is received.
Suppose a TCP connection is transferring a file of 5000 bytes. The first byte is CO4
numbered 10,001. What are the sequence numbers for each segment if data are
sent in five segments, each carrying 1000 bytes?
Segment 1:
Sequence number: 10,001 (initial sequence number)
Payload size: 1000 bytes
Segment 2:
Sequence number: 11,001 (previous sequence number + payload size)
8. Payload size: 1000 bytes
Segment 3:
Sequence number: 12,001 (previous sequence number + payload size)
Payload size: 1000 bytes
Segment 4:
Sequence number: 13,001 (previous sequence number + payload size)
Payload size: 1000 bytes
Segment 5:
Sequence number: 14,001 (previous sequence number + payload size)
Payload size: 1000 bytes
Provide the significant role played by DNS. CO5
9. DNS translates domain names to IP addresses so browsers can load Internet
resources. Each device connected to the Internet has a unique IP address which
other machines use to find the device.
Draw the handshaking involved in FTP. CO5
10.
SET 1
PART-B Answer ALL Questions (5x16=80 Marks)
11. i) Discuss in detail the ISO-OSI model and explain the functions of various CO1 K2
(a) layers. (12)
(2M)
Physical layer - The physical layer is responsible for movements of individual bits
from one hop (node) to the next. The physical layer coordinates the functions required
to carry a bit stream over a physical medium. It deals with the mechanical and electrical
specifications of the interface and transmission medium. Physical layer defines the
procedures and functions that physical devices and interfaces have to perform for
transmission of data. (2M)
Data link layer - The data link layer is responsible for moving frames from one hop
(node) to the next. Other responsibilities of the data link layer include the following:
Framing, Physical addressing, Flow control, Error control, Access Control. (2M)
Network layer - The network layer is responsible for the delivery of individual packets
from the source host to the destination host. Other responsibilities of the network layer
include the following: Logical addressing, Routing. (2M)
Transport layer - The transport layer is responsible for the delivery of a message from
one process to another. Other responsibilities of the transport layer include the
following: Service-point addressing, Segmentation and reassembly, Connection
Control, Flow Control, Error Control. (1M)
Session layer - The session layer is responsible for dialog control and synchronization.
Specific responsibilities of the session layer include the following: Dialog Control,
Synchronization. (1M)
Presentation layer - The presentation layer is responsible for translation, compression,
and encryption. Specific responsibilities of the presentation layer include the following:
Translation, Encryption, Compression. (1M)
Application layer - The application layer is responsible for providing services to the
user. Specific services provided by the application layer include the following:
Network virtual terminal, File transfer, access and management, Mail services,
Directory services. (1M)
ii) Describe in detail different network topologies. (4)
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. (1M)
Star topology - In a star topology, each device has a dedicated point-to-point link to a
central controller (HUB) only. If one link fails, that link is affected. All other links
remain active. (1M)
Bus topology - One long cable acts as a backbone to link all the devices in the network.
Nodes are connected to the back bone by taps and drop lines. Drop line is establishing
the connection between the devices and the cable. The taps are used as connectors.
(1M)
SET 1
Ring topology - In a ring topology, each device has a dedicated point-to-point link
with other devices. Each device is linked only to its immediate neighbours. A signal is
travel along the ring in only one direction from device to device until it reaches its
destination. The repeater is used to regenerate the signals during the transmission. (1M)
(or)
i) Detail the structure of various transmission media in computer network. (12)
Guided Media (2M)
11.
CO1
(b) Guided media provide a conduit from one device to another. A signal traveling along
any of these media is directed and contained by the physical limits of the medium.
Twisted-pair and coaxial cable use metallic (copper) conductors that accept and
transport signals in the form of electric current. Optical fiber is a cable that accepts and
transports signals in the form of light.
Twisted-Pair Cable (2M)
Twisting makes it probable that both wires are equally affected by external influences.
The number of twists per unit of length has some effect on the quality of the cable.
Coaxial Cable (2M)
Coaxial cable carries signals of higher frequency ranges. Instead of having two wires,
coax has a central core conductor of solid or stranded wire (usually copper) enclosed in
an insulating sheath, which is, in turn, encased in an outer conductor of metal foil,
braid, or a combination of the two. The outer metallic wrapping serves both as a shield
against noise and as the second conductor, which completes the circuit. This outer
conductor is also enclosed in an insulating sheath, and the whole cable is protected by a
plastic cover.
SET 1
Fiber-Optic Cable (2M)
A fiber-optic cable is made of glass or plastic and transmits signals in the form of light.
Light travels in a straight line as long as it is moving through a single uniform
substance. If a ray of light traveling through one substance suddenly enters another
substance the ray changes direction.
Propagation modes
If the angle of incidence is less than the critical angle, the ray refracts and moves closer
to the surface.
Unguided Transmission Media (4M)
Unguided media transport electromagnetic waves without using a physical conductor.
This type of communication is often referred to as wireless communication. Signals are
normally broadcast through free space and thus are available to anyone who has a
device capable of receiving them. Unguided signals can travel from the source to
destination in several ways:
i) Ground propagation: Radio waves travel through the lowest portion of the
atmosphere.
ii) Sky propagation: Higher frequency radio waves radiate upward into the ionosphere
and they are reflected back to earth.
iii) Line-of-sight propagation: Very high frequency signals are transmitted in straight
lines directly from antenna to antenna.
ii) Also make comparison between twisted pair with coaxial cable. (4M)
Twisted Pair Cable (2M)
Twisted pair is a physical media made up of a pair of cables twisted with each
other.
Installation of the twisted pair cable is easy, and it is a lightweight cable.
The frequency range for twisted pair cable is from 0 to 3.5KHz.
A twisted pair consists of two insulated copper wires arranged in a regular
spiral pattern.
SET 1
Coaxial Cable (2M)
Coaxial cable(Coax) is a very commonly used transmission media, for
example, TV wire is usually a coaxial cable.
The name of the cable is coaxial as it contains two conductors parallel to each
other.
The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh.
The middle core is made up of non- conductive cover that separates the inner
conductor from the outer conductor.
Types of Coaxial cable :
Baseband transmission: It is defined as the process of transmitting a single
signal at high speed.
Broadband transmission: It is defined as the process of transmitting multiple
signals simultaneously.
12. i) For the generator polynomial g = 110011 and the data bits (message) m = CO2
(a) 11100011find the CRC and the transmitted string T (since g is 6 bits, i.e. a polynomial
of degree 5, L = 5 and the CRC should be 5 bits). (10)
Bits to be appended to the message = (Divisor polynomial bits -1)=6−1=5=6−1=5
Now, append 5 zero to the message bit, hence=1110001100000=1110001100000
1110001100000/1100111110001100000/110011 Remainder =1000
Hence, CRC = 1110
Hence, we have to append 1110 to the frame.
So, the receiver will receive 111000111110
ii) Suppose g = 1001 and the received T = 1010101, did any transmission error occur?
(6)
SET 1
(or)
12. i) Discuss the issues while implementing the data link layer in the network. (8) CO2
(b) Data-link layer is the second layer after the physical layer. The data link layer is
responsible for maintaining the data link between two hosts or nodes.
Some of its sub-layers and their functions are as following below.
The data link layer is divided into two sub-layers :
1. Logical Link Control Sub-layer (LLC) – Provides the logic for the data link, Thus it
controls the synchronization, flow control, and error checking functions of the data link
layer. Functions are –
(i) Error Recovery.
(ii) It performs the flow control operations.
(iii) User addressing.
2. Media Access Control Sub-layer (MAC) – It is the second sub-layer of data-link
layer. It controls the flow and multiplexing for transmission medium. Transmission of
data packets is controlled by this layer. This layer is responsible for sending the data
over the network interface card.
Functions are –
(i) To perform the control of access to media.
(ii) It performs the unique addressing to stations directly connected to LAN.
(iii) Detection of errors.
Design issues with data link layer are :
1. Services provided to the network layer – The data link layer act as a service
interface to the network layer. The principle service is transferring data from network
layer on sending machine to the network layer on destination machine. This transfer
also takes place via DLL (Data link-layer).
2. Frame synchronization – The source machine sends data in the form of blocks called
frames to the destination machine. The starting and ending of each frame should be
identified so that the frame can be recognized by the destination machine.
3. Flow control – Flow control is done to prevent the flow of data frame at the receiver
end. The source machine must not send data frames at a rate faster than the capacity of
destination machine to accept them.
4. Error control – Error control is done to prevent duplication of frames. The errors
ii) Describe MAC sub layer protocol and frame structure of IEEE 802.11
(8)
SET 1
IEEE 802.11 defines two kinds of services. They are,
i. Basic service set (BSS) - BSS - the building block of a wireless LAN. A basic service
set is made of stationary or mobile wireless stations and an optional central base
station, known as the access point (AP). The BSS without an AP is a stand-alone
network and cannot send data to other BSSs. It is called an ad hoc architecture.
ii. Extended service set (ESS) - An extended service set (ESS) is made up of two or
more BSSs with APs. The distribution system connects the APs in the BSSs. The
extended service set uses two types of stations. They are, i. Mobile stations
ii. Stationary stations.
MAC SUBLAYER
IEEE 802.11 defines two types of MAC sub-layers. They are;
i. The distributed coordination function (DCF)
ii. The point coordination function (PCF).
(4M)
Distributed Coordination Function
One of the two protocols defined by IEEE at the MAC sublayer is called the distributed
coordination function (DCF). DCF uses CSMA/CA as the access method.
Point Coordination Function (PCP)
The point coordination function (PCF) is an optional access method that can be
implemented in an infrastructure network (not in an ad hoc network). It is used mostly
for time-sensitive transmission. PCF has a centralized, contention-free polling access
method.
(4M)
The MAC layer frame consists of nine fields.
1. Frame control (FC) - The FC field is 2 bytes long and defines the type of frame and
some control information.
2. D - In all frame types except one, this field defines the duration of the transmission.
In the control frame - this field defines the ID of the frame.
3. Addresses - There are four address fields, each 6 bytes long. The meaning of each
address field depends on the value of the To DS and From DS subfields.
4. Sequence control - This field defines the sequence number of the frame to be used in
flow control.
5. Frame body - This field, which can be between 0 and 2312 bytes, contains
information based on the type and the subtype defined in the FC field.
6. FCS - The FCS field is 4 bytes long and contains a CRC-32 error detection sequence.
SET 1
i) Describe Circuit-switching and Packet-switching with an example. (10)
In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.
Switching technique is used to connect the systems for making one-to-one
communication.
Circuit Switching (5M)
o Circuit switching is a switching technique that establishes a dedicated path
between sender and receiver.
o In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
o Circuit switching in a network operates in a similar way as the telephone works.
o A complete end-to-end path must exist before the communication takes place.
Communication through circuit switching has 3 phases:
o Circuit establishment
o Data transfer
o Circuit Disconnect
Packet Switching (5M)
o The packet switching is a switching technique in which the message is sent in
one go, but it is divided into smaller pieces, and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
13. o Every packet contains some information in its headers such as source address,
CO3
(a) destination address and sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend
the message.
o If the correct order of the packets is reached, then the acknowledgment message
will be sent.
ii) Write briefly about CSMA. (6M)
This method was developed to decrease the chances of collisions when two or more
stations start sending their signals over the data link layer. Carrier Sense multiple
access requires that each station first check the state of the medium before sending.
1. Carrier Sense Multiple Access with Collision Detection (CSMA/CD):
In this method, a station monitors the medium after it sends a frame to see if the
transmission was successful. If successful, the transmission is finished, if not, the frame
is sent again.
2. Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) –
The basic idea behind CSMA/CA is that the station should be able to receive while
transmitting to detect a collision from different stations. In wired networks, if a
collision has occurred then the energy of the received signal almost doubles, and the
station can sense the possibility of collision. In the case of wireless networks, most of
the energy is used for transmission, and the energy of the received signal increases by
only 5-10% if a collision occurs.
(or)
13. i) Apply distance vector routing algorithm for the following network and
illustrate the steps in detail. (10) CO3
(b)
SET 1
SET 1
ii) Discuss the mechanism involved in IPV6 addressing. Also compare IPV4 with
IPV6. (6M)
IPv6 provides a 128-bit address space to handle up to 3.4 × 10 38 nodes. IPv6
uses classless addressing, but classification is based on MSBs. The address
space is subdivided in various ways based on the leading bits.
A node may be assigned an “IPv4-compatible IPv6 address” by zero- extending
a 32-bit IPv4 addressto128 bits.
A node that is only capable of understanding IPv4 can be assigned an “IPv4-
mapped IPv6 address” by prefixing the 32-bit IPv4 address with 2 bytes of all 1s
and then zero-extending the result to 128 bits.
DRAWBACKS OF IPV4
• Despite subnetting and CIDR, address depletion is still a long-term problem.
• Internet must accommodate real-time audio and video transmission that requires
minimum delay strategies and reservation of resources.
• Internet must provide encryption and authentication of data for some applications
FEATURES OF IPV6
Better header format, New options, Allowance for extension, Support for resource
allocation
ADDRESS AGGREGATION OF IPV6
PACKET FORMAT OF IPV6
IPv6 base header is 40 bytes long.
i) Explain the issues in connection establishment and connection tear down
in transport layer. (6)
TCP Connection Establishment:
To make the transport services reliable. TCP hosts must establish a connection-
oriented session with one another. Connection establishment is performed by
14. using a three way handshake mechanism.
A three way handshake synchronizes both ends of a connection by allowing
CO4
(a)
both sides to agree upon initial sequence numbers. This mechanism also
guarantees that both sides are ready to transmit data and know that the other
side is ready to transmit as well.
SET 1
Connection termination protocol [connection release] :
While it takes three segments to establish a connection, It takes four to
terminate a connection.
Since a TCP connection is full duplex (that is, data flows in each direction
independently of the other direction), the connection should be terminated in
both the direction independently.
ii) What is Congestion control ? Why it is more important in communication
networks ? (4)
Congestion Control is a mechanism that controls the entry of data packets into the
network, enabling a better use of a shared network infrastructure and avoiding
congestive collapse. Congestive-Avoidance Algorithms (CAA) are implemented at the
TCP layer as the mechanism to avoid congestive collapse in a network.
There are two congestion control algorithm which are as follows:
Leaky Bucket Algorithm
Token bucket Algorithm
iii) Explain the packet structure of UDP. (6)
User Datagram Protocol (UDP)
Source port address
Destination port address
Total length
Checksum
SET 1
(or)
14. i) Explain various congestion control techniques adopted in transport layer. (8) CO4
(b) Open Loop (4M)
Retransmission Policy
Acknowledgement Policy
Discard Policy
Admission Policy
Closed Loop (4M)
Back Pressure
Choke Packet
Implicit Signaling
Explicit Signaling
ii) Assume a network which have more number of delayed packets due to congestion
there by Quality of Services decreases, Analyze the techniques to improve the Quality
of Service and describe each of its pros and cons (8)
1. Quality of Service (QoS) Prioritization:
Pros:
Improved Prioritization: Differentiate between types of traffic (e.g., voice,
video, data) and prioritize certain types over others.
Better User Experience: Ensures critical applications receive higher priority,
improving their performance despite congestion.
Cons:
Complex Configuration: Setting up QoS policies can be complex and may
require in-depth knowledge of the network's traffic patterns and requirements.
Potential Unfairness: If not configured properly, prioritizing certain traffic can
lead to unfairness, disadvantaging other types of traffic.
2. Traffic Shaping and Policing:
Pros:
Smoothed Traffic Flow: Helps regulate traffic by shaping it to conform to
defined parameters, preventing sudden spikes that cause congestion.
Improved Resource Allocation: Allows for better utilization of available
bandwidth by controlling the rate of data transmission.
Cons:
Increased Latency: Introducing shaping can add latency as it regulates the
flow, potentially impacting real-time applications.
Complex Configuration: Similar to QoS prioritization, configuring traffic
shaping and policing requires understanding traffic patterns and requirements.
3. Congestion Avoidance Algorithms:
Pros:
Adaptive Behavior: Algorithms like TCP's congestion avoidance adaptively
adjust the sending rate based on network conditions, reducing congestion.
SET 1
Prevention of Packet Loss: Helps prevent packet loss by slowing down
transmission before congestion occurs.
Cons:
Slow Reaction to Changes: Some algorithms might react slowly to sudden
changes in network conditions, leading to temporary congestion.
Complexity and Overhead: Implementing these algorithms might add
complexity and computational overhead to devices.
4. Load Balancing:
Pros:
Resource Optimization: Distributes traffic across multiple paths or devices,
optimizing resource utilization and reducing congestion on specific routes.
Redundancy and Resilience: Enhances network redundancy and resilience by
offering alternate paths.
Cons:
Configuration Challenges: Implementing load balancing requires careful
configuration and monitoring to ensure effective load distribution.
Potential Increased Complexity: In some cases, load balancing setups can add
complexity to the network architecture.
5. Queue Management:
Pros:
Buffer Optimization: Effective queue management strategies prevent buffer
bloat and reduce the chances of packet loss during congestion.
Improved Responsiveness: Responsive queue management mechanisms can
prioritize important packets and discard less critical ones during congestion.
Cons:
Potential Fairness Issues: If not implemented properly, queue management
can lead to unfairness in packet drop or delay among different traffic types.
Overhead and Processing: Some queue management techniques may add
processing overhead to devices.
15. Explain the components and architecture of DNS. Also mention the features. (16) CO5
(a)
DNS is the name service for Internet addresses that translates friendly domain names to
numeric Internet Protocol (IP) addresses. For example, "www.microsoft.com"
translates to 198.105.232.6.
DNS consists of the following components:
Domains: A domain is a logical group of computers in a large network. Access
to each computer in a given group is controlled by the same server.
Distributed Database: A distributed database is an archive of information about
the computers in a network.
Name Servers: A name server contains address information about other
computers on the network. This information can be given to client computers
that make a request to the name server.
Clients: A client requests information from the servers. In a domain name
system, the client requests network addressing information from the name
servers.
Resolver: A resolver provides clients with address information about other
computers on the network.
SET 1
(or)
Write note on the following:
i) SMTP. (4)
• System for sending messages to other computer users based on e-mail addresses.
• SMTP provides mail exchange between users on the same or different computers.
User Agent
Mail Transfer Agent
Multipurpose Internet Mail Extensions
Post Office Protocol
ii) FTP. (4)
• Transfer a file from one system to another.
15 • TCP connections
CO5
(b) • Basic model of FTP
iii) WWW architecture. (8)
• Hypertext & Hypermedia
• Browser Architecture
• Categories of Web Documents
• HTML
•CGI
•Java
Knowledge Remember (K1), Understand (K2), Apply (K3), Analysis (K4), Evaluate (K5) & Design
Level (K) (K6)
*****
Verified by Approved By