ST Solution - CN
ST Solution - CN
ST Solution - CN
HDLC Frame
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
U-Frame
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
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)
Data Flow
-----.-----.
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.
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.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
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
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
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.
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
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
L5 data L5 data
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
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