You are on page 1of 15

AKGECIIQAC/QP/O3

Ajay Kumar Garg Engineering College, Ghaziabad


Department of Information Technology
Sessional Test
Course: B. Tech Semester: 6th
Session: 2023-23 Section: IT/CSIT/CSE/CS/AIML/DS
Computer Networks Sub. Code: KCS-603
Subject:
Max Marks: 50 Time: 2 Hrs.
OBE Remarks:
2 3 4 6 9 10 11 12
Q.No. 1
CO No. COICOI C02 CO2 CO3 COL|CO2 CO2 CO3 CO3 COI COI
Bloom's Level* LI LI LI L2 L2 LI LI L2 L3 L3 LI L3
(LIto L6)
Weightage WeightageCO1: 24 Weightage C02: 14 Weightage C03: 12
*Bloom 's Level: Ll: Remember, L2: Understand, L3: Apply, L4: Analyze, L5: Evaluate, L6: Create
Note: Answer all the sections.
Section-A
A. Atempt all the parts. (5x2 =10)
1. Define Computer Networks and its applications.
A computer network is a combination of devices (computers and laptops) that are connected
together for the purpose of data or resource sharing. The devices use general connection
protocols beyond digital interconnections to connect with more devices.
Application of computer networks are: resource sharing, communication, access remote
database or system, entertainments, etc.
2. If we have a channel limit with 1MHz bandwidth. SNR of the channel is 63. What are the
appropriate bit rate and signal levels.
c=B log2(1 + SIN)[ where C= the bit rate, B=bandwidth, S=average signal power and
N=average noise power
= 10^6 log2(1 + 63)
=6Mbps.
Then use the Nyquist formula to find the number of signal levels.
signal level = 2.B log2 M[bps] [where B is the bandwidth]
=2*10^6 log2 6000000
=log2 (6000000200)
3. Compare the throughput of PURE ALOHA and SLOTTED ALOHA.
PURE ALOHA:Let us call G
the average number of frames generated bythe system during
one frame transmission time. Then it can be proved that the average number of successtul
transmissions for pure ALOHA is S=G*e2G
The maximum throughput Smax is 0.184, for G = 1/2.
In other words, if one-half a frame is generated during one frame transmission time (in other
words, one frame during two frame transmission times), then 18.4 percent of these frames
reach their destination successfully.
This is an expected result because the vulnerable time is 2 times the frame transmission time.
Therefore, if a station generates only one frame in this vulnerable time (and no other stations
generate a frame during this time), the frame willreach its destination successtully.
SLOTTED ALOHA: In slottedALOHA we divide the time into slots of T;s and foree the
station tosend only at the beginning of the time slot.
of the synchronized time slot. ifa
Because astation is allowed to send only at the beginning
beginning of the next time slot.
station misses this moment, it must wait until the
this slot has already finished
This mcans that the station which started at the beginningofofcollision
sending its frame. Of course, there is still the possibility if two stations try to
send at the beginning of the same time slot.
The throughput for slotted ALOHA is S=: G * ei
The maximum throughput Smax 0.368 when G-1.
4. Draw HDLCFrame Format and compare control fieldof alltypes of frames.
HDLC Frame
HDLC isa bit -oriented protocol where each frame contains up to six fields. The structure
varies according to the type of frame. The fields of a HDLC frameare
Flag - It is an 8-bit sequence that marks the beginning and the end of the frame. The bit
pattern of the flag is 01||||0.
Address - Itcontains the address of thereceiver. If the frame is sent by the primary station,
it contains the addres(es) of the secondary stations). Ifit is sent by the secondary station,
it contains the address of the primary station. The address field may be from Ibyte to several
bytes.
Control - It is Ior 2bytes containing flow and error control information.
Payload- This carries the data from the network layer. Its length may vary from one
network to another.
FCS - t is a 2byte or 4bytes frame check sequence for error detection. The standard code
used is CRC (Cyclic redundancy code)

HDLC Frame

Flag Address Control Payload FCS Flag


1 byte 1 byte 1 byte variable 2 or 4 bytes 1 byte
(01111110) (01111110)

