Chapter Two
Chapter Two
Chapter Two
COMMUNICATION
Introduction
Why communication in distributed systems? because
there is no shared memory
Two communicating processes must agree on the syntax
and semantics of messages.
A protocol is a set of rules that governs data communications
A protocol defines what is communicated, how it is
communicated, and when it is communicated.
Protocols are sets of instructions designed and coded
by programmers.
The key elements of a protocol are syntax,
semantics, and timing
Cont…
Syntax: refers to the structure or format of the data
Semantics: refers to the meaning of each section of
bits.
Timing: refers to when data should be sent and how
fast.
Computer networks are created by different entities.
Standards are needed so that these heterogeneous
networks can communicate with one another.
The two best-known standards are the OSI model and
the TCP/IP model.
The OSI Model
It was developed by the International Organization for
Standardization (ISO).
It is a model for a computer protocol architecture
and as a framework for developing protocol
standards.
An ISO standard that covers all aspects of network
communications is the Open Systems Interconnection
(OSI) model.
Comprises of seven layers
4
Advantages of OSI
5
Why layered communication?
To reduce complexity of communication task by
splitting it into several layered small tasks
Assists in protocol design
Foster competition
Changes in one layer do not affect other layers
provides a common language
6
Summary of OSI Layers
7
LAYER 7: APPLICATION
The application layer is responsible for providing
services to the user.
Closest to the user and provides user interfaces
Establishes the availability of intended communication
partners.
Examples of Application layer protocols are:
Telnet, SMTP, FTP, SNMP, HTTP, DNS, DHCP
8
LAYER 6: PRESENTATION
10
LAYER 4: TRANSPORT
It regulates information flow to ensure process-to- process
connectivity between host applications reliably and
accurately
Adds service point address or Port address
Segmentation & Re-assembly: SEGMENTS data from
sending node and reassembles data on receiving node
Flow control / Error control at Source to destination
level
Connection oriented transport service ensures that data is
delivered error free, in sequence with no losses or
duplications
Establishes, maintains and terminates virtual circuits
11
Transport Layer Cont…
Connection oriented / Connectionless:
TCP (Reliable,provides guaranteed delivery),
UDP (Unreliable, less overhead, reliability can be
provided by the Application layer)
Provides multiplexing: the support of different flows of
data to different applications on the same host
12
Transport Layer Cont…
Transmission Control Protocol (TCP)
TCP is a connection-oriented sub protocol, which means that a
connection must be established between communicating nodes
before this protocol will transmit data.
TCP further ensures reliable data delivery through sequencing and
checksums.
It takes large blocks of information from an application and breaks
them into segments.
It numbers and sequences each segment to keep the order
the application intended.
After these segments are sent on the transmitting host, TCP
waits for an acknowledgment of the receiving end’s.
Retransmitting any segments that aren’t acknowledged.
Transport Layer Cont…
It is Connection oriented means that a virtual
connection is established before any user data is
transferred.
TCP can also recognize duplicate messages and will
discard them appropriately.
If the sending computer is transmitting too fast for the
receiving computer, TCP can employ flow control
mechanisms to slow data transfer.
TCP can also communicates delivery information to the
upper-layer protocols and applications it supports.
All these characteristics makes TCP an end-to-end reliable
transport protocol.
Transport Layer Cont…
Fig: Establishing a TCP connection
Transport Layer Cont…
User Datagram Protocol(UDP)
User Datagram Protocol (UDP) is basically the scaled-down
economy model of TCP, which is why UDP is sometimes referred to
as a thin protocol.
Like a thin person , a thin protocol doesn’t take up a lot of room—or
in this case, require much bandwidth on a network.
UDP does not sequence the segments and does not care about the
order in which the segments arrive at the destination.
UDP just sends the segments off and forgets about them.
UDP is a connectionless transport service.
In other words, UDP offers no assurance that packets will be
received in the correct sequence.
In fact, this protocol does not guarantee that the packets will be
received at all.
Transport Layer Cont…
It doesn’t follow segments, check up on them, or even
allow for an acknowledgment of safe arrival. Because of
this, it’s referred to as an unreliable protocol.
This does not mean that UDP is ineffective, only that it
doesn’t deal with reliability issues at all.
Furthermore, UDP doesn’t create a virtual circuit or
doesn’t contact the destination before delivering
information to it.
- Because of this, it’s also considered a connectionless
protocol.
Transport Layer Cont…
LAYER 3: NETWORK
Defines source to destination delivery of packets across
Networks.
Defines logical addressing and best path determination.
Treat each packet independently
Defines how routing works and how routes are learned
Converts frames to packets
Routed protocols ( encapsulate data into packets) and
Routing protocols (create routing tables) work on this layer
Examples of Routed protocols are: IP,
Routers operate at Layer 3.
19
NETWORK Layer Cont…
Internet Protocol (IP)
Used for data communication in packet switched
network
It belongs to the Network layer of the OSI model.
It provides information about how and where data
should be delivered, including the data’s source and
destination addresses.
IP is an unreliable, connectionless protocol, which
means that it does not guarantee delivery of data.
However, use IP to ensure that data packets are delivered
to the right addresses.
NETWORK Layer Cont…
ARP (Address Resolution Protocol)
ARP (Address Resolution Protocol) is a Network layer protocol that
obtains the MAC (physical) address of a host, or node, and then
creates a database that maps the MAC address to the host’s IP
(logical) address.
RARP (Reverse Address Resolution Protocol)
If a device doesn’t know its own IP address, it cannot use ARP.
This is because without an IP address, a device cannot issue an ARP
request or receive an ARP reply.
One solution to this problem is to allow the client to send a broadcast
message with its MAC address and receive an IP address in reply.
This process, which is the reverse of ARP, is made possible by RARP
(Reverse Address Resolution Protocol).
Finding logical address from physical address
NETWORK Layer Cont…
Example of ARP broad cast:
Network Layer Cont…
IP Address:
• To work with this 32 bit wide IP addresses ,it needs to be divided into four
fields
• Each field is 8 bits wide, can be converted to base 10 and separated by
dots.
• Each octet has a decimal value from 0 to 255
• This writing scheme is called dotted decimal format and each part is called
an octet b/c it is made of eight bits.
Network Layer: Logical IP addressing
IP address formats
Example
Dotted binary format
00001010.00000100.00001111.00001100
Dotted decimal format
10.4.15.12
IP addresses have two portions , such as:
Network portion and
Host portion.
Network Layer: Logical IP addressing
The network portion/ addresses
Uniquely identifies the network in which the computer is located
Example: In the IP address 172.16.30.56, 172.16 is the network
address.
The host portion/ addresses
Identifies the source and destination computer / machine in the
network, also called node address.
Example: In the IP address 172.16.30.56, 30.56 is the host/node
address.
Network Layer: Logical IP addressing
Host and network portions
Network Layer: Logical IP addressing
IP address classes:
IP addresses are classified into three main address classes to
define large, medium and small networks.
Class A IP addresses are used for larger networks.
Class B for medium networks.
Class C for small networks.
Other classes – w/c are used for multicasting and research purposes
are D and E .
Class A 0 0 – 127* 8
40
Properties of Physical Layers
Deals with bit stream.
Transmits raw bit stream over physical cable
defines cables, cards, and physical aspects
defines NIC attachments to hardware, how cable is
attached to NIC
defines techniques to transfer bit stream to cable
Layer 1 Device: Repeater, Hub, Multiplexer
41
Physical layer
physical
connection
Thank You!