Protocols notes
Protocols notes
A communications protocol defines the rules for sending blocks of data (each known as a Protocol
Data Unit (PDU)) from one node in a network to another node. Protocols are normally defined in a
layered manner and provide all or part of the services specified by a layer of the OSI reference
model. A protocol specification defines the operation of the protocol and may also suggest how the
protocol should be implemented. It consists of three parts:
1. Definition of Protocol Control Information (PCI) format which forms the PDU header
2. Definition of procedures for transmitting and receiving PDUs
3. Definition of services provided by the protocol layers
Functions
Every protocol is set up by rules.
� Data Protocols: dictate some of the same types of relationships as a Diplomatic Protocol
(which suggest who is seated next to whom, how officials of different ranks are to be addressed,
what kind of response is appropriate to another�s statement, who is introduced to whom, and other
such niceties that govern diplomatic affairs).
� In layered Protocols, functions are assigned to one layer, but the rules regarding this are
rigid.
� The internetworking protocol is likely to be either Transport Control Protocol/ Internet
Protocol (TCP/IP).
� IP is a higher-level protocol that uses an addressing scheme entirely different from that used
on the LAN.
A station has two addresses:
� A permanent firmware address
� An ad hoc IP address
Session Control
Communications Control
Protocols can be classified into two groups:
� Peer-to-Peer: Does not use a controller, so devices can communicate with one another at
will.
� Master-slave: In the latter protocol the master controls the functioning of the data link and
controls data transfer between the host and its terminals.
All communication goes between slaves goes through the master.
Link Management
After the session is set up, the protocol controls the flow of data across the data link.
Synchronizing
Modems exchange signal to determine the highest speed at which they can exchange data, falling
back to a lower speed if the circuit will not support the maximum.
Addressing
Every session requires an address to set up a connection if the protocol is connection-oriented or to
route packets if it is connectionless.
Routing
In data networks having multiple routes to the destination, the protocol determines the appropriate
route based on variables such as cost, congestion, distance, and type of facility.
Data Segmenting and Reassembly
A continuous data stream from the source is segmented into frames, cells, or packets as appropriate
and equipped with header and trailer records for transmission over the network.
Data Formatting
The bit stream may require conditioning before transmission and restoration after reception.
Supervision
The protocol establishes a connection, determines how the session will be started and ended, which
end will control termination of the session, how charging will be handled, and so on.
Flow Control
Protocols protect networks from congestion by sending signals to the source to halt or limit traffic
flow.
Error Detection and Correction
Protocols check for errors, acknowledge correctly received data blocks, and send repeat requests
when blocks contain an error.
� Most sophisticated protocols can acknowledge multiple packets using one or two types of
acknowledgment.
� Selective Repeat Acknowledgement: Enables the receiving device to request specific
packets to be repeated.
� Go-Back-N Method: The receiver instructs the sender to resend an errored packet and all
subsequent packets.
Failure Recovery
If the session terminates unexpectedly, the protocol determines how to prevent the application from
being corrupted.
Sequencing
If data blocks are received out of their original sequence, the protocol delivers them to the receiving
device in the correct order.
Setting Session Variables
The protocol determines such variables as whether the session will be half or full duplex, network
login and authentication, file transfer protocols that will be used, and so on.
IP Addressing
This is both the strength and the weakness of the TCP/IP protocol. Addressing is composed of three
parts:
� Class
� Network Portion
� Host
Each IP address is made up of four classes:
� Class A Addresses: has 24 bits for hosts and 8 bits for networks, 1 bit of which identifies the
network class, leaving 7 bits for network number.
� Class B Addresses: Allocates 14 bits for host addresses and 16 bits for networks.
� Class C Addresses: Has 8 bits for hosts and 21 bits for the network address.
� Class D Addresses: Are multicast addresses.
IPv6 (IP version 6): Is an expanded addressing method that has been approved.
Internet Network Information Center (InterNIC): This is how Internet addresses are assigned.
Anyone using TCP/IP is advised to obtain an address from InterNIC.
Gateways
These are the key to a host�s finding its way through the Internet.
� They contain routing tables that the programmer enters or that the gateway builds by
querying neighboring gateways.
� It has detailed routing information for all directly attached networks and knowledge of
where to send traffic for remote networks.
FTP
As we have seen, the need for network came up primarily to facilitate sharing of files between
researchers. And to this day, file transfer remains one of the most used facilities.The protocol that
handles these requests is File Transfer Protocol or FTP.