There are three types of HDLC frames. The type of frame is determined by the control field
of the frame
I-frame-I-frames or Information frames carry user data from the network layer. They also
include flow and error control information that is piggybacked on user data. The first
control field of I-frame is 0. bit of
S-frame - S-frames or Supervisory frames do not contain information field. They are
for flow and error control when piggybacking is not required. The first used
field of S-frame is 10. two bits of control
U-frame-U-frames or Un-numbered frames are used for
like link management. It may contain an information field, myriad miscellaneous functions,
if required. The first two bits of
control field of -frame is 1|.
ifa
HDLC Frame

|-Frame

Flag Address Control User data from upper layers FCS Flag

S-Frame

Flag Address Control FCS Flag

U-Frame

Flag Address Control Management information FCS Flag

5. If a class B network on the Internet has a subnet mask 255.255.248.0, find the maximum
number of hosts per subnet.
Subnet Mask: -255.255.248.0
11111111 1111000.00000000
There are 21 bits in subnet, so 32-21=11 bits are left for host ids. Total possible values of
the host ids are 2!! = 2048. Out of these 2048 values, 2 are reserved.
First and Last address are special so the maximum number of addresses-2048-2=2046
Section-B
B. Attempt allthe parts. (5x5 = 25)
6. i) Daw TCP/IP protocol suite.
TCP/IP Modelwas designedand developed by Department of Defense (DoD) in 1960s and
is based on standard protocols. It stands for Transmission Control Protocol/Internet Protocol.
The TCP/P model is a concise version of the OSI model. It contains four layers, unlike
seven layers in the OSI model.
The layers are:
Application Layer
Transport Layer
Internet Layer
Network Access/Link Layer

3
Name Host Network Fle E-Mai & www inter
System Contig Mgmt Transfer
ansre News Gopher active
Application DNS RCe
Teloet
BOOTP SNMP HTTP

Fle Com
Shar1ng pop
DHCP RMON TE TP IMAP
NFS
HNIP

User Datagranm Protocol


aTransport (UDP)
Transmission Control Protocol
(TCP)

IP Support iP Routing
IP NAT Protocols
3 Inte rnet Internet Protocol ICMPIICMPy4,
Protocols
IPSec
(IPAPv4, IPv6) ICMPV6
GGP HELLO
Mobile Neighbor KGAP, FK,ap
IP GGP, rGP
Discovery (ND)

Address Resolution
Reverse Addr
ddress Resolution
Protocol (ARP) Protocol (RARP)
2 Network Serial Line Intertace
Interface Point-to -Point Protocol
Protocol(SLIP) (PPP) (LANWLANWAN
Hardware Drivers)

ii) What do you


understand by
computers then how many cablesnetwork topologies. Specify and compare all. If we have 6
required to connect in various topologies?
A Network Topology is the
are connected to each other:. arrangement with which computer systems or network
Topologies maý define both physical and logical aspectdevices
network. Both logical and physical topologies could be same or different in a same of the
network.
Point-to-Point: Point-to-point networks contains exactly two hosts such as
switches or routers, servers connected
receiving end of one host is connected back to back using a single computer,
to sending end of the other piece of cable. Often, the
and vice-versa.

Data Flow
-----.-----.

If the hosts are


devices. But the connected point-to-point logically, then may have multiple
end hosts are unaware of underlying network and see each intermediate
are connected directly. other as if they
Bus Topology: In case of Bus
cable. Bus topology may have topology, all devices share single
problem while multiple hosts sendingcommunication
Therefore, Bus topology either uses CSMA/CD
line or
data at the same time.
Master to solve the issue. It is technology or recognizes one host as Bus
device does not affect the otherone of the simple forms of networking where a failure of a
make all other devices stop devices. But failure of the shared communication line can
functioning.

4
Data Flow

Terminator

Both ends of the shared channel have line terminator. The data is sent in only one direction
and as sOon as it reaches the extreme end, the terminator removes the data from the line.

