Professional Documents
Culture Documents
DCC Unit 5
DCC Unit 5
2
Assignment No. 5
1) Describe OSI model with suitable diagram and functions of each
layer.
2) Describe data encapsulation in OSI model.
3) Describe the terms:
i) Entities ii)Peer entities, iii) SAP iv) POU v)SDU vi) IDU
4) Describe the working & CSMA/CD protocol.
5) List out protocols & networking devices associaed with 7 layer of
OSI.
6) Name the layers at which the following protocols works.
i) ARP ii)PPP iii) SMTP iv) ICMP
7) Draw & Explain layered structure of TCP/IP model also write
functions of each layered and protocols.
8) Explain functions of ARP Protocol.
9) Explain Network address translation(NAT).
10) Explain IPv4 and IPv6. 3
5.1 OSI Reference Model
1) Introduction to OSI Model:
• The Open System Interconnection Reference Model (OSI
Reference Model or OSI Model) is an abstract description for
layered communications and computer network
protocol design.
• It divides network architecture into seven layers which, from
top to bottom, are the Application, Presentation, Session,
Transport, Network, Data Link, and Physical Layers. It is
therefore often referred to as the OSI Seven Layer Model.
• Term “open” denotes the ability to connect any two
systems which conform to the reference model and
associated standards
4
• The model was developed by the International Organisation for
Standardisation (ISO) in 1984. It is now considered the primary
Architectural model for inter-computer communications.
• The Open Systems Interconnection (OSI) reference model is a
descriptive network scheme. It ensures greater compatibility
and interoperability between various types of network
technologies.
• The OSI model describes how information or data makes its
way from application programmes (such as spreadsheets)
through a network medium (such as wire) to another
application programme located on another network.
5
OSI History
6
OSI Layers
7
2)Peer-to-Peer Processes- Interfaces between
layer
Layer abstraction and the path of the message
8
• Protocol layers may be defined in such a way that the
communications within a layer is independent of the operation of
the layer being used.
• This is known as "peer-to-peer" communication and is an
important goal of the OSI Reference Model. OSI reference model
supporting peer-to-peer communication between two
End Systems (ES).
• In this case, the transport protocol entities communicates end-to-
end using the services of the network layer below.
• The peer-to-peer communication takes place between the end
systems using a communications protocol.
• In the case of the link layer, the communication takes place using
the service of the physical layer. The communication takes place
with the peer data link layer protocol in the next directly
connected system (either an
Intermediate System or an End System).
9
Interlayer Communication in OSI
Machine1 Machine 2
Layer3 Layer3
Layer2 Layer2
Layer1 Layer1
Physical medium
11
3) Protocol Reference Model of OSI
12
4) Organizations Of the layers
1. Network support layers : Layers 1, 2, 3
2. User support layer : Layer 5, 6, 7
• It allows interoperability among unrelated software
systems 1. Transport layer (Layer 4) : links the two
subgroups and ensures that what the lower layers have
transmitted is in a form that the upper layers can use
13
5) Data encapsulation in OSI model
• The term encapsulation describes the process of putting
headers (and sometimes trailers) around some data. Like with
the TCP/IP layers, each OSI layer asks for services from the
next lower layer. The lower layer encapsulates the higher layer’s
data between a header (Data Link protocols also add a trailer).
While the TCP/IP model uses terms like segment, packet and
frame to refer to a data packet defined by a particular layer, the
OSI model uses a different term: protocol data unit (PDU).
• A PDU represent a unit of data with headers and trailers for the
particular layer, as well as the encapsulated data. Since the OSI
model has 7 layers, PDUs are numbered from 1 to 7, with the
Physical layer being the first one. For example, the term Layer 3
PDU refers to the data encapsulated at the Network layer of the
OSI model.
14
Data encapsulation
15
• Data Encapsulation
a) PDU(Protocol data unit) conception each protocol on the
different layer has its own format.
b) Headers are added while a packet is going down the stack at
each layer.
c) Trailers are usually added on the second layer.
16
Horizontal communication
Application Application
Presentation Presentation
Session Session
Transport Transport
Network Network
Data-Link Data-Link
Physical Physical
17
Vertical Communication
18
Layer1: Physical Layer
19
Layer1: Physical Layer
1)Transformation from bit to signal- DLL consists 0’s &1’s, physical layer
converts the bit stream into signals which is suitable for transmission
media.
2)Bit rate control- Transmission medium decides the highest value of bit
rate and physical layer acts as a bit rate controller.
3)Bit synchronization- Timing related to data bit transfer is very important
in computer communication.
-Physical layer synchronize the bits by providing clocks which controls
the transmitter as well as receiver.
4)Multiplexing- use different techniques of multiplexing to improve
channel efficiency.
5)Switching- circuit switching ,message switching, packet switching out
of this circuit switching is the function of physical layer.
21
Layer2:-Data Link Layer
• It is the role of the OSI Data Link layer to prepare Network layer packets
for transmission and to control access to the physical media.
• Allows the upper layers to access the media using techniques such as
framing
• Controls how data is placed onto the media and is received from the media
using techniques such as media access control and error detection
• Trailer is added at end of the frame to achieve Error control.
• Provides flow control to avoid fast transmitter from over-running and slow
receiver by buffering bits.
• The Data Link layer is responsible for the exchange of frames between
nodes over the media of a physical network.
• Identify m/cs while transmitting the data frames by addressing.
• Initiation, maintenance and termination of the link between source and
destination required for effective communication.
22
Access Control in DLL-
The Institute of Electrical & Electronics Engineers felt the need to define the DLL
in more details, so split it into two sub-layers
1)LLC sub-layer 2)MAC sub-layer
1. Logical Link Control (LLC )
– Establishment and control of logical links between local devices on a
network.
– Error recovery and flow control.
– User addressing
– Controls the way multiple devices share the same media channel.
2. Media Access Control (MAC)
– The procedures used by devices to control access to the network medium.
• Frame sequencing
• Frame acknowledgment
• Addressing
• Frame error checking
23
MAC-Media Access Control Sub-Layer
• MAC provides for shared access to the n/w adapter and communicate
directly with NIC. NIC have assigned 2- digit hexadecimal MAC
addresses.
• MAC addresses are used to establish logical link between two computers
on the same LAN.
• Two basic forms of MAC used in LAN-
1)Token passing method used by the token ring and FDDI.
2)CSMA/CD-carrier sense multiple access with collision detection
1)Token Passing method-
-A special frame called token is passed from one station to other.
-Who is having token that system is allowed transmit the data.
-After transmitting the data workstation will release the token.
-Used in token ring and FDDI.
24
CSMA/CD
• First listens to the n/w cable, if idle then sends data.
• On simultaneous transmission collision may occur, so the system has a
collision detection mechanism.
• When collision is detected , corresponding data is retransmitted.
1)Non-Persistent CSMA- if station wants to send and channel is busy, it
will for fixed interval of time. After that again check the status if
channel is free then only transmit.
2)1-persistent CSMA-Who wants to send continuously monitor the channel
until it is idle and then transmits immediately.
-the disadvantage of this is if two stations are waiting then they will
transmit simultaneously and collision will occur & retransmission
require.
3)P-Persistent CSMA- The possibility of collision & retransmission is
reduced in this.
-all the waiting stations are not allowed to transmit simultaneously as
soon as channel becomes idle.
-station is assumed to be transmitting with a probability ‘p’.
25
The data link layer is responsible for
moving frames from one hop (node) to
the next.
26
Layer 3:-Network Layer
Implements routing of frames (packets) through the network.
Defines the most optimum path the packet should take from the
source to the destination
Defines how routing works and how routes are learned so that the
packets can be delivered.
Routers operate at Layer 3
Defines logical addressing so that any endpoint can be identified.
Handles congestion in the network.
Facilitates interconnection between heterogeneous networks
(Internetworking).
The network layer also defines how to fragment a packet into smaller
packets to accommodate different media.
27
o Logical Addressing
◦ Routing (where the packet is destinated to)
◦ Datagram Encapsulation
◦ Fragmentation and Reassembly (handling too big
packets )
◦ Error Handling and Diagnostics ( using status
messages for example )
29
4) Flow control:-Receiving system can tell to sender to decrease the data rate to avoid
congestion. Or to increase the data speed when required.
5)Error Control:-
error detection is of two types-
a)Response to signaled error
b)Complete error detection and correction.
31
Functions of Transport Layer
Ensures that the data units are delivered error free.
Ensures that data units are delivered in sequence.
Ensures that there is no loss or duplication of data units.
Provides connectionless or connection oriented service.
Provides for the connection management.
Multiplex multiple connection over a single channel.
32
Layer 5-:Session Layer
• Session layer provides mechanism for controlling the dialogue
between the two end systems. It defines how to start, control and
end conversations (called sessions) between applications.
• It provides for full-duplex, half-duplex, or simplex operation
• This layer requests for a logical connection to be established on an
end-user’s request.
• Any necessary log-on or password validation is also handled by this
layer.
• Session layer is also responsible for terminating the connection.
• This layer provides services like dialogue discipline which can be
full duplex or half duplex.
• Session layer can also provide check-pointing mechanism such that
if a failure of some sort occurs between checkpoints, all data can be
retransmitted from the last checkpoint
33
Continue….
34
Layer6:- Presentation Layer
• Coding and conversion of Application layer data to ensure that data
from the source device can be interpreted by the appropriate
application on the destination device.
• Compression of the data in a manner that can be decompressed by the
destination device.
• Encryption of the data for transmission and the decryption of data
upon receipt by the destination.
• This is the layer at which application programmers consider data
structure and presentation
• Examples: FTP, HTTP, SMTP, Remote Login,etc
35
o Translation
◦ Compression (transmission efficiency)
◦ Encryption (SSL security)
36
Layer 7:-Application Layer
• Applications and Services run on it.The application layer is the
OSI layer that is closest to the user.
• Applications on that layer (E-mail clients, web browsers, Chats,
spreadsheet programs, word processing programs, and bank
terminal programs. etc.)
• Application layer services establish an interface to the network
• Protocols provide the rules and formats that govern how data is
treated
• Protocols on the destination and the host must match
• It provides network services to the user’s applications.
• It differs from the other layers in that it does not provide
services to any other OSI layer, but rather, only to applications
outside the OSI model.
37
Conti….
7. Application Layer
38
Advantages & Disadvantages of OSI model
Advantages
• Supports Both Connection Oriented & Connectionless Services.
• Distinguishes Very Clearly Between Services, Interfaces And Protocol.
• Protocols Are Hidden, So Can Be Replaced By New One As Technology
Changes.
Disadvantages
• Session & presentation layers are not of much use.
39
Summary on Layers
40
How Does It All Work Together
• Each layer contains a Protocol Data Unit
(PDU)
– PDU’s are used for peer-to-peer contact
between corresponding layers.
41
5.2 TCP/IP Model:
1)Layered Architecture
APPLICATION LAYER
TRANSPORT LAYER
INTERNET LAYER
43
APPLICATION LAYER SMTP FTP
I. Internet Protocol :-
• It is a connectionless protocol Which is establish an end-to-end
connection b/w transmitting data.
• IP transport data in packets Which are called DATA GRAMS.
II. ICMP :-
• It stands for internet control Message protocol, which is used to
handle errors.
• By sending messages.
III. IGMP :-
• It stands for internet group management Protocol.
• It is used to handle multicasting.
IV. RARP :-
• It stands for reverse address resolution Protocol.
• It allows the host layer to finds its internet
• Address in order to reach the destination.
LAN
3. Transport Layer :-
• It is used to transport data b/w application layer & internet
layer.
Various protocols are:-
I. SCTP :-
It stands for Stream control transmission protocol supports the
newer Applications such as voice over the internet. It combines
both the features of UDP & TCP.
II. UDP :-
• It stands for “ User Datagram Protocol”, UDP is a connectionless
transport protocol.
• It provide the Process-to-Process delivery and error recovery.
III. TCP :-
• It stands for “• Transmission Control Protocol”.
• It is a connection oriented protocol. A Connection must be
established b/w both ends of a transmission before either can
transmit data.
• At sending end data is divided into smaller units called segments.
Each segment includes a sequence no. for reordering after receipt
together with an acknowledgement no. of the segments received.
• At receiving end all datagram as comes be reorder as they sends
on sequence no.’s.
4. Application Layer :-
Application Layer provides access to the network resources.
FTP :-
FTP used to transfer files b/w two sites/places.
SMTP:-
SMTP is ”SERVICE MAIL TRANSFER PROTOCOL” &
used to provide the service of electronic mail on internet.
Data Link Layers: Nodes and links, services, two categories of
links, two sub layers, link layer addressing: three types of
address, address resolution protocol(ARP)
• In the OSI model, the data link layer is a 4th layer from the top
and 2nd layer from the bottom.
• The communication channel that connects the adjacent nodes is
known as links, and in order to move the datagram from source
to the destination, the datagram must be moved across an
individual link.
• The main responsibility of the Data Link Layer is to transfer the
datagram across an individual link.
• The Data link layer protocol defines the format of the packet
exchanged across the nodes as well as the actions such as Error
detection, retransmission, flow control, and random access.
51
• The Data Link Layer protocols are Ethernet, token ring, FDDI
and PPP.
• An important characteristic of a Data Link Layer is that
datagram can be handled by different link layer protocols on
different links in a path. For example, the datagram is handled
by Ethernet on the first link, PPP on the second link.
52
Services are provided by the Data Link Layer:
Framing & Link access: Data Link Layer protocols encapsulate each network frame
within a Link layer frame before the transmission across the link. A frame consists of a data
field in which network layer datagram is inserted and a number of data fields. It specifies
the structure of the frame as well as a channel access protocol by which frame is to be
transmitted over the link.
53
• Reliable delivery: Data Link Layer provides a reliable delivery
service, i.e., transmits the network layer datagram without any
error. A reliable delivery service is accomplished with
transmissions and acknowledgements. A data link layer mainly
provides the reliable delivery service over the links as they have
higher error rates and they can be corrected locally, link at
which an error occurs rather than forcing to retransmit the data.
• Flow control: A receiving node can receive the frames at a
faster rate than it can process the frame. Without flow control,
the receiver's buffer can overflow, and frames can get lost. To
overcome this problem, the data link layer uses the flow control
to prevent the sending node on one side of the link from
overwhelming the receiving node on another side of the link.
54
• Error detection: Errors can be introduced by signal
attenuation and noise. Data Link Layer protocol provides a
mechanism to detect one or more errors. This is achieved by
adding error detection bits in the frame and then receiving
node can perform an error check.
• Error correction: Error correction is similar to the Error
detection, except that receiving node not only detect the errors
but also determine where the errors have occurred in the frame.
• Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the
nodes can transmit the data at the same time. In a Half-Duplex
mode, only one node can transmit the data at the same time.
55
Two Sublayers:
1)LLC sub-layer 2)MAC sub-layer
1. Logical Link Control (LLC )
– Establishment and control of logical links between local
devices on a network.
– Error recovery and flow control.
– User addressing
– Controls the way multiple devices share the same media
channel.
2. Media Access Control (MAC)
– The procedures used by devices to control access to the
network medium.
• Frame sequencing
• Frame acknowledgment
• Addressing
• Frame error checking 56
Link layer addressing: three types of address,
address resolution protocol(ARP)
Three Types of Addresses:
1) Unicast address:
Communication between two devices is one-on-one. Cannot be use in
one-on-many devices to communicate as one hub device need to send
the many copies of the same packet to all the hosts and will get the Acks
from them.
2) Multicast address
Communication with one-on-one and one-on-many has too many
limitations like large traffic to handle and security breach. It is used
when one-on-group one way communication is required. For example
live telecasting of video stream on internet, in this case the users are
group of people who may need the particular stream but not all the hosts.
So the user will join the particular multicast group to get that particular
stream.
57
3) Broadcast address
Communication between two devices is one-on-all. One-n-all
means all the host in the network on the same switch. When host
send the packet on broadcast address then the switch will duplicate
the packet and will send it on all the host in the network
Address Resolution Protocol (ARP) :Is an important protocol of
the network layer in the OSI model, which helps find the MAC
(Media Access Control) address given the system's IP address. The
ARP's main task is to convert the 32-bit IP address (for IPv4) to a
48-bit MAC address.
Important ARP terms:
• ARP Cache: After resolving the MAC address, the ARP sends it
to the cache stored in a table for future reference. The
subsequent communications can use the MAC address from the
table.
58
• ARP Cache Timeout: It is the time for which the MAC
address in the ARP cache can reside.
• ARP request: Broadcasting a packet over the network to
validate whether we came across the destination MAC address
or not.
• ARP response/reply: The MAC address response that the
source receives from the destination aids in further
communication of the data.
59
Address Resolution Methods
• Table lookup - Bindings stored in memory with protocol
address as the key. It uses the data link layer checks the
protocol address to find the hardware address.
• Dynamic–This type of network messaging method is used for
"just-in-time" resolution. Data link layer sends message
requests in a hardware address. destination responds.
• Closed-form computation–In this method, a protocol address
is based on a hardware address. Data link layer derives the
hardware address from the protocol address.
60
Types of ARP
• Proxy ARP
• Gratuitous ARP
• Reverse ARP
• Inverse ARP
61
Network layer: Address space, classful and classless addressing
protocol(DHCP), network address resolution (NAT).
62
• Network Address Translation (NAT) is a process in which one
or more local IP address is translated into one or more Global IP
address and vice versa in order to provide Internet access to the
local hosts. Also, it does the translation of port numbers i.e.
masks the port number of the host with another port number, in
the packet that will be routed to the destination. It then makes
the corresponding entries of IP address and port number in the
NAT table. NAT generally operates on router or firewall.
63
5.3 Introduction – addressing mechanism in the
internet IP Addressing –IP Address classes,
classless IP Addressing, Subnetting , supernetting ,
masking.
IP Address:
What is IP address ?
An IP address is an identifier for a particular machine on a
particular network.
It is part of a scheme to identify computers on the internet.
IP address are also referred to as IP number and internet address.
64
The network portion of the IP address is allocated to internet
service provider(ISP) by the InterNIC, under authority of the
internet assigned number authority(IANA).
ISPs then assign the host portion of the IP address to the machines
on the networks that they operate.
Which section of the IP address represent the network & which
sections represent the machine will depend on what “class” of IP
address is assigned to a network.
65
66
5.4 IPv4 and IPv6
IP Protocol: Two main protocols are:
1) IPv4
2) IPv6
IPv4:It is 32 bit number represented in 4 decimal number where
each decimal number is of 8 bit (octet) is separated by a dot(.).
Thus representation known as doted decimal representation.
IP address consists of 2 components the network id and the host
id.
67
There are five classes of
IP addresses:-
Class A
Class B
Class C
Class D
Class E
Addresses are 128 bits (416 bytes) long. Routers don’t fragment the
packets but sending host fragment the packets. Header doesn’t
includes a checksum. Classes of addressing are unicast, anycast,
multicast. Must support 1208 byte packet size. IPv6 address are
represented in a hexadecimal, colonseparated notation. IPv6
address are represented in a hexadecimal, colonseparated notation.69
5.5 OSI and TCP/IP network Model.
Similarities between OSI and TCP / IP Reference Models
• Both the reference models are based upon layered architecture.
• The layers in the models are compared with each other. The
physical layer and the data link layer of the OSI model
correspond to the link layer of the TCP/IP model. The network
layers and the transport layers are the same in both the models.
The session layer, the presentation layer and the application
layer of the OSI model together form the application layer of
the TCP/IP model.
• In both the models, protocols are defined in a layer-wise
manner.
• In both models, data is divided into packets and each packet
may take the individual route from the source to the
destination.
70
Differences between OSI and TCP / IP Reference Models
• OSI model is a generic model that is based upon functionalities
of each layer. TCP/IP model is a protocol-oriented standard.
• OSI model distinguishes the three concepts, namely, services,
interfaces, and protocols. TCP/IP does not have a clear
distinction between these three.
• OSI model gives guidelines on how communication needs to be
done, while TCP/IP protocols layout standards on which the
Internet was developed. So, TCP/IP is a more practical model.
• In OSI, the model was developed first and then the protocols in
each layer were developed. In the TCP/IP suite, the protocols
were developed first and then the model was developed.
• The OSI has seven layers while the TCP/IP has four layers.
71
72