Vous êtes sur la page 1sur 11

Protocol It is a set of rules governing the way that devices communicate with each other

When data are being transferred in a computer system there must be rules set up as to how the
transfer is going to be done. The set of rules that needs to be established to allow the transfer of
data to be carried out is known as a protocol. There are a number of protocols for e.g. http or
TCP/IP.
Typical rules would define:

the wire connecting the two parts of the system: errors would occur if one device had a
serial connection and the other was expecting a parallel connection

the bit rate used: if one device sent data at a particular bit rate and the other device was
set to receive at a different rate, the message would not be received correctly

the parity used: if one device used even parity and the other device used odd parity then
no correctly sent byte of information would ever be accepted.

When two devices need to communicate, the initial contact between them is a signal called the
handshake signal. This involves an exchange of data between the two devices to establish that
they are both ready for the communication to start and that they agree on the rules that are
going to be used for the communication.
Physical and logical parts of a protocol
The interface between two devices is the connection between them through which data can be
sent. The physical part includes the wires or other connection. The logical part includes the rules
agreed about the form of error checking used. There are many other rules to the logical parts of
the protocol, for instance:

how messages are routed from one place to another

how the flow of data is going to be controlled

how the data transfer can be synchronized so that data are not mixed up.

Protocols in a Layered Architecture


In a network, several protocols have to work together. By working together, they ensure that the
data is properly prepared, transferred to the right destination, received, and acted upon.
The work of the various protocols must be coordinated so that no conflicts or incomplete
operations take place. The results of this coordination effort are known as layering.
Protocol Stacks

A protocol stack is a combination of protocols. Each layer of the stack specifies a different
protocol for handling a function or subsystem of the communication process. Each layer has its
own set of rules.. Figure 6.1 shows the OSI reference model and the rules associated with each
layer. The protocols define the rules for each layer in the OSI reference model.

MAC Address - a unique identifier assigned to network connections


TCP/IP Model Layers
Each layer of the TCP/IP has a particular function to perform and each layer is completely
separate from the layer(s) next to it. The communication process that takes place, at its simplest
between two computers, is that the data moves from layer 4 to 3 to 2 then to 1 and the
information sent arrives at the second system and moves from 1 to 2 to 3 and then finally to
layer 4.

Note: TCP/IP is actually a suite of protocols sometimes referred to as the Internet Protocol
Suite.

The data is sent down the protocol stack


Each layer adds to the data by prepending headers

TCP/IP stack
The most common protocol on the internet is the Transmission Control Protocol/Internet
Protocol (TCP/IP). To send data over a TCP/IP network requires four steps or layers:
Layer

Description

Name

Application Encodes the data being sent

Transport

Splits the data into manageable chunks, adds port number information

Internet

Adds IP addresses stating where the data is from and where it is going

Link

Adds MAC address information to specify which hardware device the message
came from, and which hardware device the message is going to

Successive encapsulation (wrapping) of application data descending through the protocol stack
before transmission on the local network link
To show you how the TCP/IP stack works we going to use the following data as an example:

Matt, Mark, Luke, John


Application
The application layer makes sure that the data is sent in a format that will be understandable by
the recipient. This will mean formatting data to be sent in a standard way applicable to that
application, for example HTTP, FTP etc. In this case we are going to wrap each piece of data in
XML tags.
<gospel>Matt</gospel><gospel>Mark</gospel><gospel>Luke</gospel><gospel>John</gospel>
Transport
The transport layer looks at the data to be sent and splits it into chunks that can fit into data
packets. It then attaches a number to each, specifying that packet's order, this allows the
recipient to place the data back together correctly at the other end. To each packet it then
attaches a port number dependent on the application being used. For the example we'll send
data to port 60

Splits the data into chunks and adds order number

Adds port numbers


Transport Header

Data

:60 | 1/4

<gospel>Matt</gospel>

:60 | 2/4

<gospel>Mark</gospel>

:60 | 3/4

<gospel>Luke</gospel>

:60 | 4/4

<gospel>John</gospel>

Network/Internet
The network layer attaches the IP address of the sender, so that the recipient will know who
sent it and who to send a confirmation message to. It must also attach the IP address of the
host that it is sending the data to so it doesn't get lost! In this case we are sending to
102.231.4.189 and sending from 98.1.232.99. Combined with the port number this creates
asocket that data is being sent from and a socket that data is being sent to,
namely 102.231.4.189:60

Attaches sender IP address

Attaches destination IP address to create a socket


Network Header

102.231.4.189
98.1.232.99

102.231.4.189
98.1.232.99

102.231.4.189
98.1.232.99

102.231.4.189
98.1.232.99

Transport Header

Data

:60 | 1/4

<gospel>Matt</gospel>

:60 | 2/4

<gospel>Mark</gospel>

:60 | 3/4

<gospel>Luke</gospel>

:60 | 4/4