Star Topology
All hosts in Star topology are connected to acentraldevice, known as hub device, using a
point-to-point connection. That is, there cxists a point to point connection between hosts
and hub. The hub device can be any of the following:
Layer-I device such as hub or repeater
Layer-2 device such as switch or bridge
Layer-3 device such as router or gateway

As in Bus topology,hub acts as single point of failure. If hub fails, connectivity of all hosts
to all other hosts fails. Every communication between hosts, takes place through only the
hub.Star topology is not expensive as to connect one more host, only one cable is required
and configuration is simple.
Ring Topology
In ring topology, each host machine connects to exactly two other machines, creating a
circular network structure. When one host tries to communicate or send message to a host
which is not adjacent to it, the data travels through all intermediate hosts. To connect one
more host in the existing structure, theadministrator may need only one more estra cable.
6

the ring
Failure of any host results in failure of the whole ring. Thus, every connection in
is a point of failure. There are methods which employ one more backup ring.

Mesh Topology
In this type of topology, a host is connected to one or multiple hosts.This topology has hosts
in point-to-point connection with every other host or may also have hosts which are in
point-to-point connection to few hosts only.
m x(n- 1)

2
3

Hosts in Mesh topology also work as relay for other hosts which do not have direct point
to-point links.

7. Discuss about different persistent methods.


1Persistent
The 1-persistent method is simple and straightforward. In this method, after the station finds
the line idle, it sends its frame immediately (with probability I). This method has the highest
chance of collision because two or more stations may find the line idle and send their frames
immediately.
Nonpersistent
In the nonpersistent nmethod, a station that has a frame to send senses the line. If the line is
idle, it sends immediately. If the line is not idle, it waits a random amount of time and then
senses the line again. The nonpersistent approach reduces the chance of collision because it
is unlikely that two or more stations willwait the same amount of time and retry to send
simultaneously. However, this method reduces the elliciency of the network because the
medium remains idle when there may be stations with frames to send.
p-Persistent
The p-persistent method is used if the channel has time slots with a slot duration equal to or
greater than the maximum propagation time. The p-persistent approach combines the
advantages of the other two strategies. It reduces the chance of collision and
efficiency. In this method, after the station finds the line idle it follows these steps:
improves
1. With probability p. the station sends its frame.
2. With probabilityq =1-p. the station waits for the
checks the line again. beginning of the next time slot and
a. If the line is idle, it goes to step 1.
b. If the line is busy, it acts as though a
procedure.
collision has occurred and uses the backoff

8. A Pure ALOHA netwwork transmits 400 bits


frames on a shared channel of 400 kbps. What
is the throughput if the system produces: a) 1000 frames per seconds and b) 500 frames per
seconds.
Frame transmission time T¢= 400/400 kbps or 2 ms.
a) If the system creates 1000frames per second, or1
frame per millisecond, then G= 1
S=GxeG =0.135 (13.5 percent)
This means that, Throughput -1000 x 0.135 = 135 frames.

b) If the system creates 500 frames per second, or l/2 frames per
1/2. millisecond. Then G =
S=Gxe-2G =0.184 (18.4 percent)
This means that Throughput = 500 x 0.184=92
Only 92 frames out of 500will probably survive. This is the maximum
percentage-wise. throughput case,
9. The IP network 200.198.160.50/27. Design the subnets and find
network address, broadcast
address, first and last host address, number of hosts in this subnet.
Ip address is 200.198.160.50/27
CIDR Netmask is 255.255.255.224
Mask bit is 27
Convert to decimal to binary is 11001000.11000110.10100000.00110010

Block ID Host ID

11001000.1 10001 10.10100000.00100000 200.198.160.38/28


11001000.1 1000110.10100000.00101111 200.198.160.47I28
11001000.1 1000110.10100000.00110000 200.198.160.48/28

11001000.11000110.10100000.0011|||| 200.198.160.63/28
Network ID of 1$t subnet is 200.198.160.38 /28
Broadcast address of 1% subnet is 200. 198.168.47 64
1 host address is 200.198.160.38/28
Last host address is 200.198.168.47/28 2 2 4

Number of hosts in this subnet is 16


