Chapter Two: Protocols and Architectures
Chapter Two: Protocols and Architectures
Chapter Two: Protocols and Architectures
3
– Standard /nonstandard
• Nonstandard protocols built for specific computers and tasks
• K sources and L receivers leads to K*L protocols and 2*K*L
implementations
• If common protocol used, K + L implementations needed
4
Functions of Protocols
each device must perform the same steps the same way so that the
data will arrive and reassemble properly; if one device uses a
protocol with different steps, the two devices will not be able to
communicate with each other
the following are categories of functions that form the basis of
protocols
encapsulation
segmentation and reassembly
connection control
addressing
multiplexing
transmission services
5
1. Encapsulation
the inclusion of control information to data is called
encapsulation. Each frame contains not only data but also control
information
such control information falls into three categories: address
(sender/receiver), error-detecting code and protocol control
(information about protocol functions)
6
2. Segmentation (by the sender also called fragmentation) and
reassembly (by the receiver)
a block of data for transmission is of some bounded size
at the application level, we refer to a logical unit of data transfer as a
message
lower level protocols may need to break the data up into blocks of
some bounded size
this process is called segmentation
reasons for segmentation:
the communication network may only accept blocks of data up to
a certain size
error control may be more efficient with a smaller frame size;
fewer bits need to be retransmitted when a frame gets corrupted
facilitates more equitable access to shared transmission facilities
(for example, without maximum block size, one station could
monopolize a multipoint medium)
7
disadvantages
since a frame contains certain amount of control information, the
smaller the block size, the greater the percentage overhead
frame arrivals may generate an interrupt that must be serviced;
hence smaller blocks result in more interrupts
more time is spent processing smaller, more numerous frames
the counterpart of segmentation is reassembly
on receipt, the receiving device must reassemble the segmented data
into a message appropriate to the application
8
3. Connection control
two types of protocols (services)
connectionless service
the packets are sent from one party to another with no need for
connection establishment or connection release
the packets are not numbered, they may be delayed, lost, or
arrive out of sequence; there is no acknowledgement either
UDP (User Datagram Protocol), one of the transport layer
protocols, is connectionless
good for one time transaction; e.g., email
9
connection-oriented service
in connection-oriented data transfer, a logical association or
connection is established between the communicating computers
(devices)
long sustained session
orderly and timely delivery of packets, e.g., FTP
three phases are involved
connection establishment (agreement to exchange data)
data transfer (data and control information exchanged)
connection termination (termination request) - by any of the
two parties
TCP (Transport Control Protocol) is connection-oriented
the key characteristics of connection-oriented data transfer is that
sequencing is used
each side sequentially numbers the frames that it sends to the other
side
10
because each side remembers that it is engaged in a logical
connection, it can keep track of both outgoing numbers, which it
generates, and incoming numbers which are generated by the other
side
sequencing supports three main functions
ordered delivery: frames may not arrive in the order in which they
were sent, because they may traverse different paths
flow control: a receiving station has to limit the amount or rate of
data that is sent by a transmitting station
the simplest form of flow control is stop-and-wait procedure in
which each frame must be acknowledged before the next can be
sent
more efficient protocols involve some form of credit provided to
the transmitter, which is the amount of frames that can be
transmitted without an acknowledgement; e.g. sliding window
technique
11
error control: error control is implemented as two separate functions;
error detection and retransmission
if an error is detected, the receiver discards the frame
upon failing to receive an acknowledgement to the frame in a
specified reasonable time, the sender retransmits the frame
some protocols also employ error correction which enables the
receiver not only to detect errors but, in some cases, to correct them
4. addressing
a unique address is associated with each end-system in a configuration
(e.g. workstation, server) and each intermediate system (e.g. router)
an example is an IP address in TCP/IP connection
12
5. multiplexing
occurs when multiple connections share a single connection (multiple
access)
6. transmission services
a variety of additional services can be provided
priority: messages such as control messages may need to get through to
the destination station with minimum delay
security: security mechanisms, restricting access, may be invoked
Protocols in a layered architecture
protocols that work together to provide a layer or layers of the model
are known as a protocol stack or suite, e.g. TCP/IP
each layer handles a different part of the communications process and
has its own protocol
13
The Models
• For two computers, in a computer network, to communicate must talk
the same language
– follow the same protocol
• A network protocol is a formal set of rules, conventions and data
structure that governs how computers and other network devices
exchange information over a network
• In earlier days, many of the networks that were built used different
hardware and software implementations
– they were incompatible and it became difficult for networks using
different specifications to communicate with each other
14
• To address the problem of networks being incompatible and unable to
communicate with each other, we need some way of model
– A widely accepted structuring technique is layering
– The communications functions are partitioned into a hierarchical set
of layers
– Each layer performs a related subset of the functions
– it provides services to the next-higher layer and accepts service for
the lower layer
– Each layer covers different network activities, equipment, or
protocols
– This separation into smaller more manageable functions is known as
layering.
– Layering specifies different functions and services as data moves
from one computer through the network cabling to another computer
15
– The layers are separated from each other by boundaries called
interfaces
– All requests are passed from one layer, through the interface, to
the next layer
– E.g. OSI and TCP/IP
• Why layering?
– reduces complexity (one big problem to smaller ones)
– standardizes interfaces (between layers)
– facilitates modular engineering (different teams work on
different modules)
– assures interoperable technology
– accelerates evolution of networking technology
– simplifies teaching and learning
16
OSI REFERENCE MODEL
was developed by the International Organisation for Standardisation
(ISO) in 1984.
is now considered the primary Architectural model for inter-computer
communications.
is a descriptive network scheme.
It ensures greater compatibility and interoperability between various
types of network technologies.
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.
divides the problem of moving information between computers over a
network medium into SEVEN smaller and more manageable problems .
defines how each layer communicates and works with the layers
immediately above and below it
17
18
THE SEVEN OSI REFERENCE MODEL LAYERS
19
20
• The principles applied to arrive at the seven layers
– Each layer should perform a well-defined function.
– A layer should be created where a different abstraction is
needed.
– The function of each layer should be chosen with an eye toward
defining internationally standardized protocols.
– The layer boundaries should be chosen to minimize the
information flow across the interfaces.
– The number of layers should be large enough that distinct
functions need not be thrown together in the same layer out of
necessity and small enough that the architecture does not become
unwieldy.
21
LAYER 7: APPLICATION
The application layer is the OSI layer that is closest to the user.
It provides network services to the user’s applications.
contains all the higher level protocols that are commonly needed by users
LAYER 6: PRESENTATION
The presentation layer ensures that the information that the application
layer of one system sends out is readable by the application layer of
another system.
If necessary, the presentation layer translates between multiple data
formats by using a common format.
Provides encryption and compression of data.
Examples :- JPEG, MPEG, ASCII, EBCDIC, HTML.
22
LAYER 5: SESSION
The session layer defines how to start, control and end conversations
(called sessions) between applications.
This includes the control and management of multiple bi-directional
messages using dialogue control.
keeping track of whose turn it is to transmit
It also synchronizes dialogue between two hosts' presentation layers
and manages their data exchange.
preventing two parties from attempting the same critical
operation at the same time
The session layer offers provisions for efficient data transfer.
checkpointing long transmissions to allow them to continue
from where they were after a crash
Examples :- SQL, ASP(AppleTalk Session Protocol).
23
LAYER 4: TRANSPORT
accepts data from above, splits it up into smaller units if need be,
passes them to the network layer, and ensure that the pieces all arrive
correctly at the other end
The transport layer segments data from the sending host's system and
reassembles the data into a data stream on the receiving host's system.
End-to-end error free delivery of entire message
Services include:
Service port addressing
Port number
Segmentation /reassembly
Connection control
Connectionless or connection oriented
Flow and error control
24
LAYER 3: NETWORK
Defines end-to-end delivery of packets.
Defines logical addressing so that any endpoint can be identified.
Defines how routing works and how routes are learned so that the
packets can be delivered.
The network layer also defines how to fragment a packet into
smaller packets to accommodate different media.
Examples :- IP, IPX, AppleTalk.
25
LAYER 2: DATA LINK
The data link layer provides access to the networking media and
physical transmission across the media and this enables the data to
locate its intended destination on a network.
The data link layer provides reliable transit of data across a physical
link by using the Media Access Control (MAC) addresses.
The data link layer uses the MAC address to define a hardware or data
link address in order for multiple stations to share the same medium and
still uniquely identify each other.
Concerned with network topology, network access, error notification,
ordered delivery of frames, and flow control.
Examples :- Ethernet, Frame Relay, FDDI.
26
LAYER 1: PHYSICAL
• the layer that actually interacts with the transmission media
• the physical part of the network that connects network components
together
• involved in physically carrying information from one node in the
network to the next
The physical layer deals with the physical characteristics of the
transmission medium.
It defines
mechanical: the size and shape of the network connector,
how many pins does the network connector has and what
each pin is used for
electrical: how many volts represent a 1 and how many a 0
timing: how many nanoseconds a bit lasts
whether communication is one way or in both directions
simultaneously
27
Such characteristics as voltage levels, timing of voltage changes,
physical data rates, maximum transmission distances, physical
connectors, and other similar attributes are defined by physical layer
specifications.
Examples :- EIA/TIA-232, RJ45, BNC.
28
SUMMARY
There was no standard for networks in the early days and as a result it was
difficult for networks to communicate with each other.
The International Organisation for Standardisation (ISO) recognised this.
and researched various network schemes, and in 1984 introduced the
Open Systems Interconnection (OSI) reference model.
The OSI reference model has standards which ensure vendors greater
compatibility and interoperability between various types of network
technologies.
The OSI reference model organizes network functions into seven
numbered layers.
Each layer provides a service to the layer above it in the protocol
specification and communicates with the same layer’s software or
hardware on other computers.
Layers 1-4 are concerned with the flow of data from end to end through
the network and Layers 5-7 are concerned with services to the
applications.
29
TCP/IP Reference model
• used in the grandparent of all wide area
computer networks, the ARPANET
• Developed by Department of Defense
(DoD) to ensure and preserve data
integrity as well as maintain
communication in the even of
catastrophic war
• Condensed version of OSI model –
contains four layers instead of seven
• Independent of the Network access
methods, Frame format, & Medium.
30
• Can be used to connect different network types
– E.g. Ethernet or Token Ring
– X.25 or Frame Relay
• Can easily be adapted to new technology such as ATM
• Goals
– Multiple networks communicate in a seamless way
31
Functions of layer
• The Process/Application
– protocols for node-to-node application communication and also controls
user-interface specifications.
– Defines TCP/IP application protocols
– Defines how host programs interface with transport layer services to use
the network
• The Host-to-Host
– parallels the functions of the OSI’s Transport layer, defining protocols
for setting up the level of transmission service for applications.
– Provides communication session management between host computers
– Defines the level of service and status of the connection used when
transporting data.
• The Internet layer
– corresponds to the OSI’s Network layer, designating the protocols
relating to the logical transmission of packets over the entire network.
– Responsible for addressing, packaging , and routing functions 32
• Network Access layer
– The equivalent of the Data Link and Physical layers of the OSI model
– Oversees hardware addressing and defines protocols for the physical
transmission of data.
– Specifies details of how data is physically sent through the network, including
how bits are electrically signaled by hardware devices that interface directly
with a network medium
– Responsible for placing and receiving TCP/IP packet to/from the network
medium
• Shortcomings of TCP/IP
– the model does not clearly distinguish the concepts of service,
interface, and protocol
– the TCP/IP model is not at all general and is poorly suited to describing
any protocol stack other than TCP/IP
– the host-to-network layer is not really a layer at all
– does not distinguish (or even mention) the physical and data link layers
33
• Similarities
OSI vs. TCP/IP
– Both are based on the concept of a stack of independent protocols
– The functionality of the layers is roughly similar
– The layers above transport are application-oriented users of the transport
service.
• Differences
– The number of layers: 7 in OSI model and 4 in TCP/IP model
– Services, Interfaces, & Protocols
• In OSI model they are central
• TCP/IP model didn’t clearly distinguish between them
– Services: - Tells what the layer does, not how entities above it access it or
how the layer works. It defines the layer’s semantics
– Interface: - Tells the processes above it how to access it. It specifies what
the parameters are and what results to expect. Says nothing about how the
layer works inside
– Protocols: - It is the layer’s own business. It can also change them at will
without affecting software in higher layers
34
• The protocols in the OSI model are better hidden than in the TCP/IP model
and can be replaced relatively easily as the technology changes
• Protocol Vs. Model
– In the OSI model, the model was devised before the corresponding protocols
were invented
– With TCP/IP the protocols came first and the model
• No problem with the protocols fitting the model in TCP/IP model but in
OSI model it is a problem.
• In TCP/IP the model did not fit any other protocol stacks
• The area of connectionless Vs. Connection-oriented communication
– In OSI:
• Network Layer supports both Connectionless and Connection oriented
• Transport Layer supports only Connection oriented
– In TCP/IP:
• Transport Layer supports Connectionless and Connection oriented
• Network Layer supports only Connectionless
• OSI:
– Difficult to Implement 35
TCP/IP protocol stack
• Two levels of addressing are needed
• Unique global Internet address (IP address)
• Each process with a host must have an address that is
unique within the host (Port number
36
Application/Process layer
• Protocols at this layer are categorized as: User Protocols that provide
service directly to users, & Support Protocols that provide common
system functions
– User Protocols: FTP, SMTP, Telnet
– Support Protocols: DNS, DHCP, SNMP
• Telnet - allows a user on a remote client machine, called the Telnet
client, to access the resources of another machine, the Telnet server.
– Telnet makes client machine appear as though it were a terminal
directly attached to the server.
• File Transfer Protocol (FTP) - is the protocol that actually lets us
transfer files, and it can accomplish this between any two machines
using it.
– Usually users are subjected to authentication
• Network File System (NFS) - a protocol specializing in file sharing
allowing two different types of file systems to interoperate.
37
• Simple Mail Transfer Protocol (SMTP) - uses a spooled, or queued,
method of mail delivery.
– POP3 is used to receive mail.
• Simple Network Management Protocol (SNMP) - collects and
manipulates valuable network information.
– This protocol stands as a watchdog over the network, quickly
notifying managers of any sudden turn of events.
• Domain Name Service (DNS) – resolves hostnames—specifically,
Internet names, such as www.aau.edu.et to the IP address 10.6.10.3
• Dynamic Host Configuration Protocol (DHCP) - gives IP addresses
to hosts.
– It allows easier administration and works well in small-to-even-
very large network environments.
38
Transport layer
• Transmission Control Protocol (TCP) - takes large blocks of
information from an application and breaks them into segments.
– It numbers and sequences each segment so that the destination’s TCP
protocol can put the segments back into the order the application
intended.
– Uses three way handshaking
• User Datagram Protocol (UDP) - does not sequence the segments and
does not care in which order the segments arrive at the destination. But
after that, UDP sends the segments off and forgets about them. It doesn’t
follow through, check up on them, or even allow for an acknowledgment
of safe arrival — complete abandonment.
• TCP for reliability and UDP for faster transfers.
39
• TCP and UDP must use port numbers
• These port numbers identify the source and destination application or
process in the TCP segment.
• There are 2^16 = 65536 ports available.
– Well-known ports - The port numbers range from 0 to 1023.
– Registered ports - The port numbers range from 1024 to 49151.
• Registered ports are used by applications or services that need to
have consistent port assignments.
– Dynamic or private ports - The port numbers range from 49152 to
65535. These ports are not assigned to any protocol or service in
particular and can be used for any service or application.
• If a port is closed/blocked, you cannot communicate with the computer
by the protocol using that port.
– Eg. If port 25 is blocked you cannot send mail.
• Firewalls by default block all ports.
• You should know the port numbers of different protocols!! 40
TCP UDP
Sequenced Unsequenced
Reliable, Acknowledgments, & 3- Unreliable
way handshake
Connection-Oriented Connectionless
Checksum for error checking Checksum for error checking
Flow Control No flow control
Assign datagram size dynamically Datagram segment is the
same in size
41
42
Internet Layer
• Internet Protocol (IP) essentially is the Internet layer.
• The other protocols found here merely exist to support it.
• It can do this because all the machines on the network have a software,
or logical, address called an IP address.
• Internet Control Message Protocol (ICMP) works at the Network layer
and is used by IP for many different services.
– ICMP is a management protocol and messaging service provider for IP.
– The following are some common events and messages that ICMP relates
to:
• Destination Unreachable If a router can’t send an IP datagram any
further, it uses ICMP to send a message back to the sender, advising it
of the situation.
• Buffer Full If a router’s memory buffer for receiving incoming
datagrams is full, it will use ICMP to send out this message until the
congestion abates.
43
• Hops Each IP datagram is allotted a certain number of routers, called hops,
to pass through. If it reaches its limit of hops before arriving at its
destination, the last router to receive that datagram deletes it.
• The executioner router then uses ICMP to send a message, informing the
sending machine of the end of its datagram.
• Ping (Packet Internet Groper) uses ICMP echo messages to check the
physical and logical connectivity of machines on a network.
• Traceroute Using ICMP timeouts, Traceroute is used to discover the path a
packet takes as it traverses an internetwork.
• Address Resolution Protocol (ARP) finds the hardware address of a host
from a known IP address.
– ARP interrogates the local network by sending out a broadcast asking the
machine with the specified IP address to reply with its hardware address.
• Reverse Address Resolution Protocol (RARP) discovers the identity of the
IP address for diskless machines by sending out a packet that includes its
MAC address and a request for the IP address assigned to that MAC address.
–
44
– A designated machine, called a RARP server, responds with the
answer, and the identity crisis is over.
45
Network Access Layer Protocols
• Point to Point Protocol (PPP)
– Used to establish a connection to your ISP via modem
– Is used to carry out the following functions
• Data encapsulation
• Link Control
• Network Control
• Wireless Fidelity (Wi-Fi)
– Allows computers and other devices to communicate over
a wireless signal
– Describes all network components that are based on one
of the 802.11 standards, including 802.11b, 802.11g, and
802.11n
46