<gospel>John</gospel>

Link
Finally the link layer attaches the MAC address of the sender and the recipient, allowing the
packets to be directed to a specific network interface on the IP Address host machine. In this
case the sender is using a wireless card with MAC address: 00-17-4F-08-5D-69 and the
destination MAC address is: 11-22-33-44-55

Attaches sender MAC address

Attaches destination MAC address


Link Header

Network Header

11-22-33-44-55

102.231.4.189

00-17-4F-08-5D-69

98.1.232.99

11-22-33-44-55

102.231.4.189

00-17-4F-08-5D-69

98.1.232.99

11-22-33-44-55

102.231.4.189

00-17-4F-08-5D-69

98.1.232.99

11-22-33-44-55

102.231.4.189

00-17-4F-08-5D-69

98.1.232.99

Transport Header

Data

:60 | 1/4

<gospel>Matt</gospel>

:60 | 2/4

<gospel>Mark</gospel>

:60 | 3/4

<gospel>Luke</gospel>

:60 | 4/4

<gospel>John</gospel>

These four packets can then be sent across the internet holding enough information for them to:
1. reach their destination (socket from the Network and Transport Layers)
2. find the correct network interface (MAC address from the Link Layer)
3. find the correct service(Port number from the Transport Layer)
4. be reassembled in the correct order (Order information from the Transport Layer)
5. deliver the intended message (data from the Application Layer)

Bittorrent (BT) is a peer-to-peer (P2P) file transfer protocol, used for sharing large files
over the Internet.
To send or receive files the user must have a BitTorrent client (a computer program that
implements the BitTorrent protocol). Some popular BitTorrent clients include Xunlei,
Transmission, Torrent, MediaGet, Vuze and BitComet. BitTorrent trackers provide a list
of files available for transfer, and assist in transferring and reconstructing the files. The
best-known BitTorrent tracker is The Pirate Bay.

Port number

Protocol that uses it

21

File Transfer Protocol (FTP)

25

Simple Mail Transfer Protocol (SMTP)

80 & 8080

HyperText Transfer Protocol (HTTP)

110

Post Office Protocol v3 (POP3)

143

Internet Message Access Protocol (IMAP)

443

HyperText Transfer Protocol over SSL/TLS (HTTPS)

666

Doom Multiplayer game

989

Secure FTP (SFTP)

23

Telnet

Non-secure protocols
Several of the protocols used to transmit data across networks (including the internet) are not
secure. This means that if you are one of the routers that is used to get data from one host to
another, you can read the data being sent, this technique is called packet sniffing. Normally this
isn't a problem as the data being transmitted isn't secret but reading other people's packets
without their permission is a crime in the UK.
FTP
File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to
another over a TCP/IP-based network, such as the Internet. FTP is built on a client-server
architecture. FTP users may authenticate themselves using a clear-text (unencrypted) sign-in
protocol but can connect anonymously if the server is configured to allow it. FTP works on port
21.

Filezilla is a popular FTP Client and Server


The first FTP client applications were interactive command-line tools, implementing standard
commands and syntax. Graphical user interface clients have since been developed for many of
the popular desktop operating systems in use today.
HTTP
The Hypertext Transfer Protocol (HTTP) is a networking protocol behind the World Wide Web.
HTTP allows for transmission of Hypertext documents and webpages. HTTP works on ports 80
and 8080.

An HTTP request made using telnet. The request, response headers and response body are
highlighted.

Telnet
Telnet is a network protocol used on the Internet or a local area network to provide text-oriented
communications between a server and remote clients. A client will connect to the server using a
terminal (black and white command line console) and can then deliver commands to the server
to perform things like remote software installation or system updates. Telnet works on several
different ports.

telnet connections are often plain black and white text


Pros
You can telnet from simple clients with inexpensive hardware
Cons
Telnet doesn't allow you to use graphics
Telnet can be insecure, most remote connections are now handled by SSH

POP3, SMTP
Simple Mail Transfer Protocol (SMTP) is an Internet standard for sending electronic mail (email) across Internet Protocol (IP) networks. SMTP is specified for outgoing mail transport and
uses TCP port 25. The protocol for receiving mail is called the Post Office Protocol 3 and it uses
port 110.

Note that SMTP sends mail and POP3 receives it


Secure protocol
Sometimes we need to send data securely over networks. There are several protocols that
allow you to do this. You can normally tell if a protocol is secure if it has the letter 'S' in its name.
Examples include SSH, SFTP and HTTPS (SMTP is NOT secure!)
HTTPS
Hypertext Transfer Protocol Secure (HTTPS) is a combination of the Hypertext Transfer
Protocol with the SSL/TLS protocol to provide encrypted communication and secure
identification with a network web server.
HTTPS is often used when sensitive information is being sent over the internet, for example on
internet banking webpages.

Vous aimerez peut-être aussi