Number of usable hosts in this subnet is 16-2=14
Network ID of 2nd subnet is 200.198.160.48
Broadcast address of 2nd subnet is 200.198.168.63
7
2nd host address is 200.198.160.48/28
198.168.63/28
Last host address is 200.
Number of hosts in this subnet is 16
Number of usable hosts in this subnet is 16-2=14
information in
An IPy4 datagram has arrived with the following
10. Draw IPv4 datagram. 06 00 007C 4E 03 02 B4 OE OF
02
header: Ox45 00 00 5400 03 58 S0 20
i. Is the packet corrupted? Why?
ii. Findthe size of option field.
ii. What is the size of data?
iv. How many routers the packet travels to?
V. What is the source IP address

4 00 0054
0003 5 850
20 06 0000
7C4E 03 02
B4 0E OF 02

based on the
i) It is not possible to determine whether the packet is corrupted
information provided.
i) A datagram header can have up to 40 bytes of options
iii) Size of data = Total Length HLEN
84-20=
iv) Total Length = 54 hexadecimal (84 decimal), HLEN = 5*4-20, so Data =
64
v) TTL value is 20 which is hexadecimal, so no of router travel is 32.
vi) Source IP address =7C4E 03 02 = 124.78.3.2
Section-C
C. Attempt all the questions. (2x7.5 = 15)
11. Draw the diagram of OSI reference model. Write all the functions of all seven layers of OSI
reference model.

OSIModel
describes how
OSI stands for Open System Interconnection is a reference model that
information from a software application in one computer moves through a physical medium to
the software application in another computer.
OSIconsists of seven layers, and each layer performs a particular network function.
OSI model was developed by the International Organization for Standardization (ISO)
in 1984, and it is now considered as an architectural model for the inter-computer
communications.
OSI model divides the whole task into seven smaller and manageable tasks. Each layer
is assigned aparticular task.
Each layer is self-contained, so that task assigned to each layer can be performed
independently.
Characteristics of OSI Model:
Characteristics of OSI Model
Application
Responsibility Presentation
of the Host
Session

Transport
Network

Responsibility of Data Link


the Network

Physical

The OSI model is divided into two layers:upper layers and lower layers.
The upper layer of the OSImodel mainly deals with the application related issues, and
they are implemented only in the software. The application layer is closest to the end
user. Both the end user and the application layer interact with the software applications.
Anupper layer refers to the layer just above another layer.
The lower layer of the OSI model deals with the data transport issues. The data link layer
and the physical layer are implemented in hardware and software. The physical layer is
the lowest layer of the oSImodel and is closest to the physical medium. The physical
layer is mainly responsible for placing the information on the physical medium.
7Layers of OSI Model
There are the seven OSI layers. Each layer has different functions. A list of seven layers are
given below:
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer phyiçal medium
It is responsoeceving
to It pro
This layer provide the It is used to establ1sh manage the pac through which bits are
and terminate the sessions the destination transmitted
services

DataLink Physical
Application) Presentation Session Transport Network

It provides rellable massage tt is used free


t is responsible fot transtation. delivery from ocess
transter of data frames

compressions encryption orocess

I) Physical layer

9
Data-Link
Layer 2) Functions
Functions Logical ItMedia
protocol
Network
layerLogical network. It It It ItThis or
is contains provides isdefines Topology:
Signals: Configuration:
physically.
Data Line It lt It ltnode The
used mainly full-duplex specifies
establishes,
of is
layer Transmission: the main
to
Access
Li n k a
offor the Physical another
lowest
layerLink two
responsible a is It Layor
Physical
transferring
the Control reliableresponsible
format layerData
link
determines It the functionality
Data-link Control
fromControl of
sub-layers: defines mode
mechanical,
maintains layer node.
the Network
Layer
From layer: From
the Physical
LayerTo T2 10101000000010
layer receiver and of10101000000010 dataL3
between
the It of data
for the the defincs dataL2
header.It Layer:
efficient for way defines and the of'
layer the Layer: and the data type link
packets the FrameH2 clectrical th e
deactivates OSI Transmission Layer
unique on
how the the physical
the also that error-free of th e
A communication It the t
transmission
the w o model.
network'Media s is is network
over provides receiving. identification network. signal devices way
responsible Frame
and layer Medium
the transfer how
procedural the
access Transport
LayerTo devices
Physical
Layer
From T2
used physical To
network. 10101000000010 on is 10101000000010 data
physical flow
It dataL3 mode tw o to
for the dataL2
control identifies for between of are transmit link
control. of data transmittingnetwork. or
network
each DatH2
liank conncction. Layer
layer. transferring arranged. whether more
layer
layer the device two frames. the
devicesinterface Layer
Physical
or it individual
address
is is
that more the simplex,
a the
link resides information. can
of'
packets devices. specifications.
between the connectedbe bits
half-duplex
network on from
to a
local
10 the the one
Framing: The data link layer translates the physical's raw bit stream into packets known
which
as Frames. The Data link layer adds the header and trailer to the frame. The header
added to the frame contains the hardware destination and source address.

Header Packet Trailer

Physical Addressing: The Data link layer adds a header to the frame that contains a
destination address. The frame is transmitted to the destination address mentioned in
the header.
Flow Control: Flow control is the main functionality of the Data-link layer. It is the
technique through which the constant datarate is maintained on both the sides so that
no data get corrupted. It ensures that the transmitting station such as a server with
higher processing speed does not exceed the receiving station, with lower processing
speed.
Error Control: Error control is achieved by adding a calculated value CRC (Cyclic
Redundancy Check) that is placed to the Data link layer's trailer which is added to the
message frame before it is sent to the physical layer. If any error seems to occurr, then
the receiver sends the acknowledgment for the retransmission of the corrupted frames.
Access Control: When two or more devices are connected to the same communication
channel, then the data link layer protocols are used to determine which device has
control over the link at a given time.
3) Network Layer
From Transport Layer To Transport Layer
L4 data L4 data

Network H3 Network
H3 Packet Packet
Layer Layer

L3 data L3data
To Data Link Layer From Data Link Layer

It is a layer 3 that manages device addressing, tracks the location of devices on the
network.
It determines the best path to move data from source to the destination based on the
network conditions, the priority of service, and other factors.
The Data link layer is responsible for routing and forwarding the packets.
Routers are the layer 3 devices, they are specified in this layer and used to provide the
routing services within an internetwork.
The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IP and Ipv6.
Functions of Network Layer:
Internetworking: An internetworking is the main responsibility of the network layer. It
provides a logical connection between different devices.
Addressing: A Network layer adds the source and destination address to the heuder of the
frame. Addressing is used to identify the device on the internet.
Routing is the major component of the network layer, and it determines the best
Routing:
optimal path out of the multiple paths from source to the destination. converts them into
Packetizing: ANetwork Layer receives the packets from the upper layer and
packets. This process is known as Packetizing. It is achieved by internet protocol (|P).
4) Transport Layer
From session layer To session layer

L5 data L5 data

Transport
Layer H4 H4 H4 H4
H4 Transport
H4 Layer

L4 data L4data
L4 data L4 data

L4 data L4 data

To network layer Frame network layer

The Transport layer is a Layer 4 ensures that messages are transmitted in the order in
which they are sent and there is no duplication of data.
The main responsibility of the transport layer is to transfer the data completely.
It receives the data from the upper layer and converts them into smaller units known as
segments.
This layer can be termed as an end-to-end layer as it provides apoint-to-point connection
between source and destination to deliver the data reliably.
The twO protocols used in this layer are:
Transmission Control Protocol
It is a standard protocol that allows the systems to communicate over the
internet.
It establishes and maintains a connection between hosts.
When data is sent over the TCP connection, then the TCP protocol divides
the data into smaller units known as segments. Each segment travels over
the internet using multiple routes, and they arrive in different orders at the
destination. The transmission control protocol reorders the packets in the
correct order at the receiving end.
User Datagram Protocol
User Datagram Protocol is a transport layer protocol.
It is an unreliable transport protocol as in this case receiver does not send
any acknowledgment when the packet is received, the sender does not wait
for any acknowledgment. Therefore, this makes a protocol unreliable.
Functions of Transport Layer:
Service-point addressing: Computers run several programs simultaneously due to this reason,
the transmission of data from source to the destination not only from one computer to
another
computer but also from one process to another process. The transport layer adds the header that
contains the address known as a service-point address or port address. The responsibility of the
network layer is to transmit the data from one computer to another computer and the
responsibility of the transport layer is to transmit the message to the correct process.
Segmentation and reassembly: When the transport layer receives the message from the upper
layer, it divides the message into multiple segments, and each segment is assigned with a
sequence number that uniquely identifies each segment. When the message has arrived at the
destination, then the transport layer reassembles the message based on their sequence numbers.

12
Connectioncontrol: Transport layer provides two services Connection-oriented service and
connectionless service. Aconnectionless service treats each segment as an individual packet,
and they all travel in different routes to reach the destination. Aconnection-oriented service
makes a connection with the transport layer at the destination machine before delivering the
packets. In connection-oriented service, all the packets travel in the single route.
Flow control: The transport layer also responsible for flow control but it is performed end-to
end rather than across a single link.
Error control: The transport layer is also responsible for Error control. Error control is
performed end-to-end rather than across the single link. The sender transport layer ensures that
message reach at the destination without any error.
5) Session Layer
From presentation layer To presentation layer
L6 data L6 data

Session Session
Layer H5 Layer H5

Syn syn syn syn syn syn

L5 data L5 data

To transport layer From transport layer

" It isa layer 3 in the OSI model.


The Session layer is used to establish, maintain and synchronizes the interaction between
communicating devices.
Functions of Session layer:
Dialog control: Session layer acts as a dialog controller that creates a dialog between two
processes or we can say that it allows the communication between two processes which can be
either half-duplex or full-duplex.
Synchronization: Session layer adds some checkpoints when transmitting the data in a
sequence. If someerror occurs in the middle of the transmission of data, then the transmission
will take place again from the checkpoint. This process is known as
recovery.
Synchronization and
6)Presentation Layer
From Application Layer To Transport Layer
L7 data
L7 data

Presentation Encoded, encrypted,


and compressed datab
Presentation Decoded, decrypted,
Layer Laver and decompressed data H6

L6 data
L6data
To Session Layer
From Session Layer
A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
It acts as a data translator for a
network.
This layer is a part of the operating system that
format to another format. converts the data from one presentation
The Presentation layer is also known as
the syntax layer.

13
Functions of Presentation layer:
in the form of character
Translation: The processes in two systems exchange the information encoding methods, the
strings, numbers and so on. Different computers use different
It
presentation layer handles the interoperability between the different encoding methods.
converts the data from sender-dependent format intoa common format and changes the common
format into receiver-dependent format at the receiving end.
Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting
the sender-transmitted information into another form and sends the resulting message over the
network.
Compression:Data compression is a process of compressing the data, i.e., it reduces the
number of bits to be transmitted. Data compression is very important in multimedia such as text,
audio, video.
7) Application Layer
User User

Application Application
Layer X500 FTAM X.400
Layer XS00 FTAM X.400

L7 data L7 data

To Presentation Layer From Presentation Layer

An application layer serves as a window for users and application processes to access
network service.
It handles issues such as network transparency, resource allocation, etc.
An application layer is not an application, but it performs the application layer functions.
This layer provides the network services to the end-users.
Functions of Application layer:
File transfer, access, and management (FTAM): An application layer allows a user to access
the files in a remote computer, to retrieve the files from a computer and to manage the files ina
remote computer.
Mail services: An application layer provides the facility for email forwarding and storage.
Directory services: An application provides the distributed database sources and is used to
provide that global information about various objects.

12. The data ward is 11010, CRC generator polynomial =+*+1, apply CRC method and
findcode ward. Perform CRC method at sender side and receiver side both.
Convert polynomial to binary x++ 1 = 1101
Data to send is 1 1010
As divisor is4 bit so add 3 binary 0's to data to send i.e. 11010000

Seuder

O00o 14
Dat to tani 'u |lo lo 000

Receives Siole
|O00O

You might also like